@sabstravtech/obtservices 0.0.22042501 → 0.0.22050309
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 +4 -0
- package/angular/lib/vendor/fetchers/fast-track-quote.fetcher.d.ts +7 -0
- package/angular/lib/vendor/fetchers/get-all-airlines.fetcher.d.ts +7 -0
- package/angular/lib/vendor/fetchers/get-car-hire-providers.fetcher.d.ts +7 -0
- package/angular/lib/vendor/fetchers/get-hotel-chains.fetcher.d.ts +7 -0
- package/angular/lib/vendor/fetchers/get-rail-providers.fetcher.d.ts +7 -0
- package/angular/lib/vendor/fetchers/send-offline-notification.fetcher.d.ts +7 -0
- package/angular/lib/vendor/services/search.service.d.ts +9 -3
- package/angular/lib/vendor/services/user.service.d.ts +5 -3
- package/angular/lib/vendor/types/graphql.angular.types.d.ts +345 -4
- package/angular/lib/vendor/updaters/edit-user.updater.d.ts +6 -0
- package/angular/lib/vendor/updaters/set-user-language-updater.d.ts +6 -0
- package/angular/sabstravtech-obtservices-angular.d.ts +17 -13
- package/angular/sabstravtech-obtservices-angular.metadata.json +1 -1
- package/base/fetchers.d.ts +6 -0
- package/base/lib/vendor/classes/eurostar-enterprise-search.d.ts +6 -1
- package/base/lib/vendor/classes/fast-track-enterprise-search.d.ts +52 -0
- package/base/lib/vendor/classes/hotel-enterprise-search.d.ts +1 -0
- package/base/lib/vendor/classes/irl-enterprise-search.d.ts +7 -1
- package/base/lib/vendor/classes/modal-types.enum.d.ts +1 -0
- package/base/lib/vendor/fetchers/fast-track-quote.fetcher.d.ts +23 -0
- package/base/lib/vendor/fetchers/get-all-airlines.fetcher.d.ts +20 -0
- package/base/lib/vendor/fetchers/get-car-hire-providers.fetcher.d.ts +20 -0
- package/base/lib/vendor/fetchers/get-hotel-chains.fetcher.d.ts +20 -0
- package/base/lib/vendor/fetchers/get-rail-providers.fetcher.d.ts +20 -0
- package/base/lib/vendor/fetchers/send-offline-notification.fetcher.d.ts +21 -0
- package/base/lib/vendor/fetchers/user-fetcher.d.ts +2 -3
- package/base/lib/vendor/interfaces/Ieurostar-enterprise-search.d.ts +1 -0
- package/base/lib/vendor/interfaces/Ifast-track-enterprise-search.d.ts +22 -0
- package/base/lib/vendor/interfaces/Iirl-enterprise-search.d.ts +3 -0
- package/base/lib/vendor/interfaces/Isearch.service.d.ts +7 -1
- package/base/lib/vendor/interfaces/eurostar-search-arg.interface.d.ts +2 -0
- package/base/lib/vendor/interfaces/user.data.d.ts +1 -0
- package/base/lib/vendor/models/traveller.object.d.ts +1 -0
- package/base/lib/vendor/services/search.service.d.ts +27 -4
- package/base/lib/vendor/services/user.service.d.ts +12 -5
- package/base/lib/vendor/types/graphql.types.d.ts +310 -4
- package/base/lib/vendor/types/types.d.ts +25 -1
- package/base/lib/vendor/updaters/edit-user-updater.d.ts +19 -0
- package/base/lib/vendor/updaters/set-user-language-updater.d.ts +19 -0
- package/base/sabstravtech-obtservices-base.d.ts +5 -5
- package/base/sabstravtech-obtservices-base.metadata.json +1 -1
- package/base/updaters.d.ts +2 -0
- package/bundles/sabstravtech-obtservices-angular.umd.js +392 -80
- 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 +715 -55
- 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 +5 -1
- package/esm2015/angular/lib/vendor/fetchers/fast-track-quote.fetcher.js +25 -0
- package/esm2015/angular/lib/vendor/fetchers/get-all-airlines.fetcher.js +25 -0
- package/esm2015/angular/lib/vendor/fetchers/get-car-hire-providers.fetcher.js +25 -0
- package/esm2015/angular/lib/vendor/fetchers/get-hotel-chains.fetcher.js +25 -0
- package/esm2015/angular/lib/vendor/fetchers/get-rail-providers.fetcher.js +25 -0
- package/esm2015/angular/lib/vendor/fetchers/send-offline-notification.fetcher.js +25 -0
- package/esm2015/angular/lib/vendor/services/search.service.js +55 -37
- package/esm2015/angular/lib/vendor/services/user.service.js +12 -6
- package/esm2015/angular/lib/vendor/types/graphql.angular.types.js +524 -1
- package/esm2015/angular/lib/vendor/updaters/edit-user.updater.js +22 -0
- package/esm2015/angular/lib/vendor/updaters/set-user-language-updater.js +22 -0
- package/esm2015/angular/sabstravtech-obtservices-angular.js +18 -14
- package/esm2015/base/fetchers.js +7 -1
- package/esm2015/base/lib/vendor/classes/carhire-enterprise-search.js +4 -5
- package/esm2015/base/lib/vendor/classes/eurostar-enterprise-search.js +48 -2
- package/esm2015/base/lib/vendor/classes/fast-track-enterprise-search.js +229 -0
- package/esm2015/base/lib/vendor/classes/hotel-enterprise-search.js +12 -7
- package/esm2015/base/lib/vendor/classes/irl-enterprise-search.js +18 -3
- package/esm2015/base/lib/vendor/classes/modal-types.enum.js +2 -1
- package/esm2015/base/lib/vendor/fetchers/fast-track-quote.fetcher.js +11 -0
- package/esm2015/base/lib/vendor/fetchers/get-all-airlines.fetcher.js +11 -0
- package/esm2015/base/lib/vendor/fetchers/get-car-hire-providers.fetcher.js +11 -0
- package/esm2015/base/lib/vendor/fetchers/get-hotel-chains.fetcher.js +11 -0
- package/esm2015/base/lib/vendor/fetchers/get-rail-providers.fetcher.js +11 -0
- package/esm2015/base/lib/vendor/fetchers/send-offline-notification.fetcher.js +11 -0
- package/esm2015/base/lib/vendor/fetchers/user-fetcher.js +1 -1
- package/esm2015/base/lib/vendor/interfaces/Ieurostar-enterprise-search.js +1 -1
- package/esm2015/base/lib/vendor/interfaces/Ifast-track-enterprise-search.js +2 -0
- 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/eurostar-search-arg.interface.js +1 -1
- package/esm2015/base/lib/vendor/interfaces/user.data.js +1 -1
- package/esm2015/base/lib/vendor/models/traveller.object.js +3 -2
- package/esm2015/base/lib/vendor/services/search.service.js +157 -17
- package/esm2015/base/lib/vendor/services/user.service.js +22 -5
- package/esm2015/base/lib/vendor/types/graphql.types.js +1 -1
- package/esm2015/base/lib/vendor/types/types.js +63 -1
- package/esm2015/base/lib/vendor/updaters/edit-user-updater.js +11 -0
- package/esm2015/base/lib/vendor/updaters/set-user-language-updater.js +11 -0
- package/esm2015/base/sabstravtech-obtservices-base.js +6 -5
- package/esm2015/base/updaters.js +3 -1
- package/fesm2015/sabstravtech-obtservices-angular.js +666 -9
- package/fesm2015/sabstravtech-obtservices-angular.js.map +1 -1
- package/fesm2015/sabstravtech-obtservices-base.js +622 -36
- package/fesm2015/sabstravtech-obtservices-base.js.map +1 -1
- package/package.json +1 -1
package/base/fetchers.d.ts
CHANGED
|
@@ -61,3 +61,9 @@ export * from './lib/vendor/fetchers/get-flight-seat-map-fetcher';
|
|
|
61
61
|
export * from './lib/vendor/fetchers/get-user-favourite-searches.fetcher';
|
|
62
62
|
export * from './lib/vendor/fetchers/get-conferma-room-images.fetcher';
|
|
63
63
|
export * from './lib/vendor/fetchers/email-basket.fetcher';
|
|
64
|
+
export * from './lib/vendor/fetchers/fast-track-quote.fetcher';
|
|
65
|
+
export * from './lib/vendor/fetchers/send-offline-notification.fetcher';
|
|
66
|
+
export * from './lib/vendor/fetchers/get-hotel-chains.fetcher';
|
|
67
|
+
export * from './lib/vendor/fetchers/get-rail-providers.fetcher';
|
|
68
|
+
export * from './lib/vendor/fetchers/get-all-airlines.fetcher';
|
|
69
|
+
export * from './lib/vendor/fetchers/get-car-hire-providers.fetcher';
|
|
@@ -17,6 +17,7 @@ import { EnterpriseBasketServiceInterface, InternalBasketInterface } from '../in
|
|
|
17
17
|
import { BaseEurostarQuoteFetcher, EurostarQuoteFetcherType } from '../fetchers/eurostar-quote.fetcher';
|
|
18
18
|
import { EurostarEnterpriseSearchInterface, EurostarTempParams } from '../interfaces/Ieurostar-enterprise-search';
|
|
19
19
|
import { AllowedClasses, FlightOperator, TimeWindow } from './flight-enterprise-search';
|
|
20
|
+
import { BaseModalOpenerService } from '../services/modal-opener.service';
|
|
20
21
|
export declare type EurostarStation = {
|
|
21
22
|
gateway: string;
|
|
22
23
|
destination: string;
|
|
@@ -54,6 +55,7 @@ export declare class EurostarEnterpriseSearch<SE_Q extends EurostarQuoteFetcherT
|
|
|
54
55
|
private eurostarFetcher;
|
|
55
56
|
private basketService;
|
|
56
57
|
private searchService;
|
|
58
|
+
private modalService;
|
|
57
59
|
static readonly STORAGE_SESSION_PARAMS = "search_eurostar";
|
|
58
60
|
static readonly STORAGE_SESSION_RESULTS = "results_eurostar";
|
|
59
61
|
type: ServiceType;
|
|
@@ -163,16 +165,18 @@ export declare class EurostarEnterpriseSearch<SE_Q extends EurostarQuoteFetcherT
|
|
|
163
165
|
set negotiated(value: boolean);
|
|
164
166
|
get includeNearbyAirports(): boolean;
|
|
165
167
|
set includeNearbyAirports(value: boolean);
|
|
166
|
-
constructor(eurostarFetcher: BaseEurostarQuoteFetcher<SE_Q>, helpers: BaseHelperRoutines, userService: UserServiceInterface, basketService: EnterpriseBasketServiceInterface, storageService: BaseStorageService, searchService: EnterpriseSearchServiceInterface);
|
|
168
|
+
constructor(eurostarFetcher: BaseEurostarQuoteFetcher<SE_Q>, helpers: BaseHelperRoutines, userService: UserServiceInterface, basketService: EnterpriseBasketServiceInterface, storageService: BaseStorageService, searchService: EnterpriseSearchServiceInterface, modalService: BaseModalOpenerService);
|
|
167
169
|
protected processResults(results1: EurostarQuoteResult): EurostarQuoteResultArray;
|
|
168
170
|
matchFares(acc: EurostarItem[], out: EurostarItem): EurostarItem[];
|
|
169
171
|
formatEurostarResults(results: FlightJourney[], total: FlightFareTotal, index: number): EurostarItem;
|
|
170
172
|
protected resetQuery(checkIsValid?: boolean): void;
|
|
171
173
|
resetParams(): void;
|
|
172
174
|
private _isValid;
|
|
175
|
+
checkCabinMatchisValid(): boolean;
|
|
173
176
|
startSearch(): Promise<boolean>;
|
|
174
177
|
getRecentSearchQuery(query: SearchFlightsV2QueryVariables): SaveRecentSearchMutationVariables;
|
|
175
178
|
private updateSerchQuery;
|
|
179
|
+
turnCabinTypeToName(classType: FlightCabinClass): string[];
|
|
176
180
|
startRecentSearch(recentSearch: RecentSearch): void;
|
|
177
181
|
private makeDepartureTimeWindow;
|
|
178
182
|
private makeArrivalTimeWindow;
|
|
@@ -238,5 +242,6 @@ export declare class EurostarEnterpriseSearch<SE_Q extends EurostarQuoteFetcherT
|
|
|
238
242
|
value: string;
|
|
239
243
|
}[];
|
|
240
244
|
saveSearch(): Observable<SaveFavouriteSearchResult>;
|
|
245
|
+
openEurostarFareRules(basketItem: BasketItem): void;
|
|
241
246
|
}
|
|
242
247
|
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import moment from "moment";
|
|
2
|
+
import { BaseFastTrackQuoteFetcher, FastTrackQuoteFetcherType } from "../fetchers/fast-track-quote.fetcher";
|
|
3
|
+
import { ICheapestPrice } from "../interfaces/cheapest-price";
|
|
4
|
+
import { EnterpriseBasketServiceInterface } from "../interfaces/Ienterprise-basket.service";
|
|
5
|
+
import { FastTrackEnterpriseSearchInterface, FastTrackTempParams } from "../interfaces/Ifast-track-enterprise-search";
|
|
6
|
+
import { EnterpriseSearchServiceInterface } from "../interfaces/Isearch.service";
|
|
7
|
+
import { BaseStorageService } from "../services/storage.service";
|
|
8
|
+
import { BasketItem, FastTrackQuote, SaveRecentSearchMutationVariables, SearchFastTrackQueryVariables, ServiceType } from "../types/graphql.types";
|
|
9
|
+
import { FastTrackQuoteResultArray, NgbDateStruct, OBTAirportDetails, RecentSearch } from "../types/types";
|
|
10
|
+
import { BaseEnterpriseSearch } from "./base-enterprise";
|
|
11
|
+
import { BaseHelperRoutines } from "./helpers";
|
|
12
|
+
export declare class FastTrackEnterpriseSearch<FTQ_Q extends FastTrackQuoteFetcherType> extends BaseEnterpriseSearch<FastTrackTempParams, FastTrackQuoteResultArray, FastTrackQuoteResultArray> implements FastTrackEnterpriseSearchInterface {
|
|
13
|
+
private fasttrackFetcher;
|
|
14
|
+
private basketService;
|
|
15
|
+
private searchService;
|
|
16
|
+
static readonly STORAGE_SESSION_PARAMS = "search_fasttrack";
|
|
17
|
+
static readonly STORAGE_SESSION_RESULTS = "results_fasttrack";
|
|
18
|
+
type: ServiceType;
|
|
19
|
+
private _locationCode;
|
|
20
|
+
private travellers;
|
|
21
|
+
get adults(): number;
|
|
22
|
+
set adults(value: number);
|
|
23
|
+
get children(): number;
|
|
24
|
+
set children(value: number);
|
|
25
|
+
private _date;
|
|
26
|
+
get date(): NgbDateStruct;
|
|
27
|
+
set date(value: NgbDateStruct);
|
|
28
|
+
private _time;
|
|
29
|
+
get time(): string;
|
|
30
|
+
set time(value: string);
|
|
31
|
+
get arrivalDatetime(): moment.Moment;
|
|
32
|
+
set arrivalDatetime(value: moment.Moment);
|
|
33
|
+
private _updateDateTime;
|
|
34
|
+
get locationCode(): string | OBTAirportDetails;
|
|
35
|
+
set locationCode(value: string | OBTAirportDetails);
|
|
36
|
+
private _isValid;
|
|
37
|
+
protected resultsSessionName: string;
|
|
38
|
+
protected multiResultsSessionName: string;
|
|
39
|
+
constructor(fasttrackFetcher: BaseFastTrackQuoteFetcher<FTQ_Q>, helpers: BaseHelperRoutines, basketService: EnterpriseBasketServiceInterface, storageService: BaseStorageService, searchService: EnterpriseSearchServiceInterface);
|
|
40
|
+
protected resetQuery(): void;
|
|
41
|
+
startSearch(): Promise<boolean>;
|
|
42
|
+
getSearchQuery(): SearchFastTrackQueryVariables;
|
|
43
|
+
getRecentSearchQuery(query: SearchFastTrackQueryVariables): SaveRecentSearchMutationVariables;
|
|
44
|
+
startRecentSearch(recentSearch: RecentSearch): void;
|
|
45
|
+
updateFromPreviousSearches(previousItems: Record<ServiceType, BasketItem>): void;
|
|
46
|
+
updateLowestPrice(results: FastTrackQuote[]): ICheapestPrice;
|
|
47
|
+
addFastTrackToBasket(fasttrackQuote: FastTrackQuote, fasttrackQuery: SearchFastTrackQueryVariables): Promise<boolean>;
|
|
48
|
+
getTermsAndCond(fasttrackQuote: FastTrackQuote): {
|
|
49
|
+
name: string;
|
|
50
|
+
value: string;
|
|
51
|
+
}[];
|
|
52
|
+
}
|
|
@@ -137,6 +137,7 @@ export declare class HotelEnterpriseSearch<HQ_Q extends HotelQuoteFetcherType, H
|
|
|
137
137
|
getSearchQuery(ogSearch?: boolean): SearchHotelsQueryVariables;
|
|
138
138
|
buildQuery(ogSearch?: boolean): void;
|
|
139
139
|
makeHotelAvalilityObject(hotel: HotelQuoteResult): AvailabilityObject;
|
|
140
|
+
resultsFilterMethod: (results: HotelDetailsArray) => HotelDetailsArray;
|
|
140
141
|
filterResults: () => void;
|
|
141
142
|
filterLighteningResults: () => void;
|
|
142
143
|
resultsHaveTag(searchTag: string): boolean;
|
|
@@ -158,11 +158,17 @@ export declare class IRLEnterpriseSearch<Q extends IrlQuoteFetcherType, GIDF_Q e
|
|
|
158
158
|
get journeyType(): IrlJourneyType;
|
|
159
159
|
set journeyType(data: IrlJourneyType);
|
|
160
160
|
get sortDropdownValues(): SortTypeIrl[];
|
|
161
|
+
private _trainNumber;
|
|
162
|
+
get trainNumber(): string;
|
|
163
|
+
set trainNumber(data: string);
|
|
164
|
+
private _additionalInstructions;
|
|
165
|
+
get additionalInstructions(): string;
|
|
166
|
+
set additionalInstructions(data: string);
|
|
161
167
|
constructor(Irlfetcher: BaseIrlQuoteFetcher<Q>, irlDiscountCardsFetcher: BaseIrlDiscountCardFetcher<GIDF_Q>, helpers: BaseHelperRoutines, basketService: EnterpriseBasketServiceInterface, storageService: BaseStorageService, searchService: EnterpriseSearchServiceInterface);
|
|
162
168
|
irlDiscountCards: IrlTravelCard;
|
|
163
169
|
protected processResults(results: IrlQuoteResultArray): ({
|
|
164
170
|
__typename?: "IRLJourneyOptions";
|
|
165
|
-
} & Pick<IrlJourneyOptions, "source" | "sourceId"> & {
|
|
171
|
+
} & Pick<IrlJourneyOptions, "source" | "sourceId" | "jrfreference"> & {
|
|
166
172
|
outbound?: ({
|
|
167
173
|
__typename?: "IRLJourneyOption";
|
|
168
174
|
} & Pick<IrlJourneyOption, "from" | "fromCode" | "to" | "toCode" | "departDateTime" | "arriveDateTime" | "changes" | "unsellable"> & {
|
|
@@ -10,6 +10,7 @@ export declare class ModalTypes {
|
|
|
10
10
|
static readonly RailTicketsDialogComponent: ModalTypes;
|
|
11
11
|
static readonly ModalFlightFareComponent: ModalTypes;
|
|
12
12
|
static readonly FlightExtrasDialogComponent: ModalTypes;
|
|
13
|
+
static readonly OfflineRequestDialogComponent: ModalTypes;
|
|
13
14
|
private _component;
|
|
14
15
|
get component(): any;
|
|
15
16
|
set component(value: any);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ApolloQueryResult } from '@apollo/client/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { BaseHelperRoutines } from '../classes/helpers';
|
|
4
|
+
import { BaseModalOpenerService } from '../services/modal-opener.service';
|
|
5
|
+
import { SearchFastTrackQuery, SearchFastTrackQueryVariables } from '../types/graphql.types';
|
|
6
|
+
import { FastTrackQuoteResultArray } from '../types/types';
|
|
7
|
+
import { FetchableList } from './list-fetchable-enterprise';
|
|
8
|
+
declare type R = {
|
|
9
|
+
seachFastTrack: {
|
|
10
|
+
results: P;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
declare type P = FastTrackQuoteResultArray;
|
|
14
|
+
declare type A = SearchFastTrackQueryVariables;
|
|
15
|
+
declare type M = SearchFastTrackQuery;
|
|
16
|
+
export declare type FastTrackQuoteFetcherType = {
|
|
17
|
+
fetch: (a: A) => Observable<ApolloQueryResult<M>>;
|
|
18
|
+
};
|
|
19
|
+
export declare class BaseFastTrackQuoteFetcher<Q extends FastTrackQuoteFetcherType> extends FetchableList<Q, A, R, P, M> {
|
|
20
|
+
constructor(gql: Q, helpers: BaseHelperRoutines, modalService: BaseModalOpenerService);
|
|
21
|
+
protected getDataFromResult(results: ApolloQueryResult<R>): P;
|
|
22
|
+
}
|
|
23
|
+
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 { Observable } from 'rxjs';
|
|
5
|
+
import { GetAllAirlinesResultArray } from '../types/types';
|
|
6
|
+
import { BaseModalOpenerService } from '../services/modal-opener.service';
|
|
7
|
+
import { GetAllAirlinesQuery } from '../types/graphql.types';
|
|
8
|
+
declare type R = {
|
|
9
|
+
getAllAirlines: P;
|
|
10
|
+
};
|
|
11
|
+
declare type P = GetAllAirlinesResultArray;
|
|
12
|
+
declare type M = GetAllAirlinesQuery;
|
|
13
|
+
export declare type GetAllAirlinesFetcherType = {
|
|
14
|
+
fetch: () => Observable<ApolloQueryResult<M>>;
|
|
15
|
+
};
|
|
16
|
+
export declare class BaseGetAllAirlinesFetcher<Q extends GetAllAirlinesFetcherType> extends FetchableList<Q, null, R, P, M> {
|
|
17
|
+
constructor(queryGQL: Q, helpers: BaseHelperRoutines, 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 { Observable } from 'rxjs';
|
|
5
|
+
import { GetCarHireProvidersResultArray } from '../types/types';
|
|
6
|
+
import { BaseModalOpenerService } from '../services/modal-opener.service';
|
|
7
|
+
import { GetCarHireProvidersQuery } from '../types/graphql.types';
|
|
8
|
+
declare type R = {
|
|
9
|
+
getCarHireProviders: P;
|
|
10
|
+
};
|
|
11
|
+
declare type P = GetCarHireProvidersResultArray;
|
|
12
|
+
declare type M = GetCarHireProvidersQuery;
|
|
13
|
+
export declare type GetCarHireProvidersFetcherType = {
|
|
14
|
+
fetch: () => Observable<ApolloQueryResult<M>>;
|
|
15
|
+
};
|
|
16
|
+
export declare class BaseGetCarHireProvidersFetcher<Q extends GetCarHireProvidersFetcherType> extends FetchableList<Q, null, R, P, M> {
|
|
17
|
+
constructor(queryGQL: Q, helpers: BaseHelperRoutines, 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 { Observable } from 'rxjs';
|
|
5
|
+
import { GetHotelChainsResultArray } from '../types/types';
|
|
6
|
+
import { BaseModalOpenerService } from '../services/modal-opener.service';
|
|
7
|
+
import { GetHotelChainsQuery } from '../types/graphql.types';
|
|
8
|
+
declare type R = {
|
|
9
|
+
getHotelChains: P;
|
|
10
|
+
};
|
|
11
|
+
declare type P = GetHotelChainsResultArray;
|
|
12
|
+
declare type M = GetHotelChainsQuery;
|
|
13
|
+
export declare type GetHotelChainsFetcherType = {
|
|
14
|
+
fetch: () => Observable<ApolloQueryResult<M>>;
|
|
15
|
+
};
|
|
16
|
+
export declare class BaseGetHotelChainsFetcher<Q extends GetHotelChainsFetcherType> extends FetchableList<Q, null, R, P, M> {
|
|
17
|
+
constructor(queryGQL: Q, helpers: BaseHelperRoutines, 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 { Observable } from 'rxjs';
|
|
5
|
+
import { getRailProvidersResultArray } from '../types/types';
|
|
6
|
+
import { BaseModalOpenerService } from '../services/modal-opener.service';
|
|
7
|
+
import { GetRailProvidersQuery } from '../types/graphql.types';
|
|
8
|
+
declare type R = {
|
|
9
|
+
getRailProviders: P;
|
|
10
|
+
};
|
|
11
|
+
declare type P = getRailProvidersResultArray;
|
|
12
|
+
declare type M = GetRailProvidersQuery;
|
|
13
|
+
export declare type GetRailProvidersFetcherType = {
|
|
14
|
+
fetch: () => Observable<ApolloQueryResult<M>>;
|
|
15
|
+
};
|
|
16
|
+
export declare class BaseGetRailProvidersFetcher<Q extends GetRailProvidersFetcherType> extends FetchableList<Q, null, R, P, M> {
|
|
17
|
+
constructor(queryGQL: Q, helpers: BaseHelperRoutines, modalService: BaseModalOpenerService);
|
|
18
|
+
protected getDataFromResult(results: ApolloQueryResult<R>): P;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ApolloQueryResult } from '@apollo/client/core';
|
|
2
|
+
import { BaseHelperRoutines } from '../classes/helpers';
|
|
3
|
+
import { FetchableObject } from './object-fetchable-enterprise';
|
|
4
|
+
import { BaseModalOpenerService } from '../services/modal-opener.service';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
|
+
import { SendOfflineNotificationsResult } from '../types/types';
|
|
7
|
+
import { SendOfflineNotificationQuery, SendOfflineNotificationQueryVariables } from '../types/graphql.types';
|
|
8
|
+
declare type R = {
|
|
9
|
+
sendOfflineNotification: P;
|
|
10
|
+
};
|
|
11
|
+
declare type P = SendOfflineNotificationsResult;
|
|
12
|
+
declare type A = SendOfflineNotificationQueryVariables;
|
|
13
|
+
declare type M = SendOfflineNotificationQuery;
|
|
14
|
+
export declare type SendOfflineNotificationFetcherType = {
|
|
15
|
+
fetch: (a: A) => Observable<ApolloQueryResult<M>>;
|
|
16
|
+
};
|
|
17
|
+
export declare class BaseSendOfflineNotificationFetcher<Q extends SendOfflineNotificationFetcherType> extends FetchableObject<Q, A, R, P, M> {
|
|
18
|
+
constructor(sendOfflineNotificationGQL: Q, helpers: BaseHelperRoutines, modalService: BaseModalOpenerService);
|
|
19
|
+
protected getDataFromResult(results: ApolloQueryResult<R>): P;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -2,14 +2,13 @@ import { FetchableObject } from './object-fetchable-enterprise';
|
|
|
2
2
|
import { BaseModalOpenerService } from '../services/modal-opener.service';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { ApolloQueryResult } from '@apollo/client/core';
|
|
5
|
-
import { GetUserQuery, GetUserQueryVariables } from '../types/graphql.types';
|
|
6
|
-
import { GetUserResult } from '../types/types';
|
|
5
|
+
import { GetUserQuery, GetUserQueryVariables, User } from '../types/graphql.types';
|
|
7
6
|
import { BaseHelperRoutines } from '../classes/helpers';
|
|
8
7
|
declare type A = GetUserQueryVariables;
|
|
9
8
|
declare type R = {
|
|
10
9
|
getUser: P;
|
|
11
10
|
};
|
|
12
|
-
declare type P =
|
|
11
|
+
declare type P = User;
|
|
13
12
|
declare type M = GetUserQuery;
|
|
14
13
|
export declare type SearchGetUserFetcherType = {
|
|
15
14
|
fetch: (a: A) => Observable<ApolloQueryResult<M>>;
|
|
@@ -95,4 +95,5 @@ export interface EurostarEnterpriseSearchInterface extends BaseEnterpriseSearch<
|
|
|
95
95
|
addEurostarJourneysToBasket(selectedFlight: FlightItinerary): void;
|
|
96
96
|
saveSearch(): Observable<SaveFavouriteSearchResult>;
|
|
97
97
|
convertRecentSearchDateTime(date: string, timeWindow?: string): moment.Moment;
|
|
98
|
+
openEurostarFareRules(basketItem: BasketItem): void;
|
|
98
99
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FastTrackQuoteResultArray, NgbDateStruct, OBTAirportDetails } from "../types/types";
|
|
2
|
+
import moment from 'moment';
|
|
3
|
+
import { BaseEnterpriseSearch } from "../classes/base-enterprise";
|
|
4
|
+
import { BasketItem, FastTrackQuote, SearchFastTrackQueryVariables, ServiceType } from "../types/graphql.types";
|
|
5
|
+
import { ICheapestPrice } from "./cheapest-price";
|
|
6
|
+
export interface FastTrackTempParams {
|
|
7
|
+
arrivalDatetime: moment.Moment;
|
|
8
|
+
locationCode: string | OBTAirportDetails;
|
|
9
|
+
adults: number;
|
|
10
|
+
children: number;
|
|
11
|
+
}
|
|
12
|
+
export interface FastTrackEnterpriseSearchInterface extends BaseEnterpriseSearch<FastTrackTempParams, FastTrackQuoteResultArray, FastTrackQuoteResultArray> {
|
|
13
|
+
arrivalDatetime: moment.Moment;
|
|
14
|
+
locationCode: string | OBTAirportDetails;
|
|
15
|
+
adults: number;
|
|
16
|
+
children: number;
|
|
17
|
+
date: NgbDateStruct;
|
|
18
|
+
getSearchQuery(): SearchFastTrackQueryVariables;
|
|
19
|
+
startSearch(): any;
|
|
20
|
+
updateFromPreviousSearches(previousItems: Record<ServiceType, BasketItem>): void;
|
|
21
|
+
updateLowestPrice(results: FastTrackQuote[]): ICheapestPrice;
|
|
22
|
+
}
|
|
@@ -42,6 +42,9 @@ export interface IRLEnterpriseSearchInterface extends BaseEnterpriseSearch<IrlTe
|
|
|
42
42
|
cheapestFirst: IrlTicketOption;
|
|
43
43
|
originalUserSearch: IrlTempParams;
|
|
44
44
|
outboundTicket: IrlTicketOptionWithSelected;
|
|
45
|
+
additionalInstructions: string;
|
|
46
|
+
trainNumber: string;
|
|
47
|
+
irlClass: string;
|
|
45
48
|
startSearch(): any;
|
|
46
49
|
getSearchQuery(): SearchIrlQueryVariables;
|
|
47
50
|
updateFromPreviousSearches(previousItems: Record<ServiceType, BasketItem>): void;
|
|
@@ -13,6 +13,7 @@ import { CabHireEnterpriseSearchInterface, CabHireTempParams } from './Icabhire-
|
|
|
13
13
|
import { RailEnterpriseSearchInterface, RailTempParams } from './Irail-enterprise-search';
|
|
14
14
|
import { IRLEnterpriseSearchInterface, IrlTempParams } from './Iirl-enterprise-search';
|
|
15
15
|
import { EurostarEnterpriseSearchInterface, EurostarTempParams } from './Ieurostar-enterprise-search';
|
|
16
|
+
import { FastTrackEnterpriseSearchInterface, FastTrackTempParams } from './Ifast-track-enterprise-search';
|
|
16
17
|
export declare type SearchParams = {
|
|
17
18
|
[ServiceType.Lounge]: LoungesEnterpriseSearchInterface;
|
|
18
19
|
[ServiceType.Hotel]: HotelEnterpriseSearchInterface;
|
|
@@ -22,7 +23,7 @@ export declare type SearchParams = {
|
|
|
22
23
|
[ServiceType.Cab]: CabHireEnterpriseSearchInterface;
|
|
23
24
|
[ServiceType.InternationalRail]: IRLEnterpriseSearchInterface;
|
|
24
25
|
[ServiceType.Rail]: RailEnterpriseSearchInterface;
|
|
25
|
-
[ServiceType.FastTrack]:
|
|
26
|
+
[ServiceType.FastTrack]: FastTrackEnterpriseSearchInterface;
|
|
26
27
|
[ServiceType.Coach]: null;
|
|
27
28
|
[ServiceType.Eurostar]: EurostarEnterpriseSearchInterface;
|
|
28
29
|
};
|
|
@@ -95,6 +96,7 @@ export interface EnterpriseSearchServiceInterface {
|
|
|
95
96
|
makeRailQuery(...args: any): RailTempParams;
|
|
96
97
|
makeIrlQuery(...args: any): IrlTempParams;
|
|
97
98
|
makeEurostarQuery(...args: any): EurostarTempParams;
|
|
99
|
+
makeFastTrackQuery(...args: any): FastTrackTempParams;
|
|
98
100
|
resetSearchObjects(): void;
|
|
99
101
|
processTerminals(terminals: string[]): TerminalsType[];
|
|
100
102
|
isPostcodeVaild(postcode: string): Observable<boolean>;
|
|
@@ -109,4 +111,8 @@ export interface EnterpriseSearchServiceInterface {
|
|
|
109
111
|
getUserFavouriteSearches(serviceType?: ServiceType, isLoading?: BehaviorSubject<boolean>): Observable<GetUserFavouriteSearchesResultArray>;
|
|
110
112
|
deleteFavouriteSearchByID(id: string): Observable<void>;
|
|
111
113
|
emailBasket(id: string): Observable<Basket>;
|
|
114
|
+
getAllHotelChains(): Observable<{}>;
|
|
115
|
+
getAllRailProviders(): Observable<{}>;
|
|
116
|
+
getAllAirlines(): Observable<{}>;
|
|
117
|
+
getCarHireProivders(): Observable<{}>;
|
|
112
118
|
}
|
|
@@ -3,4 +3,6 @@ import { OBTAirportDetails } from "../types/types";
|
|
|
3
3
|
export interface IEurostarSearchArgs extends SearchFlightsV2QueryVariables {
|
|
4
4
|
departLocation?: string | OBTAirportDetails;
|
|
5
5
|
arriveLocation?: string | OBTAirportDetails;
|
|
6
|
+
outboundCabinClassName?: string[];
|
|
7
|
+
returnCabinClassName?: string[];
|
|
6
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BehaviorSubject } from 'rxjs';
|
|
1
|
+
import { BehaviorSubject, Subscription } from 'rxjs';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { SearchObject, SearchObjects } from '../interfaces/search-objects.interface';
|
|
4
|
-
import { Address, BasketItem, ServiceType, SaveUserAddressMutationVariables, ConfermaOfficeNames, ConfermaOfficeInfo, CarbonAllowance, RiskAlert, RiskLevel, ReferenceRailCardQualifier, SaveRecentSearchMutationVariables, InputFlightJourney, FlightSeatMapResponse, SaveFavouriteSearchMutationVariables, Basket } from '../types/graphql.types';
|
|
4
|
+
import { Address, BasketItem, ServiceType, SaveUserAddressMutationVariables, ConfermaOfficeNames, ConfermaOfficeInfo, CarbonAllowance, RiskAlert, RiskLevel, ReferenceRailCardQualifier, SaveRecentSearchMutationVariables, InputFlightJourney, FlightSeatMapResponse, SaveFavouriteSearchMutationVariables, Basket, IrlOfflineNotifyResult } from '../types/graphql.types';
|
|
5
5
|
import { Traveller } from '../models/traveller.object';
|
|
6
6
|
import { BaseStorageService } from './storage.service';
|
|
7
7
|
import { BaseHelperRoutines } from '../classes/helpers';
|
|
@@ -71,13 +71,20 @@ import { BaseModalOpenerService } from './modal-opener.service';
|
|
|
71
71
|
import { BaseGetUserFavouriteSearchesFetcher, GetUserFavouriteSearchesFetcherType } from '../fetchers/get-user-favourite-searches.fetcher';
|
|
72
72
|
import { BaseDeleteFavouriteSearchUpdater, DeleteFavouriteSearchFetcherType } from '../updaters/remove-favourite-search-updater';
|
|
73
73
|
import { BaseEmailBasketFetcher, EmailBasketFetcherType } from '../fetchers/email-basket.fetcher';
|
|
74
|
+
import { FastTrackTempParams } from '../interfaces/Ifast-track-enterprise-search';
|
|
75
|
+
import { BaseFastTrackQuoteFetcher, FastTrackQuoteFetcherType } from '../fetchers/fast-track-quote.fetcher';
|
|
76
|
+
import { BaseSendOfflineNotificationFetcher, SendOfflineNotificationFetcherType } from '../fetchers/send-offline-notification.fetcher';
|
|
77
|
+
import { BaseGetHotelChainsFetcher, GetHotelChainsFetcherType } from '../fetchers/get-hotel-chains.fetcher';
|
|
78
|
+
import { BaseGetRailProvidersFetcher, GetRailProvidersFetcherType } from '../fetchers/get-rail-providers.fetcher';
|
|
79
|
+
import { BaseGetAllAirlinesFetcher, GetAllAirlinesFetcherType } from '../fetchers/get-all-airlines.fetcher';
|
|
80
|
+
import { BaseGetCarHireProvidersFetcher, GetCarHireProvidersFetcherType } from '../fetchers/get-car-hire-providers.fetcher';
|
|
74
81
|
export declare const MAX_TRAVELLERS = 8;
|
|
75
82
|
export declare enum TravellerSearchTypes {
|
|
76
83
|
email = "email",
|
|
77
84
|
name = "name",
|
|
78
85
|
employeeNumber = "employeeNumber"
|
|
79
86
|
}
|
|
80
|
-
export declare class BaseEnterpriseSearchService<SP_Q extends SearchPostcodesQuoteFetcherType, SR_Q extends SearchRailStationsFetcherType, SL_Q extends LoungeQuoteFetcherType, SPA_Q extends ParkingQuoteFetcherType, SFL_Q extends FlightQuoteFetcherType, SHO_Q extends HotelQuoteFetcherType, SCH_Q extends CarHireFetcherType, CHAD_Q extends CarHireAvailabilityDetailFetcherType, STH_Q extends CabhireQuoteFetcherType, SA_Q extends SearchAirportsQuoteFetcherType, SAL_Q extends SearchAirlinesQuoteFetcherType, HA_Q extends HotelAvalinilityFetcherType, SC_Q extends SearchCitiesQuoteFetcherType, SCC_Q extends SearchConfermaCitiesQuoteFetcherType, SRA_Q extends RailQuoteFetcherType, SI_Q extends IrlQuoteFetcherType, SUA_Q extends SaveUserAddressUpdaterType, SU_Q extends UserAddressFetcherType, GUCO_Q extends GetUserCompanyOfficesQuoteFetcherType, SHC_Q extends SearchHotelChainsQuoteFetcherType, GCRI_Q extends GetConfermaRoomImagesQuoteFetcherType, IPV_Q extends ValidateIsPostcodeValidType, SD_Q extends SearchDepotQuoteFetcherType, GRS_Q extends GetRailStationFetcherType, GON_Q extends ConfermaOfficeNameFetcherType, CO_Q extends ConfermaOfficeFetcherType, DUA_Q extends DeleteUserAddressFetcherType, DRS_Q extends DeleteRecentSearchFetcherType, SRS_Q extends SaveRecentSearchFetcherType, UCA_Q extends GetUserCurrentCarbonAllowanceType, SFS_Q extends SaveFavouriteSearchFetcherType, GRA_Q extends GetRiskAlertsFetcherType, QL_Q extends ConfermaQuicklistFetcherType, GURSF_Q extends GetUserRecentSearchesFetcherType, GRCF_Q extends GetRailCardsFetcherType, GCMTF_Q extends GetCovidMicrositeTokenFetcherType, SE_Q extends EurostarQuoteFetcherType, SUCBF extends SearchUserCanBookForFetcherType, SIS_Q extends SearchIrlStationsFetcherType, GIDF_Q extends IrlDiscountCardFetcherType, GFFR_Q extends GetFlightFareRulesType, GFSM_Q extends GetFlightSeatMapType, GRLD_F extends GetRailLiveDeparturesFetcherType, AHR_Q extends ApplyHotelRulesFetcherType, AFR_Q extends ApplyJitFlightRulesType, GUFSF_Q extends GetUserFavouriteSearchesFetcherType, DFS_Q extends DeleteFavouriteSearchFetcherType, EB_F extends EmailBasketFetcherType> implements EnterpriseSearchServiceInterface {
|
|
87
|
+
export declare class BaseEnterpriseSearchService<SP_Q extends SearchPostcodesQuoteFetcherType, SR_Q extends SearchRailStationsFetcherType, SL_Q extends LoungeQuoteFetcherType, SPA_Q extends ParkingQuoteFetcherType, SFL_Q extends FlightQuoteFetcherType, SHO_Q extends HotelQuoteFetcherType, SCH_Q extends CarHireFetcherType, CHAD_Q extends CarHireAvailabilityDetailFetcherType, STH_Q extends CabhireQuoteFetcherType, SA_Q extends SearchAirportsQuoteFetcherType, SAL_Q extends SearchAirlinesQuoteFetcherType, HA_Q extends HotelAvalinilityFetcherType, SC_Q extends SearchCitiesQuoteFetcherType, SCC_Q extends SearchConfermaCitiesQuoteFetcherType, SRA_Q extends RailQuoteFetcherType, SI_Q extends IrlQuoteFetcherType, SUA_Q extends SaveUserAddressUpdaterType, SU_Q extends UserAddressFetcherType, GUCO_Q extends GetUserCompanyOfficesQuoteFetcherType, SHC_Q extends SearchHotelChainsQuoteFetcherType, GCRI_Q extends GetConfermaRoomImagesQuoteFetcherType, IPV_Q extends ValidateIsPostcodeValidType, SD_Q extends SearchDepotQuoteFetcherType, GRS_Q extends GetRailStationFetcherType, GON_Q extends ConfermaOfficeNameFetcherType, CO_Q extends ConfermaOfficeFetcherType, DUA_Q extends DeleteUserAddressFetcherType, DRS_Q extends DeleteRecentSearchFetcherType, SRS_Q extends SaveRecentSearchFetcherType, UCA_Q extends GetUserCurrentCarbonAllowanceType, SFS_Q extends SaveFavouriteSearchFetcherType, GRA_Q extends GetRiskAlertsFetcherType, QL_Q extends ConfermaQuicklistFetcherType, GURSF_Q extends GetUserRecentSearchesFetcherType, GRCF_Q extends GetRailCardsFetcherType, GCMTF_Q extends GetCovidMicrositeTokenFetcherType, SE_Q extends EurostarQuoteFetcherType, SUCBF extends SearchUserCanBookForFetcherType, SIS_Q extends SearchIrlStationsFetcherType, GIDF_Q extends IrlDiscountCardFetcherType, GFFR_Q extends GetFlightFareRulesType, GFSM_Q extends GetFlightSeatMapType, GRLD_F extends GetRailLiveDeparturesFetcherType, AHR_Q extends ApplyHotelRulesFetcherType, AFR_Q extends ApplyJitFlightRulesType, GUFSF_Q extends GetUserFavouriteSearchesFetcherType, DFS_Q extends DeleteFavouriteSearchFetcherType, EB_F extends EmailBasketFetcherType, FTQ_Q extends FastTrackQuoteFetcherType, SON_Q extends SendOfflineNotificationFetcherType, GHT_Q extends GetHotelChainsFetcherType, GRP_Q extends GetRailProvidersFetcherType, GAA_Q extends GetAllAirlinesFetcherType, GCHP_Q extends GetCarHireProvidersFetcherType> implements EnterpriseSearchServiceInterface {
|
|
81
88
|
protected searchAirportsFetcher: BaseSearchAirportsFetcher<SA_Q>;
|
|
82
89
|
protected searchAirlinesFetcher: BaseSearchAirlinesFetcher<SAL_Q>;
|
|
83
90
|
protected storageService: BaseStorageService;
|
|
@@ -119,6 +126,11 @@ export declare class BaseEnterpriseSearchService<SP_Q extends SearchPostcodesQuo
|
|
|
119
126
|
private getUserFavouriteSearchesFetcher;
|
|
120
127
|
private deleteFavouriteSearchUpdater;
|
|
121
128
|
private emailBasketFetcher;
|
|
129
|
+
private sendOfflineNotificationFetcher;
|
|
130
|
+
private getHotelChainsFetcher;
|
|
131
|
+
private getRailProvidersFetcher;
|
|
132
|
+
private getAllAirlinesFetcher;
|
|
133
|
+
private getCarHireProvidersFetcher;
|
|
122
134
|
static SESSION_TRAVELLER: string;
|
|
123
135
|
searches: SearchParams;
|
|
124
136
|
traveller_error: boolean;
|
|
@@ -134,6 +146,9 @@ export declare class BaseEnterpriseSearchService<SP_Q extends SearchPostcodesQuo
|
|
|
134
146
|
travellerValidationMessages: string[];
|
|
135
147
|
search_loading: boolean;
|
|
136
148
|
search_airport_loading: boolean;
|
|
149
|
+
allSubscription: Subscription;
|
|
150
|
+
searchesSubscription: Subscription;
|
|
151
|
+
jrfReference: string;
|
|
137
152
|
private selectedTravellers;
|
|
138
153
|
selectedPlaces: any;
|
|
139
154
|
countries: {
|
|
@@ -145,7 +160,8 @@ export declare class BaseEnterpriseSearchService<SP_Q extends SearchPostcodesQuo
|
|
|
145
160
|
gateway: string;
|
|
146
161
|
destination: string;
|
|
147
162
|
}[];
|
|
148
|
-
constructor(searchAirportsFetcher: BaseSearchAirportsFetcher<SA_Q>, searchAirlinesFetcher: BaseSearchAirlinesFetcher<SAL_Q>, storageService: BaseStorageService, userService: UserServiceInterface, modalService: BaseModalOpenerService, router: Router, helpers: BaseHelperRoutines, hotelAvalibilityService: BaseHotelAvalibilityService<HA_Q>, citiesFetcher: BaseSearchCityFetcher<SC_Q>, confermaCitiesFetcher: BaseSearchConfermaCityFetcher<SCC_Q>, postcodeFetcher: BaseSearchPostcodeFetcher<SP_Q>, railStationFetcher: BaseSearchRailStationsFetcher<SR_Q>, saveUserAddressUpdater: BaseSaveUserAddressUpdater<SUA_Q>, userAddressesFetcher: BaseUserAddressesFetcher<SU_Q>, basketService: EnterpriseBasketServiceInterface, getUserCompanyOfficesFetcher: BaseGetUserCompanyOfficesFetcher<GUCO_Q>, searchHotelChainsFetcher: BaseSearchHotelChainsFetcher<SHC_Q>, getConfermaRoomImagesFetcher: BaseGetConfermaRoomImagesFetcher<GCRI_Q>, baseValidateIsPostcodeValidTester: BaseValidateIsPostcodeValidTester<IPV_Q>, depotFetcher: BaseSearchDepotFetcher<SD_Q>, confermaOfficeNamesFetcher: BaseConfermaOfficeNamesFetcher<GON_Q>, confermaOfficeFetcher: BaseConfermaOfficeFetcher<CO_Q>, baseDeleteUserAddressUpdater: BaseDeleteUserAddressUpdater<DUA_Q>, baseDeleteRecentSearchUpdater: BaseDeleteRecentSearchUpdater<DRS_Q>, baseSaveRecentSearchUpdater: BaseSaveRecentSearchUpdater<SRS_Q>, getUserCurrentCarbonAllowanceFetcher: BaseGetUserCurrentCarbonAllowanceFetcher<UCA_Q>, baseSaveFavouriteSearchUpdater: BaseSaveFavouriteSearchUpdater<SFS_Q>, environment: BaseEnvironment, loungeFetcher: BaseLoungeQuoteFetcher<SL_Q>, parkingFetcher: BaseParkingQuoteFetcher<SPA_Q>, httpCallService: AbstractHttpCallService, flightFetcher: BaseFlightQuoteFetcher<SFL_Q>, hotelFetcher: BaseHotelQuoteFetcher<SHO_Q>, carhireFetcher: BaseCarhireQuoteFetcher<SCH_Q>, carHireAvailabilityDetailFetcher: BaseCarHireAvailabilityDetailFetcher<CHAD_Q>, cabhireFetcher: BaseCabhireQuoteFetcher<STH_Q>, railFetcher: BaseRailQuoteFetcher<SRA_Q>, irlFetcher: BaseIrlQuoteFetcher<SI_Q>, getRailStationFetcher: BaseGetRailStationFetcher<GRS_Q>, baseWebTokenService: BaseWebTokenService, riskAlertsFetcher: BaseGetRiskAlertsFetcher<GRA_Q>, quicklistFetcher: BaseSearchConfermaQuicklistFetcher<QL_Q>, getUserRecentSearchesFetcher: BaseGetUserRecentSearchesFetcher<GURSF_Q>, getRailCardsFetcher: BaseGetRailcardsFetcher<GRCF_Q>, getCovidMicrositeTokenFetcher: BaseGetCovidMicrositeTokenFetcher<GCMTF_Q>, eurostarFetcher: BaseEurostarQuoteFetcher<SE_Q>, searchUsersCanBookForFetcher: BaseSearchUsersCanBookForFetcher<SUCBF>, searchIrlStationsFetcher: BaseSearchIrlStationsFetcher<SIS_Q>, irlDiscountCardsFetcher: BaseIrlDiscountCardFetcher<GIDF_Q>, getFlightFareRulesFetcher: BaseGetFlightFareRulesFetcher<GFFR_Q>, getFlightSeatMapFetcher: BaseGetFlightSeatMapFetcher<GFSM_Q>, getRailLiveDeparturesFetcher: BaseGetRailLiveDeparturesFetcher<GRLD_F>, applyHotelRulesFetcher: BaseHotelRulesFetcher<AHR_Q>, applyFlightRules: BaseApplyJitFlightRulesFetcher<AFR_Q>, getUserFavouriteSearchesFetcher: BaseGetUserFavouriteSearchesFetcher<GUFSF_Q>, deleteFavouriteSearchUpdater: BaseDeleteFavouriteSearchUpdater<DFS_Q>, emailBasketFetcher: BaseEmailBasketFetcher<EB_F>);
|
|
163
|
+
constructor(searchAirportsFetcher: BaseSearchAirportsFetcher<SA_Q>, searchAirlinesFetcher: BaseSearchAirlinesFetcher<SAL_Q>, storageService: BaseStorageService, userService: UserServiceInterface, modalService: BaseModalOpenerService, router: Router, helpers: BaseHelperRoutines, hotelAvalibilityService: BaseHotelAvalibilityService<HA_Q>, citiesFetcher: BaseSearchCityFetcher<SC_Q>, confermaCitiesFetcher: BaseSearchConfermaCityFetcher<SCC_Q>, postcodeFetcher: BaseSearchPostcodeFetcher<SP_Q>, railStationFetcher: BaseSearchRailStationsFetcher<SR_Q>, saveUserAddressUpdater: BaseSaveUserAddressUpdater<SUA_Q>, userAddressesFetcher: BaseUserAddressesFetcher<SU_Q>, basketService: EnterpriseBasketServiceInterface, getUserCompanyOfficesFetcher: BaseGetUserCompanyOfficesFetcher<GUCO_Q>, searchHotelChainsFetcher: BaseSearchHotelChainsFetcher<SHC_Q>, getConfermaRoomImagesFetcher: BaseGetConfermaRoomImagesFetcher<GCRI_Q>, baseValidateIsPostcodeValidTester: BaseValidateIsPostcodeValidTester<IPV_Q>, depotFetcher: BaseSearchDepotFetcher<SD_Q>, confermaOfficeNamesFetcher: BaseConfermaOfficeNamesFetcher<GON_Q>, confermaOfficeFetcher: BaseConfermaOfficeFetcher<CO_Q>, baseDeleteUserAddressUpdater: BaseDeleteUserAddressUpdater<DUA_Q>, baseDeleteRecentSearchUpdater: BaseDeleteRecentSearchUpdater<DRS_Q>, baseSaveRecentSearchUpdater: BaseSaveRecentSearchUpdater<SRS_Q>, getUserCurrentCarbonAllowanceFetcher: BaseGetUserCurrentCarbonAllowanceFetcher<UCA_Q>, baseSaveFavouriteSearchUpdater: BaseSaveFavouriteSearchUpdater<SFS_Q>, environment: BaseEnvironment, loungeFetcher: BaseLoungeQuoteFetcher<SL_Q>, parkingFetcher: BaseParkingQuoteFetcher<SPA_Q>, httpCallService: AbstractHttpCallService, flightFetcher: BaseFlightQuoteFetcher<SFL_Q>, hotelFetcher: BaseHotelQuoteFetcher<SHO_Q>, carhireFetcher: BaseCarhireQuoteFetcher<SCH_Q>, carHireAvailabilityDetailFetcher: BaseCarHireAvailabilityDetailFetcher<CHAD_Q>, cabhireFetcher: BaseCabhireQuoteFetcher<STH_Q>, railFetcher: BaseRailQuoteFetcher<SRA_Q>, irlFetcher: BaseIrlQuoteFetcher<SI_Q>, getRailStationFetcher: BaseGetRailStationFetcher<GRS_Q>, baseWebTokenService: BaseWebTokenService, riskAlertsFetcher: BaseGetRiskAlertsFetcher<GRA_Q>, quicklistFetcher: BaseSearchConfermaQuicklistFetcher<QL_Q>, getUserRecentSearchesFetcher: BaseGetUserRecentSearchesFetcher<GURSF_Q>, getRailCardsFetcher: BaseGetRailcardsFetcher<GRCF_Q>, getCovidMicrositeTokenFetcher: BaseGetCovidMicrositeTokenFetcher<GCMTF_Q>, eurostarFetcher: BaseEurostarQuoteFetcher<SE_Q>, searchUsersCanBookForFetcher: BaseSearchUsersCanBookForFetcher<SUCBF>, searchIrlStationsFetcher: BaseSearchIrlStationsFetcher<SIS_Q>, irlDiscountCardsFetcher: BaseIrlDiscountCardFetcher<GIDF_Q>, getFlightFareRulesFetcher: BaseGetFlightFareRulesFetcher<GFFR_Q>, getFlightSeatMapFetcher: BaseGetFlightSeatMapFetcher<GFSM_Q>, getRailLiveDeparturesFetcher: BaseGetRailLiveDeparturesFetcher<GRLD_F>, applyHotelRulesFetcher: BaseHotelRulesFetcher<AHR_Q>, applyFlightRules: BaseApplyJitFlightRulesFetcher<AFR_Q>, getUserFavouriteSearchesFetcher: BaseGetUserFavouriteSearchesFetcher<GUFSF_Q>, deleteFavouriteSearchUpdater: BaseDeleteFavouriteSearchUpdater<DFS_Q>, emailBasketFetcher: BaseEmailBasketFetcher<EB_F>, fasttrackFetcher: BaseFastTrackQuoteFetcher<FTQ_Q>, sendOfflineNotificationFetcher: BaseSendOfflineNotificationFetcher<SON_Q>, getHotelChainsFetcher: BaseGetHotelChainsFetcher<GHT_Q>, getRailProvidersFetcher: BaseGetRailProvidersFetcher<GRP_Q>, getAllAirlinesFetcher: BaseGetAllAirlinesFetcher<GAA_Q>, getCarHireProvidersFetcher: BaseGetCarHireProvidersFetcher<GCHP_Q>);
|
|
164
|
+
ngOnDestroy(): void;
|
|
149
165
|
reset(): void;
|
|
150
166
|
resetAllSearchItems(): void;
|
|
151
167
|
getUserCurrentCarbonAllowance(user?: string, isLoading?: BehaviorSubject<boolean>): Observable<CarbonAllowance>;
|
|
@@ -224,6 +240,10 @@ export declare class BaseEnterpriseSearchService<SP_Q extends SearchPostcodesQuo
|
|
|
224
240
|
getHotelChain(term: string, isLoading?: BehaviorSubject<boolean>): Observable<any[]>;
|
|
225
241
|
getOfficeNames(isLoading?: BehaviorSubject<boolean>): Observable<ConfermaOfficeNames[]>;
|
|
226
242
|
getOffice(officeId: number): Observable<ConfermaOfficeInfo>;
|
|
243
|
+
getAllHotelChains(): Observable<any[]>;
|
|
244
|
+
getAllRailProviders(): Observable<any[]>;
|
|
245
|
+
getCarHireProivders(): Observable<any[]>;
|
|
246
|
+
getAllAirlines(): Observable<any[]>;
|
|
227
247
|
getRailCards(): Observable<ReferenceRailCardQualifier[]>;
|
|
228
248
|
getAirportByCode(code: string): Observable<AirportSearchResults>;
|
|
229
249
|
init_search_objects(): SearchObjects;
|
|
@@ -250,6 +270,7 @@ export declare class BaseEnterpriseSearchService<SP_Q extends SearchPostcodesQuo
|
|
|
250
270
|
makeRailQuery(...args: any): RailTempParams;
|
|
251
271
|
makeIrlQuery(...args: any): IrlTempParams;
|
|
252
272
|
makeEurostarQuery(...args: any): EurostarTempParams;
|
|
273
|
+
makeFastTrackQuery(...args: any): FastTrackTempParams;
|
|
253
274
|
shouldAddTravellerSubscription(): boolean;
|
|
254
275
|
getAutoLogoutConfig(): {};
|
|
255
276
|
/**
|
|
@@ -278,4 +299,6 @@ export declare class BaseEnterpriseSearchService<SP_Q extends SearchPostcodesQuo
|
|
|
278
299
|
saveFavouriteSearch(search: SaveFavouriteSearchMutationVariables): Observable<SaveFavouriteSearchResult>;
|
|
279
300
|
getConfermaRoomImages(hotelId: string): Observable<String[]>;
|
|
280
301
|
emailBasket(id: string): Observable<Basket>;
|
|
302
|
+
submitIrlForm(): void;
|
|
303
|
+
sendOfflineNotification(jrfReference: any): Observable<IrlOfflineNotifyResult>;
|
|
281
304
|
}
|
|
@@ -8,23 +8,27 @@ import { BaseGetUserFetcher, SearchGetUserFetcherType } from '../fetchers/user-f
|
|
|
8
8
|
import { FullUserDetails, UserServiceInterface } from '../interfaces/Iuser.service';
|
|
9
9
|
import { UserData } from '../interfaces/user.data';
|
|
10
10
|
import { Traveller } from '../models/traveller.object';
|
|
11
|
-
import { BookerType, Message, Service, ServiceType } from '../types/graphql.types';
|
|
11
|
+
import { Document, BookerType, Message, MutationEditUserArgs, Service, ServiceType, User, DocType } from '../types/graphql.types';
|
|
12
12
|
import { ServiceProvider } from '../types/types';
|
|
13
13
|
import { BaseStorageService } from './storage.service';
|
|
14
14
|
export declare const USER_SIGNEDOUT = "USER_SIGNEDOUT";
|
|
15
15
|
export declare const USER_SIGNEDIN = "USER_SIGNEDIN";
|
|
16
16
|
import { BaseConfirmMessagesUpdater, ConfirmMessagesFetcherType } from '../updaters/confirm-messages-updater';
|
|
17
|
-
|
|
17
|
+
import { BaseSetUserLanguageUpdater, SetUserLanguageFetcherType } from '../updaters/set-user-language-updater';
|
|
18
|
+
import { BaseEditUserUpdater, EditUserFetcherType } from '../updaters/edit-user-updater';
|
|
19
|
+
export declare class BaseUserService<GU_Q extends SearchGetUserFetcherType, UC_Q extends UserUiConfigsFetcherType, US_Q extends UserProductsFetcherType, UM_Q extends UserMessageFetcherType, CMU_Q extends ConfirmMessagesFetcherType, SLU_Q extends SetUserLanguageFetcherType, EUU_Q extends EditUserFetcherType> implements UserServiceInterface {
|
|
18
20
|
private getUserFetcher;
|
|
19
21
|
private userUiConfigsFetcher;
|
|
20
22
|
private userProductsFetcher;
|
|
21
23
|
private userMessagesFetcher;
|
|
22
24
|
private baseConfirmMessagesUpdater;
|
|
25
|
+
private setUserLanguageUpdater;
|
|
26
|
+
private editUserUpdater;
|
|
23
27
|
private storageService;
|
|
24
28
|
private helpers;
|
|
25
29
|
fullUserDetails: FullUserDetails;
|
|
26
30
|
changeUser: BehaviorSubject<FullUserDetails>;
|
|
27
|
-
constructor(getUserFetcher: BaseGetUserFetcher<GU_Q>, userUiConfigsFetcher: BaseUserUiConfigsFetcher<UC_Q>, userProductsFetcher: BaseUserProductsFetcher<US_Q>, userMessagesFetcher: BaseUserMessagesFetcher<UM_Q>, baseConfirmMessagesUpdater: BaseConfirmMessagesUpdater<CMU_Q>, storageService: BaseStorageService, helpers: BaseHelperRoutines);
|
|
31
|
+
constructor(getUserFetcher: BaseGetUserFetcher<GU_Q>, userUiConfigsFetcher: BaseUserUiConfigsFetcher<UC_Q>, userProductsFetcher: BaseUserProductsFetcher<US_Q>, userMessagesFetcher: BaseUserMessagesFetcher<UM_Q>, baseConfirmMessagesUpdater: BaseConfirmMessagesUpdater<CMU_Q>, setUserLanguageUpdater: BaseSetUserLanguageUpdater<SLU_Q>, editUserUpdater: BaseEditUserUpdater<EUU_Q>, storageService: BaseStorageService, helpers: BaseHelperRoutines);
|
|
28
32
|
setUser(user_data: UserData): void;
|
|
29
33
|
checkEmitUser(): void;
|
|
30
34
|
getfullUserDetails(admin?: boolean): FullUserDetails | null;
|
|
@@ -45,7 +49,7 @@ export declare class BaseUserService<GU_Q extends SearchGetUserFetcherType, UC_Q
|
|
|
45
49
|
getUsersTitleAndFullName(): string | false;
|
|
46
50
|
getUserFavoriteValue(uf: UserFavorurite, supplier?: Suppliers): string;
|
|
47
51
|
getUserFavoriteObject<T>(uf: UserFavorurite): T;
|
|
48
|
-
getUserFavoriteNumber(uf: UserFavorurite
|
|
52
|
+
getUserFavoriteNumber(uf: UserFavorurite): string;
|
|
49
53
|
isUserFavoriteSet(uf: UserFavorurite, supplier?: Suppliers): boolean;
|
|
50
54
|
/**
|
|
51
55
|
* @desc - create a dummy user for self bookers
|
|
@@ -69,5 +73,8 @@ export declare class BaseUserService<GU_Q extends SearchGetUserFetcherType, UC_Q
|
|
|
69
73
|
findService(id: string): Service;
|
|
70
74
|
getUserMessages(): Observable<Message[]>;
|
|
71
75
|
confirmMessages(id: string | string[]): Observable<boolean>;
|
|
72
|
-
getUser(): Observable<
|
|
76
|
+
getUser(): Observable<User>;
|
|
77
|
+
setUserLanguage(id: string): Observable<User>;
|
|
78
|
+
getDocuments(type: DocType): Observable<Document[]>;
|
|
79
|
+
editUser(user: MutationEditUserArgs): Observable<User>;
|
|
73
80
|
}
|