@sabstravtech/obtservices 0.0.0 → 0.0.1

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.
Files changed (895) hide show
  1. package/dist/obtservices/angular/components/basket-panel.d.ts +34 -0
  2. package/dist/obtservices/angular/components/with-component.d.ts +12 -0
  3. package/dist/obtservices/angular/data.d.ts +5530 -0
  4. package/dist/obtservices/angular/fetchers.d.ts +32 -0
  5. package/dist/obtservices/angular/lib/vendor/classes/environment.d.ts +3 -0
  6. package/dist/obtservices/angular/lib/vendor/classes/event-messenager.d.ts +4 -0
  7. package/dist/obtservices/angular/lib/vendor/classes/helpers.d.ts +15 -0
  8. package/dist/obtservices/angular/lib/vendor/fetchers/basket-fetcher.d.ts +6 -0
  9. package/dist/obtservices/angular/lib/vendor/fetchers/cabhire-quote-fetcher.d.ts +7 -0
  10. package/dist/obtservices/angular/lib/vendor/fetchers/carhire-availability-detail.fetcher.d.ts +7 -0
  11. package/dist/obtservices/angular/lib/vendor/fetchers/carhire-quote-fetcher.d.ts +7 -0
  12. package/dist/obtservices/angular/lib/vendor/fetchers/conferma-office-names.fetcher.d.ts +7 -0
  13. package/dist/obtservices/angular/lib/vendor/fetchers/conferma-quicklist.fetcher.d.ts +7 -0
  14. package/dist/obtservices/angular/lib/vendor/fetchers/eurostar-quote.fetcher.d.ts +7 -0
  15. package/dist/obtservices/angular/lib/vendor/fetchers/flight-quote.fetcher.d.ts +7 -0
  16. package/dist/obtservices/angular/lib/vendor/fetchers/get-rail-cards.fetcher.d.ts +7 -0
  17. package/dist/obtservices/angular/lib/vendor/fetchers/get-rail-station.fetcher.d.ts +7 -0
  18. package/dist/obtservices/angular/lib/vendor/fetchers/get-risk-alerts.fetcher.d.ts +7 -0
  19. package/dist/obtservices/angular/lib/vendor/fetchers/get-user-company-offices.fetcher.d.ts +7 -0
  20. package/dist/obtservices/angular/lib/vendor/fetchers/get-user-current-carbon-allowance.fetcher.d.ts +7 -0
  21. package/dist/obtservices/angular/lib/vendor/fetchers/get-user-recent-searches.fetcher.d.ts +7 -0
  22. package/dist/obtservices/angular/lib/vendor/fetchers/get-users-baskets-fetcher.d.ts +7 -0
  23. package/dist/obtservices/angular/lib/vendor/fetchers/getMiAutoSugestions.fetcher.d.ts +7 -0
  24. package/dist/obtservices/angular/lib/vendor/fetchers/hotel-avaliability-fetcher.d.ts +7 -0
  25. package/dist/obtservices/angular/lib/vendor/fetchers/hotel-quote-fetcher.d.ts +7 -0
  26. package/dist/obtservices/angular/lib/vendor/fetchers/irl-quote-fetcher.d.ts +7 -0
  27. package/dist/obtservices/angular/lib/vendor/fetchers/lounge-quote.fetcher.d.ts +7 -0
  28. package/dist/obtservices/angular/lib/vendor/fetchers/parking-quote-fetcher.d.ts +7 -0
  29. package/dist/obtservices/angular/lib/vendor/fetchers/rail-quote-fetcher.d.ts +7 -0
  30. package/dist/obtservices/angular/lib/vendor/fetchers/search-airlines-fetcher.d.ts +6 -0
  31. package/dist/obtservices/angular/lib/vendor/fetchers/search-airports-fetcher.d.ts +6 -0
  32. package/dist/obtservices/angular/lib/vendor/fetchers/search-cities.fetcher.d.ts +7 -0
  33. package/dist/obtservices/angular/lib/vendor/fetchers/search-conferma-cities.fetcher.d.ts +6 -0
  34. package/dist/obtservices/angular/lib/vendor/fetchers/search-depots.fetcher.d.ts +7 -0
  35. package/dist/obtservices/angular/lib/vendor/fetchers/search-hotel-chains.fetcher.d.ts +7 -0
  36. package/dist/obtservices/angular/lib/vendor/fetchers/search-postcodes.fetcher.d.ts +7 -0
  37. package/dist/obtservices/angular/lib/vendor/fetchers/search-rail-stations.fetcher.d.ts +7 -0
  38. package/dist/obtservices/angular/lib/vendor/fetchers/search-users-can-book-for-fetcher.d.ts +7 -0
  39. package/dist/obtservices/angular/lib/vendor/fetchers/user-addresses.fetcher.d.ts +7 -0
  40. package/dist/obtservices/angular/lib/vendor/fetchers/user-fetcher.d.ts +6 -0
  41. package/dist/obtservices/angular/lib/vendor/fetchers/user-message.fetcher.d.ts +7 -0
  42. package/dist/obtservices/angular/lib/vendor/fetchers/user-products-fetcher.d.ts +7 -0
  43. package/dist/obtservices/angular/lib/vendor/fetchers/user-ui-configs-fetcher.d.ts +7 -0
  44. package/dist/obtservices/angular/lib/vendor/services/enterprise-basket.service.d.ts +29 -0
  45. package/dist/obtservices/angular/lib/vendor/services/hotel-avallibility.service.d.ts +9 -0
  46. package/dist/obtservices/angular/lib/vendor/services/http-call.service.d.ts +48 -0
  47. package/dist/obtservices/angular/lib/vendor/services/logon.service.d.ts +18 -0
  48. package/dist/obtservices/angular/lib/vendor/services/modal-opener.service.d.ts +4 -0
  49. package/dist/obtservices/angular/lib/vendor/services/my-bookings.service.d.ts +7 -0
  50. package/dist/obtservices/angular/lib/vendor/services/route-happy.service.d.ts +6 -0
  51. package/dist/obtservices/angular/lib/vendor/services/search.service.d.ts +47 -0
  52. package/dist/obtservices/angular/lib/vendor/services/storage.service.d.ts +18 -0
  53. package/dist/obtservices/angular/lib/vendor/services/user.service.d.ts +10 -0
  54. package/dist/obtservices/angular/lib/vendor/services/webtoken.service.d.ts +7 -0
  55. package/dist/obtservices/angular/lib/vendor/testers/postcode-validate.tester.d.ts +6 -0
  56. package/dist/obtservices/angular/lib/vendor/testers/validate-mi-free-value.tester.d.ts +6 -0
  57. package/dist/obtservices/angular/lib/vendor/types/graphql.angular.types.d.ts +5915 -0
  58. package/dist/obtservices/angular/lib/vendor/updaters/accept-new-price.updater.d.ts +6 -0
  59. package/dist/obtservices/angular/lib/vendor/updaters/add-item-to-basket.updater.d.ts +6 -0
  60. package/dist/obtservices/angular/lib/vendor/updaters/addUserToBasketItem.d.ts +6 -0
  61. package/dist/obtservices/angular/lib/vendor/updaters/book-basket-updater.d.ts +6 -0
  62. package/dist/obtservices/angular/lib/vendor/updaters/create-basket-updater.d.ts +6 -0
  63. package/dist/obtservices/angular/lib/vendor/updaters/move-basket-item-to-basket.d.ts +6 -0
  64. package/dist/obtservices/angular/lib/vendor/updaters/remove-basket-updater.d.ts +6 -0
  65. package/dist/obtservices/angular/lib/vendor/updaters/remove-item-from-basket.updater.d.ts +6 -0
  66. package/dist/obtservices/angular/lib/vendor/updaters/remove-recent-search.updater.d.ts +6 -0
  67. package/dist/obtservices/angular/lib/vendor/updaters/remove-user-address.updater.d.ts +6 -0
  68. package/dist/obtservices/angular/lib/vendor/updaters/revalidate-basket-updater.d.ts +6 -0
  69. package/dist/obtservices/angular/lib/vendor/updaters/save-recent-search.updater.d.ts +6 -0
  70. package/dist/obtservices/angular/lib/vendor/updaters/save-user-address.updater.d.ts +6 -0
  71. package/dist/obtservices/angular/lib/vendor/updaters/send-basket-for-approval.updater.d.ts +6 -0
  72. package/dist/obtservices/angular/lib/vendor/updaters/set-basket-item-lead-passenger.updater.d.ts +6 -0
  73. package/dist/obtservices/angular/lib/vendor/updaters/set-basket-item-mi-group.d.ts +6 -0
  74. package/dist/obtservices/angular/lib/vendor/updaters/set-basket-item-mi-value-updater.d.ts +6 -0
  75. package/dist/obtservices/angular/lib/vendor/updaters/set-payment-option.updater.d.ts +6 -0
  76. package/dist/obtservices/angular/lib/vendor/updaters/update-basket-notes-updater.d.ts +6 -0
  77. package/dist/obtservices/angular/lib/vendor/updaters/update-basket-title-updater.d.ts +6 -0
  78. package/dist/obtservices/angular/obtservices-angular.d.ts +17 -0
  79. package/dist/obtservices/angular/obtservices-angular.metadata.json +1 -0
  80. package/dist/obtservices/angular/obtservices.module.d.ts +7 -0
  81. package/dist/obtservices/angular/package.json +11 -0
  82. package/dist/obtservices/base/fetchers.d.ts +36 -0
  83. package/dist/obtservices/base/lib/vendor/classes/base-enterprise.d.ts +39 -0
  84. package/dist/obtservices/base/lib/vendor/classes/base-network-call.d.ts +10 -0
  85. package/dist/obtservices/base/lib/vendor/classes/basket-info-mi-details.impl.d.ts +20 -0
  86. package/dist/obtservices/base/lib/vendor/classes/bookable-basket.d.ts +40 -0
  87. package/dist/obtservices/base/lib/vendor/classes/cabhire-enterprise-search.d.ts +138 -0
  88. package/dist/obtservices/base/lib/vendor/classes/carhire-enterprise-search.d.ts +203 -0
  89. package/dist/obtservices/base/lib/vendor/classes/enviroment.d.ts +24 -0
  90. package/dist/obtservices/base/lib/vendor/classes/eurostar-enterprise-search.d.ts +268 -0
  91. package/dist/obtservices/base/lib/vendor/classes/eurostar-search-type.enum.d.ts +4 -0
  92. package/dist/obtservices/base/lib/vendor/classes/event-messenager.d.ts +12 -0
  93. package/dist/obtservices/base/lib/vendor/classes/flight-enterprise-search.d.ts +251 -0
  94. package/dist/obtservices/base/lib/vendor/classes/flight-search-type.enum.d.ts +5 -0
  95. package/dist/obtservices/base/lib/vendor/classes/helpers.d.ts +173 -0
  96. package/dist/obtservices/base/lib/vendor/classes/hotel-enterprise-search.d.ts +176 -0
  97. package/dist/obtservices/base/lib/vendor/classes/irl-enterprise-search.d.ts +139 -0
  98. package/dist/obtservices/base/lib/vendor/classes/limited-cache.class.d.ts +21 -0
  99. package/dist/obtservices/base/lib/vendor/classes/lounges-enterprise-search.d.ts +68 -0
  100. package/dist/obtservices/base/lib/vendor/classes/management-info-and-valid.d.ts +41 -0
  101. package/dist/obtservices/base/lib/vendor/classes/modal-types.enum.d.ts +12 -0
  102. package/dist/obtservices/base/lib/vendor/classes/parking-enterprise-search.d.ts +103 -0
  103. package/dist/obtservices/base/lib/vendor/classes/rail-direction.enum.d.ts +4 -0
  104. package/dist/obtservices/base/lib/vendor/classes/rail-enterprise-search.d.ts +193 -0
  105. package/dist/obtservices/base/lib/vendor/classes/routehappy-request.d.ts +126 -0
  106. package/dist/obtservices/base/lib/vendor/classes/routehappy-response.d.ts +107 -0
  107. package/dist/obtservices/base/lib/vendor/classes/supplementary-booking-info-impl.d.ts +62 -0
  108. package/dist/obtservices/base/lib/vendor/classes/user-favourite.enum.d.ts +12 -0
  109. package/dist/obtservices/base/lib/vendor/classes/validator.checker.d.ts +6 -0
  110. package/dist/obtservices/base/lib/vendor/fetchers/basket-fetcher.d.ts +20 -0
  111. package/dist/obtservices/base/lib/vendor/fetchers/cabhire-quote-fetcher.d.ts +23 -0
  112. package/dist/obtservices/base/lib/vendor/fetchers/carhire-availability-detail.fetcher.d.ts +20 -0
  113. package/dist/obtservices/base/lib/vendor/fetchers/carhire-quote-fetcher.d.ts +23 -0
  114. package/dist/obtservices/base/lib/vendor/fetchers/conferma-office-names.fetcher.d.ts +21 -0
  115. package/dist/obtservices/base/lib/vendor/fetchers/conferma-quicklist.fetcher.d.ts +23 -0
  116. package/dist/obtservices/base/lib/vendor/fetchers/eurostar-quote.fetcher.d.ts +23 -0
  117. package/dist/obtservices/base/lib/vendor/fetchers/flight-quote.fetcher.d.ts +23 -0
  118. package/dist/obtservices/base/lib/vendor/fetchers/get-rail-cards.fetcher.d.ts +21 -0
  119. package/dist/obtservices/base/lib/vendor/fetchers/get-rail-station.fetcher.d.ts +21 -0
  120. package/dist/obtservices/base/lib/vendor/fetchers/get-risk-alerts.fetcher.d.ts +21 -0
  121. package/dist/obtservices/base/lib/vendor/fetchers/get-user-company-offices.fetcher.d.ts +21 -0
  122. package/dist/obtservices/base/lib/vendor/fetchers/get-user-current-carbon-allowance.fetcher.d.ts +20 -0
  123. package/dist/obtservices/base/lib/vendor/fetchers/get-user-recent-searches.fetcher.d.ts +21 -0
  124. package/dist/obtservices/base/lib/vendor/fetchers/get-users-baskets-fetcher.d.ts +21 -0
  125. package/dist/obtservices/base/lib/vendor/fetchers/getMiAutoSugestions.fetcher.d.ts +21 -0
  126. package/dist/obtservices/base/lib/vendor/fetchers/hotel-avaliability-fetcher.d.ts +24 -0
  127. package/dist/obtservices/base/lib/vendor/fetchers/hotel-quote-fetcher.d.ts +23 -0
  128. package/dist/obtservices/base/lib/vendor/fetchers/irl-quote-fetcher.d.ts +23 -0
  129. package/dist/obtservices/base/lib/vendor/fetchers/list-fetchable-enterprise.d.ts +20 -0
  130. package/dist/obtservices/base/lib/vendor/fetchers/lounge-quote.fetcher.d.ts +23 -0
  131. package/dist/obtservices/base/lib/vendor/fetchers/object-fetchable-enterprise.d.ts +11 -0
  132. package/dist/obtservices/base/lib/vendor/fetchers/parking-quote-fetcher.d.ts +23 -0
  133. package/dist/obtservices/base/lib/vendor/fetchers/rail-quote-fetcher.d.ts +23 -0
  134. package/dist/obtservices/base/lib/vendor/fetchers/search-airlines.fetcher.d.ts +20 -0
  135. package/dist/obtservices/base/lib/vendor/fetchers/search-airports-fetcher.d.ts +20 -0
  136. package/dist/obtservices/base/lib/vendor/fetchers/search-cities.fetcher.d.ts +21 -0
  137. package/dist/obtservices/base/lib/vendor/fetchers/search-conferma-cities.fetcher.d.ts +20 -0
  138. package/dist/obtservices/base/lib/vendor/fetchers/search-depots.fetcher.d.ts +20 -0
  139. package/dist/obtservices/base/lib/vendor/fetchers/search-hotel-chains.fetcher.d.ts +21 -0
  140. package/dist/obtservices/base/lib/vendor/fetchers/search-postcodes.fetcher.d.ts +21 -0
  141. package/dist/obtservices/base/lib/vendor/fetchers/search-rail-stations.fetcher.d.ts +21 -0
  142. package/dist/obtservices/base/lib/vendor/fetchers/search-users-can-book-for-fetcher.d.ts +21 -0
  143. package/dist/obtservices/base/lib/vendor/fetchers/user-addresses.fetcher.d.ts +21 -0
  144. package/dist/obtservices/base/lib/vendor/fetchers/user-fetcher.d.ts +20 -0
  145. package/dist/obtservices/base/lib/vendor/fetchers/user-message.fetcher.d.ts +21 -0
  146. package/dist/obtservices/base/lib/vendor/fetchers/user-products-fetcher.d.ts +21 -0
  147. package/dist/obtservices/base/lib/vendor/fetchers/user-ui-configs-fetcher.d.ts +23 -0
  148. package/dist/obtservices/base/lib/vendor/interfaces/Icabhire-enterprise-search.d.ts +133 -0
  149. package/dist/obtservices/base/lib/vendor/interfaces/Icarhire-enterprise-search.d.ts +99 -0
  150. package/dist/obtservices/base/lib/vendor/interfaces/Ienterprise-basket.service.d.ts +64 -0
  151. package/dist/obtservices/base/lib/vendor/interfaces/Ieurostar-enterprise-search.d.ts +124 -0
  152. package/dist/obtservices/base/lib/vendor/interfaces/Iflight-enterprise-search.d.ts +123 -0
  153. package/dist/obtservices/base/lib/vendor/interfaces/Ihotel-enterprise-search.d.ts +192 -0
  154. package/dist/obtservices/base/lib/vendor/interfaces/Iirl-enterprise-search.d.ts +45 -0
  155. package/dist/obtservices/base/lib/vendor/interfaces/Ilounges-enterprise-search.d.ts +36 -0
  156. package/dist/obtservices/base/lib/vendor/interfaces/Imybookings.service.d.ts +24 -0
  157. package/dist/obtservices/base/lib/vendor/interfaces/Iparking-enterprise-search.d.ts +58 -0
  158. package/dist/obtservices/base/lib/vendor/interfaces/Irail-enterprise-search.d.ts +110 -0
  159. package/dist/obtservices/base/lib/vendor/interfaces/Isearch.service.d.ts +101 -0
  160. package/dist/obtservices/base/lib/vendor/interfaces/Isupplementary-booking-info-impl.d.ts +42 -0
  161. package/dist/obtservices/base/lib/vendor/interfaces/Iuser.service.d.ts +59 -0
  162. package/dist/obtservices/base/lib/vendor/interfaces/car-hire-classes.interface.d.ts +7 -0
  163. package/dist/obtservices/base/lib/vendor/interfaces/car-hire-filters.interface.d.ts +10 -0
  164. package/dist/obtservices/base/lib/vendor/interfaces/car-hire-sort.interface.d.ts +4 -0
  165. package/dist/obtservices/base/lib/vendor/interfaces/cheapest-price.d.ts +4 -0
  166. package/dist/obtservices/base/lib/vendor/interfaces/code-name.d.ts +4 -0
  167. package/dist/obtservices/base/lib/vendor/interfaces/flight-filters.interface.d.ts +29 -0
  168. package/dist/obtservices/base/lib/vendor/interfaces/flight-multi-destination.interface.d.ts +7 -0
  169. package/dist/obtservices/base/lib/vendor/interfaces/rail-airport-express-stations.interface.d.ts +4 -0
  170. package/dist/obtservices/base/lib/vendor/interfaces/rail-basket-item.interface.d.ts +69 -0
  171. package/dist/obtservices/base/lib/vendor/interfaces/rail-journey-leg.interface.d.ts +6 -0
  172. package/dist/obtservices/base/lib/vendor/interfaces/rail-recent-search-args.interface.d.ts +19 -0
  173. package/dist/obtservices/base/lib/vendor/interfaces/rail-selected-ticket.interface.d.ts +10 -0
  174. package/dist/obtservices/base/lib/vendor/interfaces/rail-ticket-group.interface.d.ts +26 -0
  175. package/dist/obtservices/base/lib/vendor/interfaces/rail-ticket-groups.interface.d.ts +4 -0
  176. package/dist/obtservices/base/lib/vendor/interfaces/search-objects.interface.d.ts +16 -0
  177. package/dist/obtservices/base/lib/vendor/interfaces/select-filter.interface.d.ts +5 -0
  178. package/dist/obtservices/base/lib/vendor/interfaces/user.data.d.ts +21 -0
  179. package/dist/obtservices/base/lib/vendor/interfaces/value-display.d.ts +4 -0
  180. package/dist/obtservices/base/lib/vendor/models/login.model.d.ts +52 -0
  181. package/dist/obtservices/base/lib/vendor/models/regexp.model.d.ts +10 -0
  182. package/dist/obtservices/base/lib/vendor/models/traveller.object.d.ts +22 -0
  183. package/dist/obtservices/base/lib/vendor/services/enterprise-basket.service.d.ts +177 -0
  184. package/dist/obtservices/base/lib/vendor/services/hotel-avallibility.service.d.ts +31 -0
  185. package/dist/obtservices/base/lib/vendor/services/http-call.service.d.ts +17 -0
  186. package/dist/obtservices/base/lib/vendor/services/logon.service.d.ts +39 -0
  187. package/dist/obtservices/base/lib/vendor/services/modal-opener.service.d.ts +13 -0
  188. package/dist/obtservices/base/lib/vendor/services/my-bookings.service.d.ts +31 -0
  189. package/dist/obtservices/base/lib/vendor/services/routehappy.service.d.ts +47 -0
  190. package/dist/obtservices/base/lib/vendor/services/search.service.d.ts +236 -0
  191. package/dist/obtservices/base/lib/vendor/services/storage.service.d.ts +9 -0
  192. package/dist/obtservices/base/lib/vendor/services/url.service.d.ts +10 -0
  193. package/dist/obtservices/base/lib/vendor/services/user.service.d.ts +62 -0
  194. package/dist/obtservices/base/lib/vendor/services/webtoken.service.d.ts +20 -0
  195. package/dist/obtservices/base/lib/vendor/testers/base.tester.d.ts +11 -0
  196. package/dist/obtservices/base/lib/vendor/testers/postcode-validate.tester.d.ts +17 -0
  197. package/dist/obtservices/base/lib/vendor/testers/validate-mi-free-value.tester.d.ts +17 -0
  198. package/dist/obtservices/base/lib/vendor/types/graphql.types.d.ts +5597 -0
  199. package/dist/obtservices/base/lib/vendor/types/types.d.ts +444 -0
  200. package/dist/obtservices/base/lib/vendor/updaters/accept-new-price.updater.d.ts +20 -0
  201. package/dist/obtservices/base/lib/vendor/updaters/add-item-to-basket.updater.d.ts +20 -0
  202. package/dist/obtservices/base/lib/vendor/updaters/addUserToBasketItem.d.ts +20 -0
  203. package/dist/obtservices/base/lib/vendor/updaters/book-basket-updater.d.ts +20 -0
  204. package/dist/obtservices/base/lib/vendor/updaters/create-basket-updater.d.ts +20 -0
  205. package/dist/obtservices/base/lib/vendor/updaters/move-basket-item-to-basket.d.ts +20 -0
  206. package/dist/obtservices/base/lib/vendor/updaters/object-updater-enterprise.d.ts +11 -0
  207. package/dist/obtservices/base/lib/vendor/updaters/remove-basket-updater.d.ts +19 -0
  208. package/dist/obtservices/base/lib/vendor/updaters/remove-item-from-basket.updater.d.ts +20 -0
  209. package/dist/obtservices/base/lib/vendor/updaters/remove-recent-search-updater.d.ts +19 -0
  210. package/dist/obtservices/base/lib/vendor/updaters/remove-user-address-updater.d.ts +19 -0
  211. package/dist/obtservices/base/lib/vendor/updaters/revalidate-basket-updater.d.ts +20 -0
  212. package/dist/obtservices/base/lib/vendor/updaters/save-recent-search-updater.d.ts +20 -0
  213. package/dist/obtservices/base/lib/vendor/updaters/save-user-address.updater.d.ts +20 -0
  214. package/dist/obtservices/base/lib/vendor/updaters/send-basket-for-approval.updater.d.ts +20 -0
  215. package/dist/obtservices/base/lib/vendor/updaters/set-basket-item-lead-passenger.updater.d.ts +20 -0
  216. package/dist/obtservices/base/lib/vendor/updaters/set-basket-item-mi-group.d.ts +20 -0
  217. package/dist/obtservices/base/lib/vendor/updaters/set-basket-item-mi-value-updater.d.ts +20 -0
  218. package/dist/obtservices/base/lib/vendor/updaters/set-basket-item-paymenr-option.updater.d.ts +20 -0
  219. package/dist/obtservices/base/lib/vendor/updaters/update-basket-notes-updater.d.ts +20 -0
  220. package/dist/obtservices/base/lib/vendor/updaters/update-basket-title-updater.d.ts +20 -0
  221. package/dist/obtservices/base/obtservices-base.d.ts +9 -0
  222. package/dist/obtservices/base/obtservices-base.metadata.json +1 -0
  223. package/dist/obtservices/base/package.json +11 -0
  224. package/dist/obtservices/bundles/obtservices-angular.umd.js +32033 -0
  225. package/dist/obtservices/bundles/obtservices-angular.umd.js.map +1 -0
  226. package/dist/obtservices/bundles/obtservices-angular.umd.min.js +2 -0
  227. package/dist/obtservices/bundles/obtservices-angular.umd.min.js.map +1 -0
  228. package/dist/obtservices/bundles/obtservices-base.umd.js +18609 -0
  229. package/dist/obtservices/bundles/obtservices-base.umd.js.map +1 -0
  230. package/dist/obtservices/bundles/obtservices-base.umd.min.js +16 -0
  231. package/dist/obtservices/bundles/obtservices-base.umd.min.js.map +1 -0
  232. package/dist/obtservices/bundles/obtservices.umd.js +18 -0
  233. package/dist/obtservices/bundles/obtservices.umd.js.map +1 -0
  234. package/dist/obtservices/bundles/obtservices.umd.min.js +2 -0
  235. package/dist/obtservices/bundles/obtservices.umd.min.js.map +1 -0
  236. package/dist/obtservices/esm2015/angular/classes.js +4 -0
  237. package/dist/obtservices/esm2015/angular/components/basket-panel.js +113 -0
  238. package/dist/obtservices/esm2015/angular/components/with-component.js +26 -0
  239. package/dist/obtservices/esm2015/angular/components.js +3 -0
  240. package/dist/obtservices/esm2015/angular/data.js +5 -0
  241. package/dist/obtservices/esm2015/angular/fetchers.js +33 -0
  242. package/dist/obtservices/esm2015/angular/lib/vendor/classes/environment.js +10 -0
  243. package/dist/obtservices/esm2015/angular/lib/vendor/classes/event-messenager.js +16 -0
  244. package/dist/obtservices/esm2015/angular/lib/vendor/classes/helpers.js +81 -0
  245. package/dist/obtservices/esm2015/angular/lib/vendor/data/airports.data.json +5508 -0
  246. package/dist/obtservices/esm2015/angular/lib/vendor/data/flight-booking.data.json +136 -0
  247. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/basket-fetcher.js +22 -0
  248. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/cabhire-quote-fetcher.js +25 -0
  249. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/carhire-availability-detail.fetcher.js +25 -0
  250. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/carhire-quote-fetcher.js +25 -0
  251. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/conferma-office-names.fetcher.js +25 -0
  252. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/conferma-quicklist.fetcher.js +25 -0
  253. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/eurostar-quote.fetcher.js +25 -0
  254. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/flight-quote.fetcher.js +25 -0
  255. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/get-rail-cards.fetcher.js +25 -0
  256. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/get-rail-station.fetcher.js +25 -0
  257. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/get-risk-alerts.fetcher.js +25 -0
  258. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/get-user-company-offices.fetcher.js +25 -0
  259. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/get-user-current-carbon-allowance.fetcher.js +25 -0
  260. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/get-user-recent-searches.fetcher.js +25 -0
  261. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/get-users-baskets-fetcher.js +25 -0
  262. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/getMiAutoSugestions.fetcher.js +25 -0
  263. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/hotel-avaliability-fetcher.js +25 -0
  264. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/hotel-quote-fetcher.js +25 -0
  265. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/irl-quote-fetcher.js +25 -0
  266. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/lounge-quote.fetcher.js +25 -0
  267. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/parking-quote-fetcher.js +25 -0
  268. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/rail-quote-fetcher.js +25 -0
  269. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/search-airlines-fetcher.js +22 -0
  270. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/search-airports-fetcher.js +22 -0
  271. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/search-cities.fetcher.js +25 -0
  272. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/search-conferma-cities.fetcher.js +22 -0
  273. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/search-depots.fetcher.js +25 -0
  274. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/search-hotel-chains.fetcher.js +25 -0
  275. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/search-postcodes.fetcher.js +25 -0
  276. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/search-rail-stations.fetcher.js +25 -0
  277. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/search-users-can-book-for-fetcher.js +25 -0
  278. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/user-addresses.fetcher.js +25 -0
  279. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/user-fetcher.js +22 -0
  280. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/user-message.fetcher.js +25 -0
  281. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/user-products-fetcher.js +25 -0
  282. package/dist/obtservices/esm2015/angular/lib/vendor/fetchers/user-ui-configs-fetcher.js +25 -0
  283. package/dist/obtservices/esm2015/angular/lib/vendor/services/enterprise-basket.service.js +91 -0
  284. package/dist/obtservices/esm2015/angular/lib/vendor/services/hotel-avallibility.service.js +28 -0
  285. package/dist/obtservices/esm2015/angular/lib/vendor/services/http-call.service.js +220 -0
  286. package/dist/obtservices/esm2015/angular/lib/vendor/services/logon.service.js +41 -0
  287. package/dist/obtservices/esm2015/angular/lib/vendor/services/modal-opener.service.js +15 -0
  288. package/dist/obtservices/esm2015/angular/lib/vendor/services/my-bookings.service.js +22 -0
  289. package/dist/obtservices/esm2015/angular/lib/vendor/services/route-happy.service.js +22 -0
  290. package/dist/obtservices/esm2015/angular/lib/vendor/services/search.service.js +142 -0
  291. package/dist/obtservices/esm2015/angular/lib/vendor/services/storage.service.js +79 -0
  292. package/dist/obtservices/esm2015/angular/lib/vendor/services/user.service.js +31 -0
  293. package/dist/obtservices/esm2015/angular/lib/vendor/services/webtoken.service.js +59 -0
  294. package/dist/obtservices/esm2015/angular/lib/vendor/testers/postcode-validate.tester.js +22 -0
  295. package/dist/obtservices/esm2015/angular/lib/vendor/testers/validate-mi-free-value.tester.js +22 -0
  296. package/dist/obtservices/esm2015/angular/lib/vendor/types/graphql.angular.types.js +5662 -0
  297. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/accept-new-price.updater.js +22 -0
  298. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/add-item-to-basket.updater.js +22 -0
  299. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/addUserToBasketItem.js +22 -0
  300. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/book-basket-updater.js +22 -0
  301. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/create-basket-updater.js +22 -0
  302. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/move-basket-item-to-basket.js +22 -0
  303. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/remove-basket-updater.js +22 -0
  304. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/remove-item-from-basket.updater.js +22 -0
  305. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/remove-recent-search.updater.js +22 -0
  306. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/remove-user-address.updater.js +22 -0
  307. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/revalidate-basket-updater.js +22 -0
  308. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/save-recent-search.updater.js +22 -0
  309. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/save-user-address.updater.js +22 -0
  310. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/send-basket-for-approval.updater.js +22 -0
  311. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/set-basket-item-lead-passenger.updater.js +22 -0
  312. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/set-basket-item-mi-group.js +22 -0
  313. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/set-basket-item-mi-value-updater.js +22 -0
  314. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/set-payment-option.updater.js +22 -0
  315. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/update-basket-notes-updater.js +22 -0
  316. package/dist/obtservices/esm2015/angular/lib/vendor/updaters/update-basket-title-updater.js +22 -0
  317. package/dist/obtservices/esm2015/angular/obtservices-angular.js +18 -0
  318. package/dist/obtservices/esm2015/angular/obtservices.module.js +128 -0
  319. package/dist/obtservices/esm2015/angular/public_api.js +9 -0
  320. package/dist/obtservices/esm2015/angular/services.js +12 -0
  321. package/dist/obtservices/esm2015/angular/types.js +2 -0
  322. package/dist/obtservices/esm2015/angular/updaters.js +14 -0
  323. package/dist/obtservices/esm2015/base/classes.js +28 -0
  324. package/dist/obtservices/esm2015/base/fetchers.js +37 -0
  325. package/dist/obtservices/esm2015/base/interfaces.js +30 -0
  326. package/dist/obtservices/esm2015/base/lib/vendor/classes/base-enterprise.js +78 -0
  327. package/dist/obtservices/esm2015/base/lib/vendor/classes/base-network-call.js +24 -0
  328. package/dist/obtservices/esm2015/base/lib/vendor/classes/basket-info-mi-details.impl.js +35 -0
  329. package/dist/obtservices/esm2015/base/lib/vendor/classes/bookable-basket.js +237 -0
  330. package/dist/obtservices/esm2015/base/lib/vendor/classes/cabhire-enterprise-search.js +696 -0
  331. package/dist/obtservices/esm2015/base/lib/vendor/classes/carhire-enterprise-search.js +1204 -0
  332. package/dist/obtservices/esm2015/base/lib/vendor/classes/enviroment.js +12 -0
  333. package/dist/obtservices/esm2015/base/lib/vendor/classes/eurostar-enterprise-search.js +1462 -0
  334. package/dist/obtservices/esm2015/base/lib/vendor/classes/eurostar-search-type.enum.js +6 -0
  335. package/dist/obtservices/esm2015/base/lib/vendor/classes/event-messenager.js +17 -0
  336. package/dist/obtservices/esm2015/base/lib/vendor/classes/flight-enterprise-search.js +1640 -0
  337. package/dist/obtservices/esm2015/base/lib/vendor/classes/flight-search-type.enum.js +7 -0
  338. package/dist/obtservices/esm2015/base/lib/vendor/classes/helpers.js +978 -0
  339. package/dist/obtservices/esm2015/base/lib/vendor/classes/hotel-enterprise-search.js +1022 -0
  340. package/dist/obtservices/esm2015/base/lib/vendor/classes/irl-enterprise-search.js +1117 -0
  341. package/dist/obtservices/esm2015/base/lib/vendor/classes/limited-cache.class.js +64 -0
  342. package/dist/obtservices/esm2015/base/lib/vendor/classes/lounges-enterprise-search.js +323 -0
  343. package/dist/obtservices/esm2015/base/lib/vendor/classes/management-info-and-valid.js +174 -0
  344. package/dist/obtservices/esm2015/base/lib/vendor/classes/modal-types.enum.js +22 -0
  345. package/dist/obtservices/esm2015/base/lib/vendor/classes/parking-enterprise-search.js +397 -0
  346. package/dist/obtservices/esm2015/base/lib/vendor/classes/rail-direction.enum.js +6 -0
  347. package/dist/obtservices/esm2015/base/lib/vendor/classes/rail-enterprise-search.js +1324 -0
  348. package/dist/obtservices/esm2015/base/lib/vendor/classes/routehappy-request.js +2 -0
  349. package/dist/obtservices/esm2015/base/lib/vendor/classes/routehappy-response.js +8 -0
  350. package/dist/obtservices/esm2015/base/lib/vendor/classes/supplementary-booking-info-impl.js +250 -0
  351. package/dist/obtservices/esm2015/base/lib/vendor/classes/user-favourite.enum.js +15 -0
  352. package/dist/obtservices/esm2015/base/lib/vendor/classes/validator.checker.js +4 -0
  353. package/dist/obtservices/esm2015/base/lib/vendor/data/countries.json +1212 -0
  354. package/dist/obtservices/esm2015/base/lib/vendor/data/euro-stations.json +30 -0
  355. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/basket-fetcher.js +11 -0
  356. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/cabhire-quote-fetcher.js +11 -0
  357. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/carhire-availability-detail.fetcher.js +10 -0
  358. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/carhire-quote-fetcher.js +11 -0
  359. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/conferma-office-names.fetcher.js +11 -0
  360. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/conferma-quicklist.fetcher.js +11 -0
  361. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/eurostar-quote.fetcher.js +11 -0
  362. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/flight-quote.fetcher.js +11 -0
  363. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/get-rail-cards.fetcher.js +11 -0
  364. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/get-rail-station.fetcher.js +11 -0
  365. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/get-risk-alerts.fetcher.js +11 -0
  366. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/get-user-company-offices.fetcher.js +11 -0
  367. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/get-user-current-carbon-allowance.fetcher.js +10 -0
  368. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/get-user-recent-searches.fetcher.js +10 -0
  369. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/get-users-baskets-fetcher.js +10 -0
  370. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/getMiAutoSugestions.fetcher.js +10 -0
  371. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/hotel-avaliability-fetcher.js +22 -0
  372. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/hotel-quote-fetcher.js +11 -0
  373. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/irl-quote-fetcher.js +11 -0
  374. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/list-fetchable-enterprise.js +27 -0
  375. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/lounge-quote.fetcher.js +11 -0
  376. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/object-fetchable-enterprise.js +11 -0
  377. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/parking-quote-fetcher.js +11 -0
  378. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/rail-quote-fetcher.js +11 -0
  379. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/search-airlines.fetcher.js +11 -0
  380. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/search-airports-fetcher.js +10 -0
  381. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/search-cities.fetcher.js +11 -0
  382. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/search-conferma-cities.fetcher.js +11 -0
  383. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/search-depots.fetcher.js +10 -0
  384. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/search-hotel-chains.fetcher.js +11 -0
  385. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/search-postcodes.fetcher.js +11 -0
  386. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/search-rail-stations.fetcher.js +11 -0
  387. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/search-users-can-book-for-fetcher.js +11 -0
  388. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/user-addresses.fetcher.js +11 -0
  389. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/user-fetcher.js +10 -0
  390. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/user-message.fetcher.js +11 -0
  391. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/user-products-fetcher.js +11 -0
  392. package/dist/obtservices/esm2015/base/lib/vendor/fetchers/user-ui-configs-fetcher.js +11 -0
  393. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/Icabhire-enterprise-search.js +17 -0
  394. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/Icarhire-enterprise-search.js +2 -0
  395. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/Ienterprise-basket.service.js +2 -0
  396. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/Ieurostar-enterprise-search.js +2 -0
  397. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/Iflight-enterprise-search.js +2 -0
  398. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/Ihotel-enterprise-search.js +18 -0
  399. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/Iirl-enterprise-search.js +2 -0
  400. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/Ilounges-enterprise-search.js +2 -0
  401. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/Imybookings.service.js +2 -0
  402. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/Iparking-enterprise-search.js +2 -0
  403. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/Irail-enterprise-search.js +2 -0
  404. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/Isearch.service.js +2 -0
  405. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/Isupplementary-booking-info-impl.js +2 -0
  406. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/Iuser.service.js +2 -0
  407. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/car-hire-classes.interface.js +2 -0
  408. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/car-hire-filters.interface.js +2 -0
  409. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/car-hire-sort.interface.js +2 -0
  410. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/cheapest-price.js +2 -0
  411. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/code-name.js +2 -0
  412. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/flight-filters.interface.js +2 -0
  413. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/flight-multi-destination.interface.js +2 -0
  414. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/rail-airport-express-stations.interface.js +2 -0
  415. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/rail-basket-item.interface.js +2 -0
  416. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/rail-journey-leg.interface.js +2 -0
  417. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/rail-recent-search-args.interface.js +2 -0
  418. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/rail-selected-ticket.interface.js +2 -0
  419. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/rail-ticket-group.interface.js +2 -0
  420. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/rail-ticket-groups.interface.js +2 -0
  421. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/search-objects.interface.js +2 -0
  422. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/select-filter.interface.js +2 -0
  423. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/user.data.js +2 -0
  424. package/dist/obtservices/esm2015/base/lib/vendor/interfaces/value-display.js +2 -0
  425. package/dist/obtservices/esm2015/base/lib/vendor/models/login.model.js +71 -0
  426. package/dist/obtservices/esm2015/base/lib/vendor/models/regexp.model.js +13 -0
  427. package/dist/obtservices/esm2015/base/lib/vendor/models/traveller.object.js +38 -0
  428. package/dist/obtservices/esm2015/base/lib/vendor/services/enterprise-basket.service.js +669 -0
  429. package/dist/obtservices/esm2015/base/lib/vendor/services/hotel-avallibility.service.js +165 -0
  430. package/dist/obtservices/esm2015/base/lib/vendor/services/http-call.service.js +16 -0
  431. package/dist/obtservices/esm2015/base/lib/vendor/services/logon.service.js +177 -0
  432. package/dist/obtservices/esm2015/base/lib/vendor/services/modal-opener.service.js +20 -0
  433. package/dist/obtservices/esm2015/base/lib/vendor/services/my-bookings.service.js +124 -0
  434. package/dist/obtservices/esm2015/base/lib/vendor/services/routehappy.service.js +196 -0
  435. package/dist/obtservices/esm2015/base/lib/vendor/services/search.service.js +1281 -0
  436. package/dist/obtservices/esm2015/base/lib/vendor/services/storage.service.js +3 -0
  437. package/dist/obtservices/esm2015/base/lib/vendor/services/url.service.js +12 -0
  438. package/dist/obtservices/esm2015/base/lib/vendor/services/user.service.js +223 -0
  439. package/dist/obtservices/esm2015/base/lib/vendor/services/webtoken.service.js +56 -0
  440. package/dist/obtservices/esm2015/base/lib/vendor/testers/base.tester.js +11 -0
  441. package/dist/obtservices/esm2015/base/lib/vendor/testers/postcode-validate.tester.js +10 -0
  442. package/dist/obtservices/esm2015/base/lib/vendor/testers/validate-mi-free-value.tester.js +10 -0
  443. package/dist/obtservices/esm2015/base/lib/vendor/types/graphql.types.js +456 -0
  444. package/dist/obtservices/esm2015/base/lib/vendor/types/types.js +161 -0
  445. package/dist/obtservices/esm2015/base/lib/vendor/updaters/accept-new-price.updater.js +10 -0
  446. package/dist/obtservices/esm2015/base/lib/vendor/updaters/add-item-to-basket.updater.js +10 -0
  447. package/dist/obtservices/esm2015/base/lib/vendor/updaters/addUserToBasketItem.js +10 -0
  448. package/dist/obtservices/esm2015/base/lib/vendor/updaters/book-basket-updater.js +11 -0
  449. package/dist/obtservices/esm2015/base/lib/vendor/updaters/create-basket-updater.js +11 -0
  450. package/dist/obtservices/esm2015/base/lib/vendor/updaters/move-basket-item-to-basket.js +10 -0
  451. package/dist/obtservices/esm2015/base/lib/vendor/updaters/object-updater-enterprise.js +11 -0
  452. package/dist/obtservices/esm2015/base/lib/vendor/updaters/remove-basket-updater.js +11 -0
  453. package/dist/obtservices/esm2015/base/lib/vendor/updaters/remove-item-from-basket.updater.js +10 -0
  454. package/dist/obtservices/esm2015/base/lib/vendor/updaters/remove-recent-search-updater.js +11 -0
  455. package/dist/obtservices/esm2015/base/lib/vendor/updaters/remove-user-address-updater.js +11 -0
  456. package/dist/obtservices/esm2015/base/lib/vendor/updaters/revalidate-basket-updater.js +10 -0
  457. package/dist/obtservices/esm2015/base/lib/vendor/updaters/save-recent-search-updater.js +11 -0
  458. package/dist/obtservices/esm2015/base/lib/vendor/updaters/save-user-address.updater.js +10 -0
  459. package/dist/obtservices/esm2015/base/lib/vendor/updaters/send-basket-for-approval.updater.js +10 -0
  460. package/dist/obtservices/esm2015/base/lib/vendor/updaters/set-basket-item-lead-passenger.updater.js +10 -0
  461. package/dist/obtservices/esm2015/base/lib/vendor/updaters/set-basket-item-mi-group.js +10 -0
  462. package/dist/obtservices/esm2015/base/lib/vendor/updaters/set-basket-item-mi-value-updater.js +10 -0
  463. package/dist/obtservices/esm2015/base/lib/vendor/updaters/set-basket-item-paymenr-option.updater.js +10 -0
  464. package/dist/obtservices/esm2015/base/lib/vendor/updaters/update-basket-notes-updater.js +10 -0
  465. package/dist/obtservices/esm2015/base/lib/vendor/updaters/update-basket-title-updater.js +10 -0
  466. package/dist/obtservices/esm2015/base/models.js +4 -0
  467. package/dist/obtservices/esm2015/base/obtservices-base.js +9 -0
  468. package/dist/obtservices/esm2015/base/public_api.js +9 -0
  469. package/dist/obtservices/esm2015/base/services.js +13 -0
  470. package/dist/obtservices/esm2015/base/testers.js +3 -0
  471. package/dist/obtservices/esm2015/base/types.js +2 -0
  472. package/dist/obtservices/esm2015/base/updaters.js +21 -0
  473. package/dist/obtservices/esm2015/obtservices.js +5 -0
  474. package/dist/obtservices/esm2015/public_api.js +2 -0
  475. package/dist/obtservices/fesm2015/obtservices-angular.js +35267 -0
  476. package/dist/obtservices/fesm2015/obtservices-angular.js.map +1 -0
  477. package/dist/obtservices/fesm2015/obtservices-base.js +16573 -0
  478. package/dist/obtservices/fesm2015/obtservices-base.js.map +1 -0
  479. package/dist/obtservices/fesm2015/obtservices.js +8 -0
  480. package/dist/obtservices/fesm2015/obtservices.js.map +1 -0
  481. package/dist/obtservices/obtservices.d.ts +4 -0
  482. package/dist/obtservices/obtservices.metadata.json +1 -0
  483. package/dist/obtservices/package.json +23 -0
  484. package/dist/obtservices/public_api.d.ts +1 -0
  485. package/dist/obtservices/tsconfig.lib.tsbuildinfo +3 -0
  486. package/package.json +1 -1
  487. package/projects/obtservices/angular/package.json +0 -3
  488. package/projects/obtservices/angular/src/components/basket-panel.ts +0 -139
  489. package/projects/obtservices/angular/src/components/with-component.ts +0 -40
  490. package/projects/obtservices/angular/src/data.ts +0 -5
  491. package/projects/obtservices/angular/src/fetchers.ts +0 -32
  492. package/projects/obtservices/angular/src/lib/vendor/classes/environment.ts +0 -5
  493. package/projects/obtservices/angular/src/lib/vendor/classes/event-messenager.ts +0 -11
  494. package/projects/obtservices/angular/src/lib/vendor/classes/helpers.ts +0 -87
  495. package/projects/obtservices/angular/src/lib/vendor/data/airports.data.json +0 -5508
  496. package/projects/obtservices/angular/src/lib/vendor/data/animations.ts +0 -38
  497. package/projects/obtservices/angular/src/lib/vendor/data/booking-expected-responses.json +0 -100
  498. package/projects/obtservices/angular/src/lib/vendor/data/cities.data.json +0 -31499
  499. package/projects/obtservices/angular/src/lib/vendor/data/countries.json +0 -1212
  500. package/projects/obtservices/angular/src/lib/vendor/data/flight-booking.data.json +0 -136
  501. package/projects/obtservices/angular/src/lib/vendor/data/postcodes1.json +0 -194
  502. package/projects/obtservices/angular/src/lib/vendor/data/rail_addresses.json +0 -2524
  503. package/projects/obtservices/angular/src/lib/vendor/fetchers/basket-fetcher.ts +0 -14
  504. package/projects/obtservices/angular/src/lib/vendor/fetchers/cabhire-quote-fetcher.ts +0 -15
  505. package/projects/obtservices/angular/src/lib/vendor/fetchers/carhire-availability-detail.fetcher.ts +0 -17
  506. package/projects/obtservices/angular/src/lib/vendor/fetchers/carhire-quote-fetcher.ts +0 -16
  507. package/projects/obtservices/angular/src/lib/vendor/fetchers/conferma-office-names.fetcher.ts +0 -16
  508. package/projects/obtservices/angular/src/lib/vendor/fetchers/conferma-quicklist.fetcher.ts +0 -16
  509. package/projects/obtservices/angular/src/lib/vendor/fetchers/eurostar-quote.fetcher.ts +0 -16
  510. package/projects/obtservices/angular/src/lib/vendor/fetchers/flight-quote.fetcher.ts +0 -16
  511. package/projects/obtservices/angular/src/lib/vendor/fetchers/get-rail-cards.fetcher.ts +0 -16
  512. package/projects/obtservices/angular/src/lib/vendor/fetchers/get-rail-station.fetcher.ts +0 -16
  513. package/projects/obtservices/angular/src/lib/vendor/fetchers/get-risk-alerts.fetcher.ts +0 -18
  514. package/projects/obtservices/angular/src/lib/vendor/fetchers/get-user-company-offices.fetcher.ts +0 -16
  515. package/projects/obtservices/angular/src/lib/vendor/fetchers/get-user-current-carbon-allowance.fetcher.ts +0 -16
  516. package/projects/obtservices/angular/src/lib/vendor/fetchers/get-user-recent-searches.fetcher.ts +0 -16
  517. package/projects/obtservices/angular/src/lib/vendor/fetchers/get-users-baskets-fetcher.ts +0 -16
  518. package/projects/obtservices/angular/src/lib/vendor/fetchers/getMiAutoSugestions.fetcher.ts +0 -16
  519. package/projects/obtservices/angular/src/lib/vendor/fetchers/hotel-avaliability-fetcher.ts +0 -17
  520. package/projects/obtservices/angular/src/lib/vendor/fetchers/hotel-quote-fetcher.ts +0 -16
  521. package/projects/obtservices/angular/src/lib/vendor/fetchers/irl-quote-fetcher.ts +0 -16
  522. package/projects/obtservices/angular/src/lib/vendor/fetchers/lounge-quote.fetcher.ts +0 -16
  523. package/projects/obtservices/angular/src/lib/vendor/fetchers/parking-quote-fetcher.ts +0 -16
  524. package/projects/obtservices/angular/src/lib/vendor/fetchers/rail-quote-fetcher.ts +0 -16
  525. package/projects/obtservices/angular/src/lib/vendor/fetchers/search-airlines-fetcher.ts +0 -14
  526. package/projects/obtservices/angular/src/lib/vendor/fetchers/search-airports-fetcher.ts +0 -14
  527. package/projects/obtservices/angular/src/lib/vendor/fetchers/search-cities.fetcher.ts +0 -16
  528. package/projects/obtservices/angular/src/lib/vendor/fetchers/search-conferma-cities.fetcher.ts +0 -14
  529. package/projects/obtservices/angular/src/lib/vendor/fetchers/search-depots.fetcher.ts +0 -18
  530. package/projects/obtservices/angular/src/lib/vendor/fetchers/search-hotel-chains.fetcher.ts +0 -16
  531. package/projects/obtservices/angular/src/lib/vendor/fetchers/search-postcodes.fetcher.ts +0 -16
  532. package/projects/obtservices/angular/src/lib/vendor/fetchers/search-rail-stations.fetcher.ts +0 -16
  533. package/projects/obtservices/angular/src/lib/vendor/fetchers/search-users-can-book-for-fetcher.ts +0 -16
  534. package/projects/obtservices/angular/src/lib/vendor/fetchers/user-addresses.fetcher.ts +0 -16
  535. package/projects/obtservices/angular/src/lib/vendor/fetchers/user-fetcher.ts +0 -14
  536. package/projects/obtservices/angular/src/lib/vendor/fetchers/user-message.fetcher.ts +0 -16
  537. package/projects/obtservices/angular/src/lib/vendor/fetchers/user-products-fetcher.ts +0 -16
  538. package/projects/obtservices/angular/src/lib/vendor/fetchers/user-ui-configs-fetcher.ts +0 -16
  539. package/projects/obtservices/angular/src/lib/vendor/services/enterprise-basket.service.ts +0 -133
  540. package/projects/obtservices/angular/src/lib/vendor/services/hotel-avallibility.service.ts +0 -19
  541. package/projects/obtservices/angular/src/lib/vendor/services/http-call.service.ts +0 -252
  542. package/projects/obtservices/angular/src/lib/vendor/services/logon.service.ts +0 -40
  543. package/projects/obtservices/angular/src/lib/vendor/services/modal-opener.service.ts +0 -9
  544. package/projects/obtservices/angular/src/lib/vendor/services/my-bookings.service.ts +0 -21
  545. package/projects/obtservices/angular/src/lib/vendor/services/route-happy.service.ts +0 -11
  546. package/projects/obtservices/angular/src/lib/vendor/services/search.service.ts +0 -213
  547. package/projects/obtservices/angular/src/lib/vendor/services/storage.service.ts +0 -82
  548. package/projects/obtservices/angular/src/lib/vendor/services/user.service.ts +0 -36
  549. package/projects/obtservices/angular/src/lib/vendor/services/webtoken.service.ts +0 -62
  550. package/projects/obtservices/angular/src/lib/vendor/testers/postcode-validate.tester.ts +0 -14
  551. package/projects/obtservices/angular/src/lib/vendor/testers/validate-mi-free-value.tester.ts +0 -14
  552. package/projects/obtservices/angular/src/lib/vendor/types/graphql.angular.types.ts +0 -11081
  553. package/projects/obtservices/angular/src/lib/vendor/updaters/accept-new-price.updater.ts +0 -14
  554. package/projects/obtservices/angular/src/lib/vendor/updaters/add-item-to-basket.updater.ts +0 -14
  555. package/projects/obtservices/angular/src/lib/vendor/updaters/addUserToBasketItem.ts +0 -14
  556. package/projects/obtservices/angular/src/lib/vendor/updaters/book-basket-updater.ts +0 -14
  557. package/projects/obtservices/angular/src/lib/vendor/updaters/create-basket-updater.ts +0 -14
  558. package/projects/obtservices/angular/src/lib/vendor/updaters/move-basket-item-to-basket.ts +0 -14
  559. package/projects/obtservices/angular/src/lib/vendor/updaters/remove-basket-updater.ts +0 -14
  560. package/projects/obtservices/angular/src/lib/vendor/updaters/remove-item-from-basket.updater.ts +0 -14
  561. package/projects/obtservices/angular/src/lib/vendor/updaters/remove-recent-search.updater.ts +0 -14
  562. package/projects/obtservices/angular/src/lib/vendor/updaters/remove-user-address.updater.ts +0 -14
  563. package/projects/obtservices/angular/src/lib/vendor/updaters/revalidate-basket-updater.ts +0 -14
  564. package/projects/obtservices/angular/src/lib/vendor/updaters/save-recent-search.updater.ts +0 -14
  565. package/projects/obtservices/angular/src/lib/vendor/updaters/save-user-address.updater.ts +0 -11
  566. package/projects/obtservices/angular/src/lib/vendor/updaters/send-basket-for-approval.updater.ts +0 -14
  567. package/projects/obtservices/angular/src/lib/vendor/updaters/set-basket-item-lead-passenger.updater.ts +0 -14
  568. package/projects/obtservices/angular/src/lib/vendor/updaters/set-basket-item-mi-group.ts +0 -14
  569. package/projects/obtservices/angular/src/lib/vendor/updaters/set-basket-item-mi-value-updater.ts +0 -15
  570. package/projects/obtservices/angular/src/lib/vendor/updaters/set-payment-option.updater.ts +0 -15
  571. package/projects/obtservices/angular/src/lib/vendor/updaters/update-basket-notes-updater.ts +0 -14
  572. package/projects/obtservices/angular/src/lib/vendor/updaters/update-basket-title-updater.ts +0 -14
  573. package/projects/obtservices/angular/src/obtservices.module.ts +0 -131
  574. package/projects/obtservices/base/package.json +0 -3
  575. package/projects/obtservices/base/src/custom.d.ts +0 -3
  576. package/projects/obtservices/base/src/fetchers.ts +0 -36
  577. package/projects/obtservices/base/src/lib/vendor/classes/base-enterprise.ts +0 -126
  578. package/projects/obtservices/base/src/lib/vendor/classes/base-network-call.ts +0 -40
  579. package/projects/obtservices/base/src/lib/vendor/classes/basket-info-mi-details.impl.ts +0 -68
  580. package/projects/obtservices/base/src/lib/vendor/classes/bookable-basket.ts +0 -343
  581. package/projects/obtservices/base/src/lib/vendor/classes/cabhire-enterprise-search.ts +0 -907
  582. package/projects/obtservices/base/src/lib/vendor/classes/carhire-enterprise-search.ts +0 -1597
  583. package/projects/obtservices/base/src/lib/vendor/classes/empty-enterprise-search.ts +0 -75
  584. package/projects/obtservices/base/src/lib/vendor/classes/enviroment.ts +0 -25
  585. package/projects/obtservices/base/src/lib/vendor/classes/eurostar-enterprise-search.ts +0 -2126
  586. package/projects/obtservices/base/src/lib/vendor/classes/eurostar-search-type.enum.ts +0 -4
  587. package/projects/obtservices/base/src/lib/vendor/classes/event-messenager.ts +0 -23
  588. package/projects/obtservices/base/src/lib/vendor/classes/flight-enterprise-search.ts +0 -2399
  589. package/projects/obtservices/base/src/lib/vendor/classes/flight-search-type.enum.ts +0 -5
  590. package/projects/obtservices/base/src/lib/vendor/classes/helpers.ts +0 -1233
  591. package/projects/obtservices/base/src/lib/vendor/classes/hotel-enterprise-search.ts +0 -1370
  592. package/projects/obtservices/base/src/lib/vendor/classes/irl-enterprise-search.ts +0 -1380
  593. package/projects/obtservices/base/src/lib/vendor/classes/limited-cache.class.ts +0 -70
  594. package/projects/obtservices/base/src/lib/vendor/classes/lounges-enterprise-search.ts +0 -444
  595. package/projects/obtservices/base/src/lib/vendor/classes/management-info-and-valid.ts +0 -268
  596. package/projects/obtservices/base/src/lib/vendor/classes/modal-types.enum.ts +0 -28
  597. package/projects/obtservices/base/src/lib/vendor/classes/parking-enterprise-search.ts +0 -541
  598. package/projects/obtservices/base/src/lib/vendor/classes/rail-direction.enum.ts +0 -4
  599. package/projects/obtservices/base/src/lib/vendor/classes/rail-enterprise-search.ts +0 -1751
  600. package/projects/obtservices/base/src/lib/vendor/classes/routehappy-request.ts +0 -146
  601. package/projects/obtservices/base/src/lib/vendor/classes/routehappy-response.ts +0 -128
  602. package/projects/obtservices/base/src/lib/vendor/classes/supplementary-booking-info-impl.ts +0 -375
  603. package/projects/obtservices/base/src/lib/vendor/classes/user-favourite.enum.ts +0 -12
  604. package/projects/obtservices/base/src/lib/vendor/classes/validator.checker.ts +0 -7
  605. package/projects/obtservices/base/src/lib/vendor/data/airports.data.json +0 -5508
  606. package/projects/obtservices/base/src/lib/vendor/data/booking-expected-responses.json +0 -100
  607. package/projects/obtservices/base/src/lib/vendor/data/cities.data.json +0 -31499
  608. package/projects/obtservices/base/src/lib/vendor/data/countries.json +0 -1212
  609. package/projects/obtservices/base/src/lib/vendor/data/euro-stations.json +0 -30
  610. package/projects/obtservices/base/src/lib/vendor/data/flight-booking.data.json +0 -136
  611. package/projects/obtservices/base/src/lib/vendor/data/postcodes1.json +0 -194
  612. package/projects/obtservices/base/src/lib/vendor/data/rail_addresses.json +0 -2524
  613. package/projects/obtservices/base/src/lib/vendor/fetchers/basket-fetcher.ts +0 -29
  614. package/projects/obtservices/base/src/lib/vendor/fetchers/cabhire-quote-fetcher.ts +0 -34
  615. package/projects/obtservices/base/src/lib/vendor/fetchers/carhire-availability-detail.fetcher.ts +0 -35
  616. package/projects/obtservices/base/src/lib/vendor/fetchers/carhire-quote-fetcher.ts +0 -34
  617. package/projects/obtservices/base/src/lib/vendor/fetchers/conferma-office-names.fetcher.ts +0 -34
  618. package/projects/obtservices/base/src/lib/vendor/fetchers/conferma-quicklist.fetcher.ts +0 -35
  619. package/projects/obtservices/base/src/lib/vendor/fetchers/eurostar-quote.fetcher.ts +0 -35
  620. package/projects/obtservices/base/src/lib/vendor/fetchers/flight-quote.fetcher.ts +0 -35
  621. package/projects/obtservices/base/src/lib/vendor/fetchers/get-rail-cards.fetcher.ts +0 -35
  622. package/projects/obtservices/base/src/lib/vendor/fetchers/get-rail-station.fetcher.ts +0 -35
  623. package/projects/obtservices/base/src/lib/vendor/fetchers/get-risk-alerts.fetcher.ts +0 -35
  624. package/projects/obtservices/base/src/lib/vendor/fetchers/get-user-company-offices.fetcher.ts +0 -34
  625. package/projects/obtservices/base/src/lib/vendor/fetchers/get-user-current-carbon-allowance.fetcher.ts +0 -35
  626. package/projects/obtservices/base/src/lib/vendor/fetchers/get-user-recent-searches.fetcher.ts +0 -36
  627. package/projects/obtservices/base/src/lib/vendor/fetchers/get-users-baskets-fetcher.ts +0 -33
  628. package/projects/obtservices/base/src/lib/vendor/fetchers/getMiAutoSugestions.fetcher.ts +0 -35
  629. package/projects/obtservices/base/src/lib/vendor/fetchers/hotel-avaliability-fetcher.ts +0 -53
  630. package/projects/obtservices/base/src/lib/vendor/fetchers/hotel-quote-fetcher.ts +0 -35
  631. package/projects/obtservices/base/src/lib/vendor/fetchers/irl-quote-fetcher.ts +0 -34
  632. package/projects/obtservices/base/src/lib/vendor/fetchers/list-fetchable-enterprise.ts +0 -59
  633. package/projects/obtservices/base/src/lib/vendor/fetchers/lounge-quote.fetcher.ts +0 -34
  634. package/projects/obtservices/base/src/lib/vendor/fetchers/object-fetchable-enterprise.ts +0 -20
  635. package/projects/obtservices/base/src/lib/vendor/fetchers/parking-quote-fetcher.ts +0 -34
  636. package/projects/obtservices/base/src/lib/vendor/fetchers/rail-quote-fetcher.ts +0 -34
  637. package/projects/obtservices/base/src/lib/vendor/fetchers/search-airlines.fetcher.ts +0 -30
  638. package/projects/obtservices/base/src/lib/vendor/fetchers/search-airports-fetcher.ts +0 -29
  639. package/projects/obtservices/base/src/lib/vendor/fetchers/search-cities.fetcher.ts +0 -34
  640. package/projects/obtservices/base/src/lib/vendor/fetchers/search-conferma-cities.fetcher.ts +0 -32
  641. package/projects/obtservices/base/src/lib/vendor/fetchers/search-depots.fetcher.ts +0 -34
  642. package/projects/obtservices/base/src/lib/vendor/fetchers/search-hotel-chains.fetcher.ts +0 -34
  643. package/projects/obtservices/base/src/lib/vendor/fetchers/search-postcodes.fetcher.ts +0 -37
  644. package/projects/obtservices/base/src/lib/vendor/fetchers/search-rail-stations.fetcher.ts +0 -35
  645. package/projects/obtservices/base/src/lib/vendor/fetchers/search-users-can-book-for-fetcher.ts +0 -35
  646. package/projects/obtservices/base/src/lib/vendor/fetchers/user-addresses.fetcher.ts +0 -34
  647. package/projects/obtservices/base/src/lib/vendor/fetchers/user-fetcher.ts +0 -27
  648. package/projects/obtservices/base/src/lib/vendor/fetchers/user-message.fetcher.ts +0 -34
  649. package/projects/obtservices/base/src/lib/vendor/fetchers/user-products-fetcher.ts +0 -35
  650. package/projects/obtservices/base/src/lib/vendor/fetchers/user-ui-configs-fetcher.ts +0 -35
  651. package/projects/obtservices/base/src/lib/vendor/interfaces/Icabhire-enterprise-search.ts +0 -174
  652. package/projects/obtservices/base/src/lib/vendor/interfaces/Icarhire-enterprise-search.ts +0 -143
  653. package/projects/obtservices/base/src/lib/vendor/interfaces/Ienterprise-basket.service.ts +0 -127
  654. package/projects/obtservices/base/src/lib/vendor/interfaces/Ieurostar-enterprise-search.ts +0 -197
  655. package/projects/obtservices/base/src/lib/vendor/interfaces/Iflight-enterprise-search.ts +0 -196
  656. package/projects/obtservices/base/src/lib/vendor/interfaces/Ihotel-enterprise-search.ts +0 -219
  657. package/projects/obtservices/base/src/lib/vendor/interfaces/Iirl-enterprise-search.ts +0 -135
  658. package/projects/obtservices/base/src/lib/vendor/interfaces/Ilounges-enterprise-search.ts +0 -58
  659. package/projects/obtservices/base/src/lib/vendor/interfaces/Imybookings.service.ts +0 -27
  660. package/projects/obtservices/base/src/lib/vendor/interfaces/Iparking-enterprise-search.ts +0 -72
  661. package/projects/obtservices/base/src/lib/vendor/interfaces/Irail-enterprise-search.ts +0 -161
  662. package/projects/obtservices/base/src/lib/vendor/interfaces/Isearch.service.ts +0 -178
  663. package/projects/obtservices/base/src/lib/vendor/interfaces/Isupplementary-booking-info-impl.ts +0 -63
  664. package/projects/obtservices/base/src/lib/vendor/interfaces/Iuser.service.ts +0 -87
  665. package/projects/obtservices/base/src/lib/vendor/interfaces/car-hire-classes.interface.ts +0 -8
  666. package/projects/obtservices/base/src/lib/vendor/interfaces/car-hire-filters.interface.ts +0 -11
  667. package/projects/obtservices/base/src/lib/vendor/interfaces/car-hire-sort.interface.ts +0 -4
  668. package/projects/obtservices/base/src/lib/vendor/interfaces/cheapest-price.ts +0 -4
  669. package/projects/obtservices/base/src/lib/vendor/interfaces/code-name.ts +0 -4
  670. package/projects/obtservices/base/src/lib/vendor/interfaces/flight-filters.interface.ts +0 -41
  671. package/projects/obtservices/base/src/lib/vendor/interfaces/flight-multi-destination.interface.ts +0 -8
  672. package/projects/obtservices/base/src/lib/vendor/interfaces/rail-airport-express-stations.interface.ts +0 -4
  673. package/projects/obtservices/base/src/lib/vendor/interfaces/rail-basket-item.interface.ts +0 -79
  674. package/projects/obtservices/base/src/lib/vendor/interfaces/rail-journey-leg.interface.ts +0 -6
  675. package/projects/obtservices/base/src/lib/vendor/interfaces/rail-recent-search-args.interface.ts +0 -20
  676. package/projects/obtservices/base/src/lib/vendor/interfaces/rail-selected-ticket.interface.ts +0 -11
  677. package/projects/obtservices/base/src/lib/vendor/interfaces/rail-ticket-group.interface.ts +0 -29
  678. package/projects/obtservices/base/src/lib/vendor/interfaces/rail-ticket-groups.interface.ts +0 -5
  679. package/projects/obtservices/base/src/lib/vendor/interfaces/search-objects.interface.ts +0 -17
  680. package/projects/obtservices/base/src/lib/vendor/interfaces/select-filter.interface.ts +0 -5
  681. package/projects/obtservices/base/src/lib/vendor/interfaces/user.data.ts +0 -22
  682. package/projects/obtservices/base/src/lib/vendor/interfaces/value-display.ts +0 -4
  683. package/projects/obtservices/base/src/lib/vendor/models/login.model.ts +0 -97
  684. package/projects/obtservices/base/src/lib/vendor/models/regexp.model.ts +0 -13
  685. package/projects/obtservices/base/src/lib/vendor/models/traveller.object.ts +0 -61
  686. package/projects/obtservices/base/src/lib/vendor/services/enterprise-basket.service.ts +0 -1150
  687. package/projects/obtservices/base/src/lib/vendor/services/hotel-avallibility.service.ts +0 -251
  688. package/projects/obtservices/base/src/lib/vendor/services/http-call.service.ts +0 -57
  689. package/projects/obtservices/base/src/lib/vendor/services/logon.service.ts +0 -245
  690. package/projects/obtservices/base/src/lib/vendor/services/modal-opener.service.ts +0 -30
  691. package/projects/obtservices/base/src/lib/vendor/services/my-bookings.service.ts +0 -184
  692. package/projects/obtservices/base/src/lib/vendor/services/routehappy.service.ts +0 -275
  693. package/projects/obtservices/base/src/lib/vendor/services/search.service.ts +0 -2026
  694. package/projects/obtservices/base/src/lib/vendor/services/storage.service.ts +0 -15
  695. package/projects/obtservices/base/src/lib/vendor/services/url.service.ts +0 -12
  696. package/projects/obtservices/base/src/lib/vendor/services/user.service.ts +0 -354
  697. package/projects/obtservices/base/src/lib/vendor/services/webtoken.service.ts +0 -66
  698. package/projects/obtservices/base/src/lib/vendor/testers/base.tester.ts +0 -18
  699. package/projects/obtservices/base/src/lib/vendor/testers/postcode-validate.tester.ts +0 -24
  700. package/projects/obtservices/base/src/lib/vendor/testers/validate-mi-free-value.tester.ts +0 -23
  701. package/projects/obtservices/base/src/lib/vendor/types/graphql.types.ts +0 -6184
  702. package/projects/obtservices/base/src/lib/vendor/types/types.ts +0 -630
  703. package/projects/obtservices/base/src/lib/vendor/updaters/accept-new-price.updater.ts +0 -31
  704. package/projects/obtservices/base/src/lib/vendor/updaters/add-item-to-basket.updater.ts +0 -29
  705. package/projects/obtservices/base/src/lib/vendor/updaters/addUserToBasketItem.ts +0 -30
  706. package/projects/obtservices/base/src/lib/vendor/updaters/book-basket-updater.ts +0 -28
  707. package/projects/obtservices/base/src/lib/vendor/updaters/create-basket-updater.ts +0 -29
  708. package/projects/obtservices/base/src/lib/vendor/updaters/move-basket-item-to-basket.ts +0 -30
  709. package/projects/obtservices/base/src/lib/vendor/updaters/object-updater-enterprise.ts +0 -20
  710. package/projects/obtservices/base/src/lib/vendor/updaters/remove-basket-updater.ts +0 -29
  711. package/projects/obtservices/base/src/lib/vendor/updaters/remove-item-from-basket.updater.ts +0 -28
  712. package/projects/obtservices/base/src/lib/vendor/updaters/remove-recent-search-updater.ts +0 -29
  713. package/projects/obtservices/base/src/lib/vendor/updaters/remove-user-address-updater.ts +0 -29
  714. package/projects/obtservices/base/src/lib/vendor/updaters/revalidate-basket-updater.ts +0 -29
  715. package/projects/obtservices/base/src/lib/vendor/updaters/save-recent-search-updater.ts +0 -30
  716. package/projects/obtservices/base/src/lib/vendor/updaters/save-user-address.updater.ts +0 -30
  717. package/projects/obtservices/base/src/lib/vendor/updaters/send-basket-for-approval.updater.ts +0 -31
  718. package/projects/obtservices/base/src/lib/vendor/updaters/set-basket-item-lead-passenger.updater.ts +0 -30
  719. package/projects/obtservices/base/src/lib/vendor/updaters/set-basket-item-mi-group.ts +0 -32
  720. package/projects/obtservices/base/src/lib/vendor/updaters/set-basket-item-mi-value-updater.ts +0 -30
  721. package/projects/obtservices/base/src/lib/vendor/updaters/set-basket-item-paymenr-option.updater.ts +0 -28
  722. package/projects/obtservices/base/src/lib/vendor/updaters/update-basket-notes-updater.ts +0 -30
  723. package/projects/obtservices/base/src/lib/vendor/updaters/update-basket-title-updater.ts +0 -30
  724. package/projects/obtservices/base/src/testers.ts +0 -2
  725. package/projects/obtservices/graphQL/autogenerated/index.js +0 -2
  726. package/projects/obtservices/graphQL/autogenerated/mutations/acceptNewPrice.gql +0 -1580
  727. package/projects/obtservices/graphQL/autogenerated/mutations/addItemToBasket.gql +0 -1580
  728. package/projects/obtservices/graphQL/autogenerated/mutations/addUsersToBasketItem.gql +0 -1580
  729. package/projects/obtservices/graphQL/autogenerated/mutations/bookBasket.gql +0 -1580
  730. package/projects/obtservices/graphQL/autogenerated/mutations/cancelBooking.gql +0 -6
  731. package/projects/obtservices/graphQL/autogenerated/mutations/confermaCreateCard.gql +0 -23
  732. package/projects/obtservices/graphQL/autogenerated/mutations/confermaDeleteCard.gql +0 -3
  733. package/projects/obtservices/graphQL/autogenerated/mutations/createBasket.gql +0 -1580
  734. package/projects/obtservices/graphQL/autogenerated/mutations/deleteBasket.gql +0 -3
  735. package/projects/obtservices/graphQL/autogenerated/mutations/deleteFavouriteSearch.gql +0 -3
  736. package/projects/obtservices/graphQL/autogenerated/mutations/deleteRecentSearch.gql +0 -3
  737. package/projects/obtservices/graphQL/autogenerated/mutations/deleteUserAddress.gql +0 -3
  738. package/projects/obtservices/graphQL/autogenerated/mutations/index.js +0 -36
  739. package/projects/obtservices/graphQL/autogenerated/mutations/moveItemToADifferentBasket.gql +0 -1580
  740. package/projects/obtservices/graphQL/autogenerated/mutations/removeItemFromBasket.gql +0 -1580
  741. package/projects/obtservices/graphQL/autogenerated/mutations/removeItemsFromBasket.gql +0 -1580
  742. package/projects/obtservices/graphQL/autogenerated/mutations/removeUserFromBasketItem.gql +0 -1580
  743. package/projects/obtservices/graphQL/autogenerated/mutations/reopenBasket.gql +0 -1580
  744. package/projects/obtservices/graphQL/autogenerated/mutations/revalidateBasket.gql +0 -1580
  745. package/projects/obtservices/graphQL/autogenerated/mutations/revalidateBasketItem.gql +0 -1580
  746. package/projects/obtservices/graphQL/autogenerated/mutations/saveFavouriteSearch.gql +0 -348
  747. package/projects/obtservices/graphQL/autogenerated/mutations/saveRecentSearch.gql +0 -348
  748. package/projects/obtservices/graphQL/autogenerated/mutations/saveUserAddress.gql +0 -14
  749. package/projects/obtservices/graphQL/autogenerated/mutations/sendBasketForApproval.gql +0 -1580
  750. package/projects/obtservices/graphQL/autogenerated/mutations/setAddressAsUserPrimary.gql +0 -14
  751. package/projects/obtservices/graphQL/autogenerated/mutations/setBasketItemLeadPassenger.gql +0 -1580
  752. package/projects/obtservices/graphQL/autogenerated/mutations/setBasketItemMIGroup.gql +0 -1580
  753. package/projects/obtservices/graphQL/autogenerated/mutations/setBasketItemMIValue.gql +0 -1580
  754. package/projects/obtservices/graphQL/autogenerated/mutations/setBasketItemPaymentMethod.gql +0 -1580
  755. package/projects/obtservices/graphQL/autogenerated/mutations/setMIDefaultValue.gql +0 -3
  756. package/projects/obtservices/graphQL/autogenerated/mutations/setUserLanguage.gql +0 -339
  757. package/projects/obtservices/graphQL/autogenerated/mutations/updateBasketNotes.gql +0 -1580
  758. package/projects/obtservices/graphQL/autogenerated/mutations/updateBasketTitle.gql +0 -1580
  759. package/projects/obtservices/graphQL/autogenerated/queries/alive.gql +0 -3
  760. package/projects/obtservices/graphQL/autogenerated/queries/carHireAvailabilityDetailRequest.gql +0 -42
  761. package/projects/obtservices/graphQL/autogenerated/queries/confermaBlockClientHotels.gql +0 -23
  762. package/projects/obtservices/graphQL/autogenerated/queries/confermaBlockConsumerHotels.gql +0 -23
  763. package/projects/obtservices/graphQL/autogenerated/queries/confermaListCards.gql +0 -11
  764. package/projects/obtservices/graphQL/autogenerated/queries/confermaUnblockClientHotels.gql +0 -23
  765. package/projects/obtservices/graphQL/autogenerated/queries/confermaUnblockConsumerHotels.gql +0 -23
  766. package/projects/obtservices/graphQL/autogenerated/queries/getCOVIDMicrositeToken.gql +0 -3
  767. package/projects/obtservices/graphQL/autogenerated/queries/getCancellationInfo.gql +0 -7
  768. package/projects/obtservices/graphQL/autogenerated/queries/getCarHireDepots.gql +0 -13
  769. package/projects/obtservices/graphQL/autogenerated/queries/getConfermaOffice.gql +0 -50
  770. package/projects/obtservices/graphQL/autogenerated/queries/getConfermaOfficeNames.gql +0 -26
  771. package/projects/obtservices/graphQL/autogenerated/queries/getConfermaQuicklist.gql +0 -131
  772. package/projects/obtservices/graphQL/autogenerated/queries/getCountries.gql +0 -8
  773. package/projects/obtservices/graphQL/autogenerated/queries/getHotelAvailability.gql +0 -78
  774. package/projects/obtservices/graphQL/autogenerated/queries/getHotelChains.gql +0 -3
  775. package/projects/obtservices/graphQL/autogenerated/queries/getIRLSupplierStation.gql +0 -28
  776. package/projects/obtservices/graphQL/autogenerated/queries/getMultipleHotelsAvailability.gql +0 -78
  777. package/projects/obtservices/graphQL/autogenerated/queries/getPostcodeDetails.gql +0 -25
  778. package/projects/obtservices/graphQL/autogenerated/queries/getRailStation.gql +0 -27
  779. package/projects/obtservices/graphQL/autogenerated/queries/getRailcards.gql +0 -6
  780. package/projects/obtservices/graphQL/autogenerated/queries/getRiskAlerts.gql +0 -17
  781. package/projects/obtservices/graphQL/autogenerated/queries/getUser.gql +0 -339
  782. package/projects/obtservices/graphQL/autogenerated/queries/getUserAddresses.gql +0 -14
  783. package/projects/obtservices/graphQL/autogenerated/queries/getUserBasket.gql +0 -1580
  784. package/projects/obtservices/graphQL/autogenerated/queries/getUserBaskets.gql +0 -1580
  785. package/projects/obtservices/graphQL/autogenerated/queries/getUserCompanyOffices.gql +0 -88
  786. package/projects/obtservices/graphQL/autogenerated/queries/getUserCurrentCarbonAllowance.gql +0 -524
  787. package/projects/obtservices/graphQL/autogenerated/queries/getUserFavouriteSearches.gql +0 -348
  788. package/projects/obtservices/graphQL/autogenerated/queries/getUserMIAutoSuggestValues.gql +0 -10
  789. package/projects/obtservices/graphQL/autogenerated/queries/getUserMessages.gql +0 -10
  790. package/projects/obtservices/graphQL/autogenerated/queries/getUserPhoneNumbers.gql +0 -13
  791. package/projects/obtservices/graphQL/autogenerated/queries/getUserRecentSearches.gql +0 -348
  792. package/projects/obtservices/graphQL/autogenerated/queries/getUserServices.gql +0 -16
  793. package/projects/obtservices/graphQL/autogenerated/queries/getUserTravelRules.gql +0 -111
  794. package/projects/obtservices/graphQL/autogenerated/queries/getUserUIConfigs.gql +0 -52
  795. package/projects/obtservices/graphQL/autogenerated/queries/index.js +0 -64
  796. package/projects/obtservices/graphQL/autogenerated/queries/isPostcodeValid.gql +0 -3
  797. package/projects/obtservices/graphQL/autogenerated/queries/postcodeAutoSuggest.gql +0 -3
  798. package/projects/obtservices/graphQL/autogenerated/queries/searchAirlines.gql +0 -32
  799. package/projects/obtservices/graphQL/autogenerated/queries/searchAirports.gql +0 -60
  800. package/projects/obtservices/graphQL/autogenerated/queries/searchCabHire.gql +0 -63
  801. package/projects/obtservices/graphQL/autogenerated/queries/searchCarHire.gql +0 -104
  802. package/projects/obtservices/graphQL/autogenerated/queries/searchCities.gql +0 -14
  803. package/projects/obtservices/graphQL/autogenerated/queries/searchConfermaCities.gql +0 -11
  804. package/projects/obtservices/graphQL/autogenerated/queries/searchEurostar.gql +0 -833
  805. package/projects/obtservices/graphQL/autogenerated/queries/searchFastTrack.gql +0 -46
  806. package/projects/obtservices/graphQL/autogenerated/queries/searchFlights.gql +0 -23
  807. package/projects/obtservices/graphQL/autogenerated/queries/searchFlightsV2.gql +0 -833
  808. package/projects/obtservices/graphQL/autogenerated/queries/searchHotelChains.gql +0 -3
  809. package/projects/obtservices/graphQL/autogenerated/queries/searchHotels.gql +0 -131
  810. package/projects/obtservices/graphQL/autogenerated/queries/searchIRL.gql +0 -514
  811. package/projects/obtservices/graphQL/autogenerated/queries/searchIRLSupplierStations.gql +0 -28
  812. package/projects/obtservices/graphQL/autogenerated/queries/searchLounges.gql +0 -89
  813. package/projects/obtservices/graphQL/autogenerated/queries/searchParking.gql +0 -70
  814. package/projects/obtservices/graphQL/autogenerated/queries/searchPostcodes.gql +0 -25
  815. package/projects/obtservices/graphQL/autogenerated/queries/searchRail.gql +0 -840
  816. package/projects/obtservices/graphQL/autogenerated/queries/searchRailStations.gql +0 -27
  817. package/projects/obtservices/graphQL/autogenerated/queries/searchUserCanBookFor.gql +0 -339
  818. package/projects/obtservices/graphQL/autogenerated/queries/validateBasketItemMI.gql +0 -3
  819. package/projects/obtservices/graphQL/autogenerated/queries/validateUserMIFreeValue.gql +0 -3
  820. package/projects/obtservices/graphQL/documents/acceptNewPrice.graphql +0 -5
  821. package/projects/obtservices/graphQL/documents/addUserToBasketItem.graphql +0 -9
  822. package/projects/obtservices/graphQL/documents/basket.fragments.graphql +0 -171
  823. package/projects/obtservices/graphQL/documents/baskets.graphql +0 -111
  824. package/projects/obtservices/graphQL/documents/bookBasket.graphql +0 -9
  825. package/projects/obtservices/graphQL/documents/cabhire.graphql +0 -66
  826. package/projects/obtservices/graphQL/documents/carHireAvailabilityDetailRequest.graphql +0 -44
  827. package/projects/obtservices/graphQL/documents/carhire.graphql +0 -117
  828. package/projects/obtservices/graphQL/documents/deleteRecentSearch.graphql +0 -3
  829. package/projects/obtservices/graphQL/documents/deleteUserAddress.graphql +0 -3
  830. package/projects/obtservices/graphQL/documents/error.fragments.graphql +0 -10
  831. package/projects/obtservices/graphQL/documents/flights.graphql +0 -830
  832. package/projects/obtservices/graphQL/documents/getCarHireDepots.graphql +0 -13
  833. package/projects/obtservices/graphQL/documents/getConfermaOfficeNames.graphql +0 -11
  834. package/projects/obtservices/graphQL/documents/getConfermaQuicklist.graphql +0 -108
  835. package/projects/obtservices/graphQL/documents/getRailStation.graphql +0 -31
  836. package/projects/obtservices/graphQL/documents/getRailcards.graphql +0 -6
  837. package/projects/obtservices/graphQL/documents/getRiskAlerts.graphql +0 -24
  838. package/projects/obtservices/graphQL/documents/getUserAddresses.graphql +0 -14
  839. package/projects/obtservices/graphQL/documents/getUserCompanyOffices.graphql +0 -18
  840. package/projects/obtservices/graphQL/documents/getUserCurrentCarbonAllowance.graphql +0 -29
  841. package/projects/obtservices/graphQL/documents/getUserMIAutoSuggestValues.graphql +0 -10
  842. package/projects/obtservices/graphQL/documents/getUserPhoneNumbers.graphql +0 -13
  843. package/projects/obtservices/graphQL/documents/getUserRecentSearches.graphql +0 -20
  844. package/projects/obtservices/graphQL/documents/hotels.graphql +0 -242
  845. package/projects/obtservices/graphQL/documents/isPostcodeValid.graphql +0 -3
  846. package/projects/obtservices/graphQL/documents/lookups.graphql +0 -54
  847. package/projects/obtservices/graphQL/documents/lounges.graphql +0 -88
  848. package/projects/obtservices/graphQL/documents/moveItemToADifferentBasket.graphql +0 -9
  849. package/projects/obtservices/graphQL/documents/parking.graphql +0 -79
  850. package/projects/obtservices/graphQL/documents/rail.graphql +0 -645
  851. package/projects/obtservices/graphQL/documents/saveRecentSearch.graphql +0 -5
  852. package/projects/obtservices/graphQL/documents/saveUserAddress.graphql +0 -14
  853. package/projects/obtservices/graphQL/documents/searchAirlines.graphql +0 -32
  854. package/projects/obtservices/graphQL/documents/searchCities.graphql +0 -14
  855. package/projects/obtservices/graphQL/documents/searchConfermaCities.graphql +0 -11
  856. package/projects/obtservices/graphQL/documents/searchEurostar.graphql +0 -810
  857. package/projects/obtservices/graphQL/documents/searchHotelChains.graphql +0 -3
  858. package/projects/obtservices/graphQL/documents/searchIRL.graphql +0 -521
  859. package/projects/obtservices/graphQL/documents/searchPostcodes.graphql +0 -7
  860. package/projects/obtservices/graphQL/documents/searchRailStations.graphql +0 -27
  861. package/projects/obtservices/graphQL/documents/searchUserAddresses.graphql +0 -14
  862. package/projects/obtservices/graphQL/documents/set-basker-item-mi-group.graphql +0 -9
  863. package/projects/obtservices/graphQL/documents/setBasketItemLeadPassenger.graphql +0 -5
  864. package/projects/obtservices/graphQL/documents/setBasketItemMIValue.graphql +0 -16
  865. package/projects/obtservices/graphQL/documents/setBasketItemPaymentMethod.graphql +0 -12
  866. package/projects/obtservices/graphQL/documents/updateBasketNotes.graphql +0 -10
  867. package/projects/obtservices/graphQL/documents/updateBasketTitle.graphql +0 -10
  868. package/projects/obtservices/graphQL/documents/user.fragments.graphql +0 -65
  869. package/projects/obtservices/graphQL/documents/user.graphql +0 -95
  870. package/projects/obtservices/graphQL/documents/validateUserMIFreeValue.graphql +0 -3
  871. package/projects/obtservices/graphQL/schema/schema.graphql +0 -2635
  872. package/projects/obtservices/karma.conf.js +0 -32
  873. package/projects/obtservices/ng-package.json +0 -7
  874. package/projects/obtservices/package-lock.json +0 -5
  875. package/projects/obtservices/package.json +0 -12
  876. package/projects/obtservices/src/obtservices.ts +0 -0
  877. package/projects/obtservices/src/public_api.ts +0 -1
  878. package/projects/obtservices/tsconfig.lib.json +0 -30
  879. package/projects/obtservices/tsconfig.spec.json +0 -17
  880. package/projects/obtservices/tslint.json +0 -17
  881. /package/{projects → dist}/obtservices/README.md +0 -0
  882. /package/{projects/obtservices/angular/src/classes.ts → dist/obtservices/angular/classes.d.ts} +0 -0
  883. /package/{projects/obtservices/angular/src/components.ts → dist/obtservices/angular/components.d.ts} +0 -0
  884. /package/{projects/obtservices/angular/src/public_api.ts → dist/obtservices/angular/public_api.d.ts} +0 -0
  885. /package/{projects/obtservices/angular/src/services.ts → dist/obtservices/angular/services.d.ts} +0 -0
  886. /package/{projects/obtservices/angular/src/types.ts → dist/obtservices/angular/types.d.ts} +0 -0
  887. /package/{projects/obtservices/angular/src/updaters.ts → dist/obtservices/angular/updaters.d.ts} +0 -0
  888. /package/{projects/obtservices/base/src/classes.ts → dist/obtservices/base/classes.d.ts} +0 -0
  889. /package/{projects/obtservices/base/src/interfaces.ts → dist/obtservices/base/interfaces.d.ts} +0 -0
  890. /package/{projects/obtservices/base/src/models.ts → dist/obtservices/base/models.d.ts} +0 -0
  891. /package/{projects/obtservices/base/src/public_api.ts → dist/obtservices/base/public_api.d.ts} +0 -0
  892. /package/{projects/obtservices/base/src/services.ts → dist/obtservices/base/services.d.ts} +0 -0
  893. /package/{projects/obtservices/angular/src/testers.ts → dist/obtservices/base/testers.d.ts} +0 -0
  894. /package/{projects/obtservices/base/src/types.ts → dist/obtservices/base/types.d.ts} +0 -0
  895. /package/{projects/obtservices/base/src/updaters.ts → dist/obtservices/base/updaters.d.ts} +0 -0
@@ -1,2399 +0,0 @@
1
- import moment from 'moment';
2
- import { BaseEnterpriseSearch } from './base-enterprise';
3
- import { BaseStorageService } from '../services/storage.service';
4
- import { BaseHelperRoutines } from './helpers';
5
- import { Traveller } from '../models/traveller.object';
6
- import { BehaviorSubject, combineLatest } from 'rxjs';
7
- import { ValueDisplay } from '../interfaces/value-display';
8
- import { FlightFilters } from '../interfaces/flight-filters.interface';
9
- import { SelectFilter } from '../interfaces/select-filter.interface';
10
- import {
11
- AddItemToBasketMutationVariables,
12
- BasketItem,
13
- CurrencyCode,
14
- DestinationEntry,
15
- FareType,
16
- FlightCabinClass,
17
- FlightItinerary,
18
- FlightJourney,
19
- FlightPassengerObject,
20
- FlightPassengerType,
21
- GroupedFieldsFragment,
22
- ItinerarySummary,
23
- MatchingFlights,
24
- SaveRecentSearchMutationVariables,
25
- SearchFlightsV2QueryVariables,
26
- ServiceType
27
- } from '../types/graphql.types';
28
- import {
29
- FlightAllQuoteResult,
30
- FlightGroupedQuoteResult,
31
- FlightItineraryClass,
32
- FlightQuoteResultArray,
33
- NgbDateStruct,
34
- OBTAirportDetails,
35
- OBTAirlinesDetails,
36
- FlightDirectionEnum,
37
- GroupedFlights,
38
- FlightItineraryWithSelected,
39
- RecentSearch
40
- } from '../types/types';
41
- import {
42
- BaseFlightQuoteFetcher,
43
- FlightQuoteFetcherType
44
- } from '../fetchers/flight-quote.fetcher';
45
- import {
46
- FullUserDetails,
47
- UserServiceInterface
48
- } from '../interfaces/Iuser.service';
49
- import { EnterpriseSearchServiceInterface } from '../interfaces/Isearch.service';
50
- import {
51
- FlightEnterpriseSearchInterface,
52
- FlightTempParams
53
- } from '../interfaces/Iflight-enterprise-search';
54
- import { ICheapestPrice } from '../interfaces/cheapest-price';
55
- import { FlightSearchType } from './flight-search-type.enum';
56
- import { IMultiDestination } from '../interfaces/flight-multi-destination.interface';
57
- import {
58
- EnterpriseBasketServiceInterface,
59
- InternalBasketInterface
60
- } from '../interfaces/Ienterprise-basket.service';
61
- export interface AllowedClass {
62
- name: string;
63
- type: FlightCabinClass | null;
64
- }
65
-
66
- export interface FlightOperator {
67
- code: string;
68
- name: string;
69
- }
70
-
71
- export type AllowedClasses = AllowedClass[];
72
-
73
- export enum TimeWindow {
74
- Anytime = 'Anytime',
75
- Depart = 'Depart By',
76
- Arrive = 'Arrive By'
77
- }
78
-
79
- export enum SortTypes {
80
- CheapestFirst = 'C',
81
- MostExpensiveFirst = 'M',
82
- FastestFirst = 'F',
83
- PreferredFirst = 'P',
84
- LowestEmissions = 'L'
85
- }
86
-
87
- export type FlightGroups =
88
- | 'LiteEconomy'
89
- | 'Economy'
90
- | 'EconomyNoBags'
91
- | 'EconomyRestricted'
92
- | 'PremiumEconomy'
93
- | 'Business'
94
- | 'PremiumBusiness'
95
- | 'First'
96
- | 'PremiumFirst';
97
-
98
- export type RestrictedFlightGroups =
99
- | 'Economy'
100
- | 'EconomyNoBags'
101
- | 'EconomyRestricted'
102
- | 'PremiumEconomy'
103
- | 'Business'
104
- | 'First';
105
-
106
- interface FlightSessionType {
107
- results: FlightQuoteResultArray;
108
- groupData: { [key: number]: number[] };
109
- grouped: GroupedFlights;
110
- query: SearchFlightsV2QueryVariables;
111
- }
112
-
113
- export class FlightEnterpriseSearch<FQ_Q extends FlightQuoteFetcherType>
114
- extends BaseEnterpriseSearch<
115
- FlightTempParams,
116
- FlightAllQuoteResult,
117
- FlightQuoteResultArray
118
- >
119
- implements FlightEnterpriseSearchInterface
120
- {
121
- static readonly STORAGE_SESSION_PARAMS = 'search_flight';
122
- static readonly STORAGE_SESSION_RESULTS = 'results_flight';
123
-
124
- public type: ServiceType = ServiceType.Flight;
125
-
126
- avaliableClasses: BehaviorSubject<AllowedClasses> =
127
- new BehaviorSubject<AllowedClasses>([]);
128
- timeCriteriaOptions: BehaviorSubject<TimeWindow[]> = new BehaviorSubject<
129
- TimeWindow[]
130
- >([]);
131
- flightOperators: BehaviorSubject<FlightOperator[]> = new BehaviorSubject<
132
- FlightOperator[]
133
- >([]);
134
-
135
- private _negotiated: boolean = false;
136
- private _nearby_airports: boolean = false;
137
-
138
- private _timeArray: ValueDisplay[];
139
- private _sortArray: ValueDisplay[] = [
140
- { display: 'Cheapest First', value: SortTypes.CheapestFirst },
141
- { display: 'Most Expensive First', value: SortTypes.MostExpensiveFirst },
142
- { display: 'Fastest First', value: SortTypes.FastestFirst },
143
- { display: 'Preferred Fares First', value: SortTypes.PreferredFirst },
144
- { display: 'Lowest Co2 Emissions First', value: SortTypes.LowestEmissions }
145
- ];
146
-
147
- private _fareTypeArray: ValueDisplay[] = [
148
- { value: FareType.Flexible, display: 'Flexible' },
149
- { value: FareType.Leisure, display: 'Leisure' },
150
- { value: FareType.Lowest, display: 'Lowest' },
151
- { value: FareType.Negotiated, display: 'Negotiated' },
152
- { value: FareType.NonNegotiated, display: 'Non-Negotiated' },
153
- { value: FareType.RequestFareRules, display: 'Request Fare Rules' },
154
- { value: FareType.SelectAndPro, display: 'Select & Pro' }
155
- ];
156
-
157
- public minimumOutBoundDate = {
158
- year: moment().year(),
159
- month: moment().month() + 1,
160
- day: moment().date()
161
- };
162
-
163
- public minimumInBoundDate = {
164
- year: moment().year(),
165
- month: moment().month() + 1,
166
- day: moment().date()
167
- };
168
- private _outDate: NgbDateStruct;
169
- private _outTime: string;
170
- private _inDate: NgbDateStruct;
171
- private _inTime: string;
172
- private _destinationAirport: any;
173
- private _originAirport: any;
174
- private _passengers: any;
175
- private groupedObject: FlightItineraryWithSelected[];
176
- protected flightsToGroup: { [key: number]: number[] } = {};
177
- protected resultQuery: SearchFlightsV2QueryVariables;
178
- protected grouped: GroupedFlights = null;
179
- travellers: Traveller[] = null;
180
- protected resultsSessionName = FlightEnterpriseSearch.STORAGE_SESSION_RESULTS;
181
- selectedGroupFlight: FlightItineraryWithSelected;
182
- private _showHotelForm: boolean = false;
183
- private _hotelSearchRequested: boolean = false;
184
-
185
- public get timeArray() {
186
- this._timeArray =
187
- this._timeArray ||
188
- Array(96)
189
- .fill(0)
190
- .map((_, index: number) => {
191
- return {
192
- value:
193
- Math.floor(index / 4)
194
- .toString()
195
- .padStart(2, '0') +
196
- ':' +
197
- ((index % 4) * 15).toString().padStart(2, '0'),
198
- display:
199
- Math.floor(index / 4)
200
- .toString()
201
- .padStart(2, '0') +
202
- ':' +
203
- ((index % 4) * 15).toString().padStart(2, '0')
204
- };
205
- });
206
- return this._timeArray;
207
- }
208
-
209
- public get preferredCarriers(): OBTAirlinesDetails[] {
210
- return this.tempParams.preferredCarriers;
211
- }
212
-
213
- public set preferredCarriers(value: OBTAirlinesDetails[]) {
214
- this.tempParams.preferredCarriers = value;
215
- this._isValid();
216
- }
217
-
218
- public get operator1(): OBTAirlinesDetails {
219
- return this.tempParams.preferredCarriers[0];
220
- }
221
-
222
- public set operator1(value: OBTAirlinesDetails) {
223
- this.tempParams.preferredCarriers[0] = value;
224
- this._isValid();
225
- }
226
- public get operator2(): OBTAirlinesDetails {
227
- return this.tempParams.preferredCarriers[1];
228
- }
229
-
230
- public set operator2(value: OBTAirlinesDetails) {
231
- this.tempParams.preferredCarriers[1] = value;
232
- this._isValid();
233
- }
234
- public get operator3(): OBTAirlinesDetails {
235
- return this.tempParams.preferredCarriers[2];
236
- }
237
-
238
- public set operator3(value: OBTAirlinesDetails) {
239
- this.tempParams.preferredCarriers[2] = value;
240
- this._isValid();
241
- }
242
- public get operator4(): OBTAirlinesDetails {
243
- return this.tempParams.preferredCarriers[3];
244
- }
245
-
246
- public set operator4(value: OBTAirlinesDetails) {
247
- this.tempParams.preferredCarriers[3] = value;
248
- this._isValid();
249
- }
250
-
251
- private _minDate: NgbDateStruct;
252
- public get minDate(): NgbDateStruct {
253
- this._minDate = this._minDate || this.helpers.momentToNgDate(moment());
254
- return this._minDate;
255
- }
256
-
257
- public get adults(): number {
258
- return this.tempParams.adults;
259
- }
260
-
261
- public set adults(value: number) {
262
- this.tempParams.adults = Number(value);
263
- this.updateTravellers();
264
- }
265
-
266
- public get children(): number {
267
- return this.tempParams.children;
268
- }
269
-
270
- public set children(value: number) {
271
- this.tempParams.children = Number(value);
272
- this.updateTravellers();
273
- }
274
-
275
- public get departLocation(): string | OBTAirportDetails {
276
- return this.tempParams.departLocation;
277
- }
278
-
279
- public set departLocation(value: string | OBTAirportDetails) {
280
- this.tempParams.departLocation = value;
281
- if (typeof value === 'string') {
282
- this._originAirport = '';
283
- } else if (value && value.gateway) {
284
- this._originAirport = value.gateway;
285
- } else {
286
- this._originAirport = null;
287
- }
288
- this._isValid();
289
- }
290
-
291
- public get queryOriginAiport(): string {
292
- return this._originAirport;
293
- }
294
-
295
- public get queryDestinationAiport(): string {
296
- return this._destinationAirport;
297
- }
298
-
299
- public get departDate(): NgbDateStruct {
300
- return this._outDate;
301
- }
302
-
303
- public set departDate(value: NgbDateStruct) {
304
- this._outDate = value;
305
- this.outBoundDate = this.helpers.ngDateToMoment(
306
- this._outDate,
307
- this._outTime
308
- );
309
- }
310
-
311
- public get departTime(): string {
312
- return this._outTime;
313
- }
314
-
315
- public set departTime(value: string) {
316
- this._outTime = value;
317
- this.outBoundDate = this.helpers.ngDateToMoment(
318
- this._outDate,
319
- this._outTime
320
- );
321
- }
322
-
323
- public get outBoundDate(): moment.Moment {
324
- return this.tempParams.outBoundDate;
325
- }
326
-
327
- public set outBoundDate(value: moment.Moment) {
328
- this.tempParams.outBoundDate = value.isValid() ? value : null;
329
- this.minimumInBoundDate = {
330
- year: value.year(),
331
- month: value.month() + 1,
332
- day: value.date()
333
- };
334
-
335
- if (
336
- this.tempParams.outBoundDate &&
337
- this.tempParams.inboundDate &&
338
- this.tempParams.outBoundDate.isAfter(this.tempParams.inboundDate)
339
- ) {
340
- this.inboundDate = moment(this.tempParams.outBoundDate).add(1, 'day');
341
- }
342
- this._outDate = this.helpers.momentToNgDate(value);
343
- this._outTime = this.helpers.formatTimeColon(value);
344
- this._isValid();
345
- }
346
-
347
- public get returnDate(): NgbDateStruct {
348
- return this._inDate;
349
- }
350
-
351
- public set returnDate(value: NgbDateStruct) {
352
- this._inDate = value;
353
- this.inboundDate = this.helpers.ngDateToMoment(this._inDate, this._inTime);
354
- }
355
-
356
- public get arriveTime(): string {
357
- return this._inTime;
358
- }
359
-
360
- public set arriveTime(value: string) {
361
- this._inTime = value;
362
- this.inboundDate = this.helpers.ngDateToMoment(this._inDate, this._inTime);
363
- }
364
-
365
- public get inboundDate(): moment.Moment {
366
- return this.tempParams.inboundDate;
367
- }
368
-
369
- public set inboundDate(value: moment.Moment) {
370
- this.tempParams.inboundDate = value.isValid() ? value : null;
371
- this._inDate = this.helpers.momentToNgDate(value);
372
- this._inTime = this.helpers.formatTimeColon(value);
373
- this._isValid();
374
- }
375
-
376
- public get arriveLocation(): string | OBTAirportDetails {
377
- return this.tempParams.arriveLocation;
378
- }
379
-
380
- public set arriveLocation(value: string | OBTAirportDetails) {
381
- this.tempParams.arriveLocation = value;
382
- if (typeof value === 'string') {
383
- this._destinationAirport = '';
384
- } else if (value && value.gateway) {
385
- this._destinationAirport = value.gateway;
386
- } else {
387
- this._destinationAirport = null;
388
- }
389
- this._isValid();
390
- }
391
-
392
- get cabinClass(): FlightCabinClass | null {
393
- return this.tempParams.cabinClass;
394
- }
395
-
396
- set cabinClass(value: FlightCabinClass | null) {
397
- this.tempParams.cabinClass = value;
398
- this._isValid();
399
- }
400
-
401
- get returnCabinClass(): FlightCabinClass | null {
402
- return this.tempParams.returnCabinClass;
403
- }
404
-
405
- set returnCabinClass(value: FlightCabinClass | null) {
406
- this.tempParams.returnCabinClass = value;
407
- this._isValid();
408
- }
409
-
410
- get chosenSearchType(): FlightSearchType {
411
- return this.tempParams.chosenSearchType;
412
- }
413
-
414
- set chosenSearchType(type: FlightSearchType) {
415
- this.tempParams.chosenSearchType = type;
416
- }
417
-
418
- get isReturn(): boolean {
419
- return this.tempParams.chosenSearchType === FlightSearchType.return;
420
- }
421
-
422
- get outTimeCriteria(): TimeWindow {
423
- return this.tempParams.outTimeCriteria;
424
- }
425
-
426
- set outTimeCriteria(value: TimeWindow) {
427
- this.tempParams.outTimeCriteria = value;
428
- this._isValid();
429
- }
430
-
431
- get inTimeCriteria(): TimeWindow {
432
- return this.tempParams.inTimeCriteria;
433
- }
434
-
435
- set inTimeCriteria(value: TimeWindow) {
436
- this.tempParams.inTimeCriteria = value;
437
- this._isValid();
438
- }
439
- get maxConnections(): number {
440
- return this.tempParams.maxConnections;
441
- }
442
-
443
- set maxConnections(value: number) {
444
- this.tempParams.maxConnections = value;
445
- }
446
-
447
- private _multiDestination: DestinationEntry[] = [];
448
- get multiDestination(): IMultiDestination[] {
449
- return this.tempParams.multiDestination;
450
- }
451
-
452
- set multiDestination(valueArray: IMultiDestination[]) {
453
- this.tempParams.multiDestination = valueArray;
454
- this._isValid();
455
- }
456
-
457
- public get showHotelForm(): boolean {
458
- return this._showHotelForm;
459
- }
460
-
461
- public set showHotelForm(newVal: boolean) {
462
- this._showHotelForm = newVal;
463
- }
464
-
465
- public get hotelSearchRequested(): boolean {
466
- return this._hotelSearchRequested;
467
- }
468
-
469
- public set hotelSearchRequested(newVal: boolean) {
470
- this._hotelSearchRequested = newVal;
471
- }
472
-
473
- setMultiDestinationQuery(multiDestination: IMultiDestination[]) {
474
- const newMultiDestination = this.helpers.clone(multiDestination);
475
- return newMultiDestination.reduce(
476
- (destinationArray: DestinationEntry[], item: IMultiDestination) => {
477
- const destinationObject = {} as DestinationEntry;
478
- destinationObject.orig = item.orig.gateway;
479
- destinationObject.dest = item.dest.gateway;
480
- destinationObject.date = this.helpers.formatIsoDate(item.date);
481
- destinationArray.push(destinationObject);
482
- return destinationArray;
483
- },
484
- [] as DestinationEntry[]
485
- );
486
- }
487
-
488
- // get only
489
- get sortDropdownValues(): ValueDisplay[] {
490
- return this._sortArray;
491
- }
492
-
493
- get fareTypesValues(): ValueDisplay[] {
494
- return this._fareTypeArray;
495
- }
496
-
497
- get fareType(): FareType {
498
- return this.tempParams.fareType;
499
- }
500
-
501
- set fareType(value: FareType) {
502
- this.tempParams.fareType = value;
503
- this._isValid();
504
- }
505
-
506
- get negotiated(): boolean {
507
- return this._negotiated;
508
- }
509
-
510
- set negotiated(value: boolean) {
511
- this._negotiated = value;
512
- }
513
-
514
- get includeNearbyAirports(): boolean {
515
- return this.tempParams.includeNearbyAirports;
516
- }
517
-
518
- set includeNearbyAirports(value: boolean) {
519
- this.tempParams.includeNearbyAirports = value;
520
- }
521
- constructor(
522
- private flightfetcher: BaseFlightQuoteFetcher<FQ_Q>,
523
- private helpers: BaseHelperRoutines,
524
- userService: UserServiceInterface,
525
- private basketService: EnterpriseBasketServiceInterface,
526
- storageService: BaseStorageService,
527
- private searchService: EnterpriseSearchServiceInterface
528
- ) {
529
- super(
530
- storageService,
531
- (results: FlightAllQuoteResult): FlightQuoteResultArray => {
532
- this.flightsToGroup = {};
533
- this.grouped = results.grouped || [];
534
- this.resultQuery = this.getSearchQuery();
535
- delete this.resultQuery.withGrouped;
536
-
537
- if (results && this.searchService.isFlightsGrouped()) {
538
- this.groupedObject = (results.multi || [])
539
- .reduce(
540
- (
541
- previousItems: FlightItineraryWithSelected[],
542
- nextItem: ItinerarySummary
543
- ) => {
544
- return previousItems.concat(nextItem.results);
545
- },
546
- results.journeys as unknown as FlightItineraryWithSelected[]
547
- )
548
- .map((flight: FlightItineraryWithSelected) => {
549
- return Object.assign(flight, { seleced: false, canSelect: true });
550
- });
551
-
552
- const returnData = (results.grouped || []).reduce(
553
- (
554
- acc: FlightGroupedQuoteResult[],
555
- item: GroupedFieldsFragment,
556
- groupNumber: number
557
- ): FlightGroupedQuoteResult[] => {
558
- const isOutBound =
559
- item.boundIndicator === FlightDirectionEnum.Outbound;
560
- const returnObject: FlightGroupedQuoteResult = {
561
- direction: item.boundIndicator,
562
- classes: {
563
- [FlightCabinClass.EconomyNoBags]:
564
- null as FlightItineraryClass,
565
- [FlightCabinClass.EconomyRestricted]:
566
- null as FlightItineraryClass,
567
- [FlightCabinClass.Economy]: null as FlightItineraryClass,
568
- [FlightCabinClass.Business]: null as FlightItineraryClass,
569
- [FlightCabinClass.First]: null as FlightItineraryClass,
570
- [FlightCabinClass.PremiumEconomy]:
571
- null as FlightItineraryClass
572
- },
573
- originAirport: '',
574
- originAirportName: '',
575
- destinationAirport: '',
576
- destinationAirportName: '',
577
- departDateTime: '',
578
- arrivalDateTime: '',
579
- outboundTotalDuration: 0,
580
- inboundTotalDuration: 0,
581
- outlegs: null,
582
- inlegs: null,
583
- outlegsCount: 0,
584
- inlegsCount: 0,
585
- dataSource: '',
586
- preferred: false,
587
- outboundFlightNumber: '',
588
- operator: '',
589
- operatorFull: '',
590
- inboundFlightNumber: '',
591
- isReturn: false
592
- };
593
- const brands: MatchingFlights = item.flights;
594
-
595
- Object.keys(brands)
596
- .filter((key: string) => key[0] !== '_')
597
- .forEach((brand: FlightGroups) => {
598
- if (!brands[brand].length) {
599
- return;
600
- }
601
- // ! using a reduce because not all flights actually exist and we were seeing undefined in the flight list
602
- const matchingBrandFlights: FlightItinerary[] = brands[
603
- brand
604
- ].reduce((acc1: FlightItinerary[], flightNum: number, i) => {
605
- (this.flightsToGroup[flightNum] =
606
- this.flightsToGroup[flightNum] || []).push(groupNumber);
607
- const flight = this.groupedObject[flightNum];
608
- if (isOutBound) {
609
- this.createGroupedItem(
610
- returnObject,
611
- flight.source,
612
- flight.outboundFlights,
613
- flight.outboundTotalDuration,
614
- flight.inboundFlights,
615
- flight.inboundTotalDuration
616
- );
617
- } else {
618
- this.createGroupedItem(
619
- returnObject,
620
- flight.source,
621
- flight.inboundFlights,
622
- flight.inboundTotalDuration,
623
- flight.outboundFlights,
624
- flight.outboundTotalDuration
625
- );
626
- }
627
- if (flight) {
628
- acc1.push(flight);
629
- }
630
- return acc1;
631
- }, []);
632
- let correctBrand: RestrictedFlightGroups;
633
-
634
- switch (brand) {
635
- case FlightCabinClass.LiteEconomy:
636
- case FlightCabinClass.Economy:
637
- correctBrand = FlightCabinClass.Economy;
638
- break;
639
- case FlightCabinClass.EconomyNoBags:
640
- correctBrand = FlightCabinClass.EconomyNoBags;
641
- break;
642
- case FlightCabinClass.EconomyRestricted:
643
- correctBrand = FlightCabinClass.EconomyRestricted;
644
- break;
645
- case FlightCabinClass.PremiumBusiness:
646
- case FlightCabinClass.Business:
647
- correctBrand = FlightCabinClass.Business;
648
- break;
649
- case FlightCabinClass.PremiumFirst:
650
- case FlightCabinClass.First:
651
- correctBrand = FlightCabinClass.First;
652
- break;
653
- case FlightCabinClass.PremiumEconomy:
654
- correctBrand = FlightCabinClass.PremiumEconomy;
655
- break;
656
- default:
657
- console.log('something went wrong');
658
- break;
659
- }
660
-
661
- const minprice =
662
- this.getMinFlightPriceForBrand(matchingBrandFlights);
663
- const maxprice =
664
- this.getMaxFlightPriceForBrand(matchingBrandFlights);
665
- if (returnObject.classes[correctBrand]?.flights?.length) {
666
- returnObject.classes[correctBrand].flights.concat(
667
- matchingBrandFlights
668
- );
669
- returnObject.classes[correctBrand].minprice = Math.min(
670
- returnObject.classes[correctBrand].minprice,
671
- minprice
672
- );
673
- returnObject.classes[correctBrand].maxprice = Math.max(
674
- returnObject.classes[correctBrand].maxprice,
675
- maxprice
676
- );
677
- } else {
678
- returnObject.classes[correctBrand] = {
679
- flights: matchingBrandFlights,
680
- minprice,
681
- maxprice,
682
- currency: matchingBrandFlights[0].total.currency
683
- };
684
- }
685
- });
686
- if (returnObject) {
687
- acc.push(returnObject);
688
- }
689
- return acc;
690
- },
691
- []
692
- );
693
-
694
- console.log('Processed Grouped data', returnData);
695
- return returnData;
696
- } else {
697
- return results ? [results] : [];
698
- }
699
- }
700
- );
701
-
702
- const data: {
703
- tempParams: FlightTempParams;
704
- originalUserSearch: FlightTempParams;
705
- } = storageService.getSessionItem(
706
- FlightEnterpriseSearch.STORAGE_SESSION_PARAMS
707
- ) || {
708
- tempParams: {} as FlightTempParams,
709
- originalUserSearch: {} as FlightTempParams
710
- };
711
- // data.tempParams.adults = 1;
712
- // data.tempParams.cabinClass = [FlightCabinClass.Economy];
713
- const query = searchService.makeFlightQuery(data.tempParams);
714
- this.updateTempParams(query);
715
- this._originalUserSearch = data.originalUserSearch;
716
- if (searchService.shouldAddTravellerSubscription()) {
717
- searchService.travellerInformation.subscribe(
718
- (travellers: Traveller[]) => {
719
- this.travellers = travellers;
720
- const splitTravellers = this.helpers.selectedTravellers(
721
- travellers,
722
- ServiceType.Flight
723
- );
724
- this.tempParams.adults = splitTravellers.adults.length;
725
- this.tempParams.children = splitTravellers.children.length;
726
- // this.tempParams.infants = splitTravellers.infants.length;
727
-
728
- this.updateTravellers();
729
- this._isValid();
730
- }
731
- );
732
- }
733
-
734
- userService.changeUser.subscribe((user: FullUserDetails) => {
735
- this.timeCriteriaOptions.next([
736
- TimeWindow.Anytime,
737
- TimeWindow.Arrive,
738
- TimeWindow.Depart
739
- ]); // TODO update with any UFs
740
- this.flightOperators.next([{ code: 'BA', name: 'British Airways' }]); // Fetch these from DB
741
- this.updateAvaliableClasses();
742
- });
743
-
744
- this.updateTravellers();
745
-
746
- if (this.isValid.value) {
747
- const results: FlightSessionType = storageService.getSessionItem(
748
- this.resultsSessionName
749
- ) || {
750
- results: [],
751
- groupData: {},
752
- grouped: [],
753
- query: {} as SearchFlightsV2QueryVariables
754
- };
755
- this.fullResults = this.helpers.clone(results.results);
756
- this.flightsToGroup = results.groupData || {};
757
- this.resultQuery = results.query;
758
- // if (results == null && this.isValid) {
759
- // searchService.startSearches();
760
- // }
761
- // this._cheapestResultPrice = this.updateLowestPrice(results);
762
- this.results.next(results.results || ([] as FlightQuoteResultArray));
763
- }
764
-
765
- this.negotiated =
766
- this.tempParams.fareType === FareType.Negotiated ? true : false;
767
- }
768
- private createGroupedItem(
769
- returnObject: FlightGroupedQuoteResult,
770
- source: string,
771
- outboundFlights: FlightJourney[],
772
- outboundTotalDuration: number,
773
- inboundFlights: FlightJourney[],
774
- inboundTotalDuration: number
775
- ) {
776
- if (outboundFlights?.length && !returnObject.departDateTime) {
777
- const first = outboundFlights[0];
778
- const last = outboundFlights[outboundFlights.length - 1];
779
- returnObject.originAirport = first.originAirport;
780
- returnObject.originAirportName = first.originAirportName;
781
- returnObject.destinationAirport = last.destinationAirport;
782
- returnObject.destinationAirportName = last.destinationAirportName;
783
- returnObject.departDateTime = first.dateTimeDeparting;
784
- returnObject.arrivalDateTime = last.dateTimeArriving;
785
- returnObject.outboundTotalDuration = outboundTotalDuration;
786
- returnObject.dataSource = source;
787
- returnObject.operator = first.marketingCarrier;
788
- returnObject.operatorFull = first.marketingCarrierName;
789
- returnObject.outlegsCount = outboundFlights.length;
790
- returnObject.outlegs = outboundFlights;
791
- returnObject.outboundFlightNumber =
792
- this.helpers.joinFromAttribute<FlightJourney>(
793
- '-',
794
- 'marketingFlightNumber',
795
- outboundFlights
796
- );
797
-
798
- returnObject.isReturn = false;
799
- }
800
-
801
- if (inboundFlights?.length && !returnObject.inboundTotalDuration) {
802
- returnObject.inboundTotalDuration = inboundTotalDuration;
803
- returnObject.inlegsCount = inboundFlights.length;
804
- returnObject.inlegs = inboundFlights;
805
- returnObject.inboundFlightNumber =
806
- this.helpers.joinFromAttribute<FlightJourney>(
807
- '-',
808
- 'operatingFlightNumber',
809
- inboundFlights
810
- );
811
-
812
- returnObject.isReturn = true;
813
- }
814
- }
815
-
816
- protected makeSessionResults(
817
- data: FlightQuoteResultArray
818
- ): FlightSessionType {
819
- return {
820
- results: data,
821
- groupData: this.flightsToGroup,
822
- grouped: this.grouped,
823
- query: this.resultQuery
824
- };
825
- }
826
-
827
- getMaxFlightPriceForBrand(matchingBrandFlights: FlightItinerary[]): number {
828
- let max = 0;
829
- matchingBrandFlights.forEach((flight) => {
830
- if (max < flight?.total?.price) {
831
- max = flight.total.price;
832
- }
833
- });
834
- return max;
835
- }
836
- getMinFlightPriceForBrand(matchingBrandFlights: FlightItinerary[]): number {
837
- let min = Number.MAX_SAFE_INTEGER;
838
- matchingBrandFlights.forEach((flight) => {
839
- if (min > flight?.total?.price) {
840
- min = flight.total.price;
841
- }
842
- });
843
- return min;
844
- }
845
-
846
- protected resetQuery(checkIsValid: boolean = true): void {
847
- this.updateTempParams(this.searchService.makeFlightQuery());
848
- if (checkIsValid) {
849
- this._isValid();
850
- }
851
- }
852
-
853
- public resetParams(): void {
854
- this.reset();
855
- this.resetQuery();
856
- }
857
-
858
- private _isValid() {
859
- if (!this.doChecks) {
860
- return;
861
- }
862
- this.storageService.setSessionItem(
863
- FlightEnterpriseSearch.STORAGE_SESSION_PARAMS,
864
- {
865
- tempParams: this.tempParams,
866
- originalUserSearch: this.originalUserSearch
867
- }
868
- );
869
-
870
- this.validationMessages = [];
871
- if (this.tempParams.chosenSearchType === FlightSearchType.multiCity) {
872
- this.multiCityValidation();
873
- } else {
874
- if (!this._originAirport) {
875
- this.validationMessages.push('Please add in a departure location');
876
- }
877
- if (!this._destinationAirport) {
878
- this.validationMessages.push('Please add in an arrival destination');
879
- }
880
- if (!this.tempParams.outBoundDate.isAfter(moment())) {
881
- this.validationMessages.push('Departure date can not be in the past');
882
- }
883
-
884
- if (
885
- this._originAirport &&
886
- this._destinationAirport &&
887
- this._destinationAirport === this._originAirport
888
- ) {
889
- this.validationMessages.push(
890
- 'Origin and destination airport cannot be the same'
891
- );
892
- }
893
- if (this.isReturn) {
894
- // TODO check that return details are set
895
- if (
896
- this.tempParams.outBoundDate.isSameOrAfter(
897
- this.tempParams.inTimeCriteria
898
- )
899
- ) {
900
- this.validationMessages.push(
901
- 'Return date must be after the departure date'
902
- );
903
- }
904
- }
905
- this.isValid.next(this.validationMessages.length === 0);
906
- this.messages.next(this.validationMessages);
907
- }
908
- }
909
-
910
- multiCityValidation() {
911
- let isemptyValue = false;
912
- let isemptyLanding = false;
913
- let isSameValue = false;
914
- this.tempParams.multiDestination.map((element, i) => {
915
- if (!element.orig) {
916
- isemptyValue = true;
917
- if (i < 2) {
918
- isemptyLanding = true;
919
- }
920
- }
921
- if (element.orig === element.dest) isSameValue = true;
922
- });
923
- if (!moment(this.tempParams.multiDestination[0].date).isAfter(moment())) {
924
- this.validationMessages.push('Departure date can not be in the past');
925
- }
926
- if (isemptyLanding)
927
- this.validationMessages.push('Please select landing airport(s)');
928
- if (isemptyValue)
929
- this.validationMessages.push('Please select take off airport(s)');
930
- if (isSameValue)
931
- this.validationMessages.push(
932
- 'Take off and landing location(s) cannot be the same'
933
- );
934
- }
935
- startSearch(): Promise<boolean> {
936
- this.results.next([]);
937
- this._isValid();
938
-
939
- if (this.isValid.value) {
940
- this._originalUserSearch = Object.freeze({ ...this.tempParams });
941
- this.storageService.setSessionItem(
942
- FlightEnterpriseSearch.STORAGE_SESSION_PARAMS,
943
- {
944
- tempParams: this.tempParams,
945
- originalUserSearch: this.originalUserSearch
946
- }
947
- );
948
- const query = this.getSearchQuery();
949
- this.searchService.saveRecentSearch(this.getRecentSearchQuery(query));
950
-
951
- return this._startSearch(this.flightfetcher.fetchList(query));
952
- } else {
953
- return Promise.resolve(false);
954
- }
955
- }
956
-
957
- getRecentSearchQuery(
958
- query: SearchFlightsV2QueryVariables
959
- ): SaveRecentSearchMutationVariables {
960
- return {
961
- serviceType: ServiceType.Flight,
962
- searchArgs: query,
963
- travelDate: this.outBoundDate.format(),
964
- travellers: this.helpers.getTravellersId(this.travellers)
965
- };
966
- }
967
-
968
- public startRecentSearch(recentSearch: RecentSearch): void {
969
- if (recentSearch.searchArgs.outboundDate) {
970
- this.outBoundDate = this.convertRecentSearchDateTime(
971
- recentSearch.searchArgs.outboundDate,
972
- recentSearch.searchArgs.outboundDepartureTimeWindow
973
- );
974
- }
975
-
976
- if (recentSearch.searchArgs.returnDate) {
977
- this.inboundDate = this.convertRecentSearchDateTime(
978
- recentSearch.searchArgs.returnDate,
979
- recentSearch.searchArgs.returnDepartureTimeWindow
980
- );
981
- }
982
-
983
- this.fareType = recentSearch.searchArgs.fareType;
984
- this.maxConnections = recentSearch.searchArgs.maxConnections;
985
-
986
- if (recentSearch.searchArgs.outboundCabinClass) {
987
- this.cabinClass = recentSearch.searchArgs.outboundCabinClass[0];
988
- }
989
- if (recentSearch.searchArgs.returnCabinClass) {
990
- this.returnCabinClass = recentSearch.searchArgs.returnCabinClass[0];
991
- }
992
-
993
- this.includeNearbyAirports = recentSearch.searchArgs.includeNearbyAirports
994
- ? true
995
- : false;
996
-
997
- this.chosenSearchType = recentSearch.searchArgs.returnTrip
998
- ? FlightSearchType.return
999
- : FlightSearchType.oneWay;
1000
-
1001
- if (recentSearch.searchArgs.outboundDepartureTimeWindow) {
1002
- this.outTimeCriteria = TimeWindow.Depart;
1003
- } else if (recentSearch.searchArgs.outboundArrivalTimeWindow) {
1004
- this.outTimeCriteria = TimeWindow.Arrive;
1005
- } else {
1006
- this.outTimeCriteria = TimeWindow.Anytime;
1007
- }
1008
-
1009
- if (recentSearch.searchArgs.returnDepartureTimeWindow) {
1010
- this.inTimeCriteria = TimeWindow.Depart;
1011
- } else if (recentSearch.searchArgs.returnArrivalTimeWindow) {
1012
- this.inTimeCriteria = TimeWindow.Arrive;
1013
- } else {
1014
- this.inTimeCriteria = TimeWindow.Anytime;
1015
- }
1016
-
1017
- combineLatest([
1018
- this.searchService.getAirportByCode(
1019
- recentSearch.searchArgs.originAirport
1020
- ),
1021
- this.searchService.getAirportByCode(
1022
- recentSearch.searchArgs.destinationAirport
1023
- )
1024
- ]).subscribe(([departLocation, arriveLocation]) => {
1025
- if (departLocation && arriveLocation) {
1026
- this.departLocation = {
1027
- destination: departLocation.iataMatch.name,
1028
- gateway: departLocation.iataMatch.iata,
1029
- terminals: this.searchService.processTerminals(
1030
- departLocation.iataMatch.terminals
1031
- ),
1032
- country: departLocation.iataMatch?.locationDetails?.country,
1033
- postcode: departLocation.iataMatch?.locationDetails?.postcode,
1034
- countryCode: departLocation.iataMatch?.locationDetails?.countryCode
1035
- };
1036
- this.arriveLocation = {
1037
- destination: arriveLocation.iataMatch.name,
1038
- gateway: arriveLocation.iataMatch.iata,
1039
- terminals: this.searchService.processTerminals(
1040
- arriveLocation.iataMatch.terminals
1041
- ),
1042
- country: arriveLocation.iataMatch?.locationDetails?.country,
1043
- postcode: arriveLocation.iataMatch?.locationDetails?.postcode,
1044
- countryCode: arriveLocation.iataMatch?.locationDetails?.countryCode
1045
- };
1046
-
1047
- if (recentSearch.searchArgs.preferredCarriers) {
1048
- let preferredCarriers: OBTAirlinesDetails[] = [];
1049
- recentSearch.searchArgs.preferredCarriers.map(
1050
- (preferredCarry: string) => {
1051
- this.searchService
1052
- .getAirlinesList(preferredCarry)
1053
- .subscribe((items: OBTAirlinesDetails[]) => {
1054
- items.map((item: OBTAirlinesDetails) => {
1055
- if (item.code === preferredCarry) {
1056
- preferredCarriers.push(item);
1057
- }
1058
- });
1059
- this.preferredCarriers = preferredCarriers;
1060
- this.searchService.startSearches();
1061
- });
1062
- }
1063
- );
1064
- }
1065
- this.searchService.startSearches();
1066
- }
1067
- });
1068
- this.searchService.startSearches();
1069
- }
1070
-
1071
- private makeDepartureTimeWindow(
1072
- dateTime: moment.Moment,
1073
- window: TimeWindow,
1074
- isFlightsGrouped: boolean
1075
- ): string {
1076
- return window === TimeWindow.Depart
1077
- ? isFlightsGrouped
1078
- ? this.helpers.makeTimeWindow(dateTime, -2, 2)
1079
- : this.helpers.makeTimeWindow(dateTime, 0, 4)
1080
- : null;
1081
- }
1082
-
1083
- private makeArrivalTimeWindow(
1084
- dateTime: moment.Moment,
1085
- window: TimeWindow,
1086
- isFlightsGrouped: boolean
1087
- ): string {
1088
- if (window !== TimeWindow.Arrive) return null;
1089
- return isFlightsGrouped
1090
- ? this.helpers.makeTimeWindow(dateTime, -2, 2)
1091
- : this.helpers.makeTimeWindow(dateTime, 0, 4);
1092
- }
1093
-
1094
- convertRecentSearchDateTime(
1095
- date: string,
1096
- timeWindow?: string
1097
- ): moment.Moment {
1098
- if (timeWindow) {
1099
- const flightTime = timeWindow.split('-');
1100
- let timeAndDate = moment(date).add(
1101
- moment.duration(this.helpers.hhmmToTime(flightTime[0]))
1102
- );
1103
- // add 2 hour
1104
- return timeAndDate.clone().add(2, 'hour');
1105
- } else {
1106
- return moment(date);
1107
- }
1108
- }
1109
-
1110
- getSearchQuery(): SearchFlightsV2QueryVariables {
1111
- const isMultiCityActive =
1112
- this.tempParams.chosenSearchType === FlightSearchType.multiCity;
1113
- this._multiDestination = isMultiCityActive
1114
- ? this.setMultiDestinationQuery(this.tempParams.multiDestination)
1115
- : null;
1116
-
1117
- this._multiDestination =
1118
- this.tempParams.chosenSearchType === FlightSearchType.multiCity
1119
- ? this.setMultiDestinationQuery(this.tempParams.multiDestination)
1120
- : [];
1121
- const isFlightsGrouped = this.searchService.isFlightsGrouped();
1122
- return this.helpers.removeNulls<SearchFlightsV2QueryVariables>(
1123
- Object.assign(
1124
- {},
1125
- isMultiCityActive
1126
- ? {
1127
- multiDestination: this._multiDestination
1128
- }
1129
- : {
1130
- originAirport: this._originAirport,
1131
- destinationAirport: this._destinationAirport,
1132
- outboundDate: this.helpers.formatIsoDate(
1133
- this.tempParams.outBoundDate
1134
- ),
1135
- outboundDepartureTimeWindow: this.makeDepartureTimeWindow(
1136
- this.tempParams.outBoundDate,
1137
- this.tempParams.outTimeCriteria,
1138
- isFlightsGrouped
1139
- ),
1140
- outboundArrivalTimeWindow: this.makeArrivalTimeWindow(
1141
- this.tempParams.outBoundDate,
1142
- this.tempParams.outTimeCriteria,
1143
- isFlightsGrouped
1144
- )
1145
- },
1146
- {
1147
- passengers: this._passengers,
1148
- returnTrip: this.isReturn,
1149
- outboundCabinClass: this.tempParams.cabinClass
1150
- ? [this.tempParams.cabinClass]
1151
- : null,
1152
- requireFreeBag: null,
1153
- maxConnections: this.tempParams.maxConnections,
1154
- includeNearbyAirports: this.tempParams.includeNearbyAirports,
1155
- preferredCarriers: this.tempParams.preferredCarriers.map(
1156
- (carrier: OBTAirlinesDetails) =>
1157
- carrier?.code ? carrier.code : null
1158
- ),
1159
- fareType: this.tempParams.fareType,
1160
- withGrouped: isFlightsGrouped
1161
- },
1162
- this.isReturn
1163
- ? {
1164
- returnDate: this.helpers.formatIsoDate(
1165
- this.tempParams.inboundDate
1166
- ),
1167
- returnDepartureTimeWindow: this.makeDepartureTimeWindow(
1168
- this.tempParams.inboundDate,
1169
- this.tempParams.inTimeCriteria,
1170
- isFlightsGrouped
1171
- ),
1172
- returnArrivalTimeWindow: this.makeArrivalTimeWindow(
1173
- this.tempParams.inboundDate,
1174
- this.tempParams.inTimeCriteria,
1175
- isFlightsGrouped
1176
- ),
1177
- returnCabinClass: this.tempParams.returnCabinClass
1178
- ? [this.tempParams.returnCabinClass]
1179
- : null
1180
- }
1181
- : {}
1182
- )
1183
- );
1184
- }
1185
-
1186
- private updateTravellers() {
1187
- const travellers: FlightPassengerObject[] = [];
1188
- for (let loop = 0; loop < this.tempParams.adults; loop += 1) {
1189
- travellers.push({ type: FlightPassengerType.Adult });
1190
- }
1191
- for (let loop = 0; loop < this.tempParams.children; loop += 1) {
1192
- travellers.push({ type: FlightPassengerType.Child });
1193
- }
1194
-
1195
- this._passengers = travellers;
1196
- this._isValid();
1197
- }
1198
-
1199
- private updateAvaliableClasses() {
1200
- this.avaliableClasses.next([
1201
- { name: 'Any', type: FlightCabinClass.Any },
1202
- { name: 'Economy', type: FlightCabinClass.Economy },
1203
- { name: 'Premium', type: FlightCabinClass.PremiumEconomy },
1204
- { name: 'Business', type: FlightCabinClass.Business },
1205
- { name: 'First', type: FlightCabinClass.First }
1206
- ]);
1207
- }
1208
-
1209
- /**
1210
- * @description - sort the flight results
1211
- * @todo - Fill out Preferred and Co2 sorting when we have that data
1212
- */
1213
- public sortResults(
1214
- sortMethodValue: SortTypes,
1215
- givenResults?: FlightItinerary[]
1216
- ): FlightItinerary[] {
1217
- let results = this.helpers.clone(
1218
- givenResults
1219
- ? givenResults
1220
- : <FlightItinerary[]>(<unknown>this.fullResults)
1221
- );
1222
-
1223
- switch (sortMethodValue) {
1224
- case SortTypes.CheapestFirst:
1225
- results = results.sort((a: FlightItinerary, b: FlightItinerary) => {
1226
- return a.total.price - b.total.price;
1227
- });
1228
- break;
1229
- case SortTypes.MostExpensiveFirst:
1230
- results = results.sort((a: FlightItinerary, b: FlightItinerary) => {
1231
- return b.total.price - a.total.price;
1232
- });
1233
- break;
1234
- case SortTypes.FastestFirst:
1235
- results = results.sort((a: FlightItinerary, b: FlightItinerary) => {
1236
- return (
1237
- a.outboundTotalDuration +
1238
- (a.inboundTotalDuration ? a.inboundTotalDuration : 0) -
1239
- (b.outboundTotalDuration +
1240
- (b.inboundTotalDuration ? b.inboundTotalDuration : 0))
1241
- );
1242
- });
1243
- break;
1244
- case SortTypes.LowestEmissions:
1245
- results = results.sort((a: FlightItinerary, b: FlightItinerary) => {
1246
- return a.co2PerItem - b.co2PerItem;
1247
- });
1248
- break;
1249
- default:
1250
- console.error(`+++ Unknown sorting method: ${sortMethodValue} +++`);
1251
- }
1252
-
1253
- return results;
1254
- }
1255
-
1256
- updateFromPreviousSearches(
1257
- previousItems: Record<ServiceType, BasketItem>
1258
- ): void {
1259
- // Flights can not be search after other products so no defaults can be set.
1260
- }
1261
-
1262
- getTotalBaggage(result: FlightItinerary): number {
1263
- let total = 0;
1264
-
1265
- const parsedAdditional = JSON.parse(result.additional);
1266
- if (parsedAdditional && parsedAdditional.outboundFlights) {
1267
- parsedAdditional.outboundFlights.forEach((flight: any) => {
1268
- flight.baggage.forEach((bag: any) => {
1269
- if (bag.allowance && bag.allowance > total) {
1270
- total = bag.allowance;
1271
- }
1272
- });
1273
- });
1274
- } else if (parsedAdditional && parsedAdditional.baggageAllowance) {
1275
- parsedAdditional.baggageAllowance.forEach((baggageAllow: any) => {
1276
- if (
1277
- baggageAllow.baggage.qty &&
1278
- Number(baggageAllow.baggage.qty) > total
1279
- ) {
1280
- total = Number(baggageAllow.baggage.qty);
1281
- }
1282
- });
1283
- }
1284
-
1285
- return total;
1286
- }
1287
-
1288
- /**
1289
- * @description - filter the results, then sort the remainder
1290
- * @todo - Add filters for travel policy, fare types and ancilliaries
1291
- */
1292
- filterResults(
1293
- filters: FlightFilters,
1294
- sortValue: SortTypes,
1295
- givenResults?: FlightItinerary[]
1296
- ): FlightItinerary[] {
1297
- console.log('+++ Applying Filters to flights: ', filters, ' +++');
1298
- let results: FlightItinerary[] = this.helpers.clone(givenResults);
1299
-
1300
- if (this.isReturn) {
1301
- results = results.filter(
1302
- (result: FlightItinerary) =>
1303
- result.inboundFlights && result.inboundFlights.length
1304
- );
1305
- }
1306
-
1307
- // Add In Filters Here
1308
- // filter stops
1309
- results = this.filterResultsByStops(filters.stops, results);
1310
- results = this.filterResultsByAirline(filters.airlines, results);
1311
- results = this.filterResultsByClass(filters.classes, results);
1312
- results = this.filterByDepartureAirport(filters.depatureAirport, results);
1313
- results = this.filterByDepartureReturnAirport(
1314
- filters.depatureReturnAirport,
1315
- results
1316
- );
1317
- results = this.filterByArrivalAirport(filters.arrivalAirport, results);
1318
- results = this.filterByArrivalReturnAirport(
1319
- filters.arrivalReturnAirport,
1320
- results
1321
- );
1322
- results = this.filterByPrice(filters.minPrice, filters.maxPrice, results);
1323
- results = this.filterByFlightNumber(filters.flightNumber, results);
1324
- results = this.filterByBaggage(filters.baggage, results);
1325
- results = this.filterByDepartureTime(
1326
- filters.minDepartureTime,
1327
- filters.maxDepartureTime,
1328
- results
1329
- );
1330
- results = this.filterByReturnDepartureTime(
1331
- filters.minReturnDepartureTime,
1332
- filters.maxReturnDepartureTime,
1333
- results
1334
- );
1335
- results = this.filterByArrivalTime(
1336
- filters.minArrivalTime,
1337
- filters.maxArrivalTime,
1338
- results
1339
- );
1340
- results = this.filterByReturnArrivalTime(
1341
- filters.minReturnArrivalTime,
1342
- filters.maxReturnArrivalTime,
1343
- results
1344
- );
1345
- results = this.filterByDuration(
1346
- filters.minDuration,
1347
- filters.maxDuration,
1348
- results
1349
- );
1350
- results = this.filterByDuration(
1351
- filters.minReturnDuration,
1352
- filters.maxReturnDuration,
1353
- results,
1354
- true
1355
- ); // return duration
1356
-
1357
- results = this.sortResults(sortValue, results);
1358
- return results;
1359
- }
1360
-
1361
- /**
1362
- * @description - give the correct format for transfering minuetes on the sliders
1363
- * @param min - the min in 100th's to transform onto 60th's
1364
- */
1365
- transformMin(min: number): string {
1366
- let num = (Number(min) * 60) / 100;
1367
- // console.log('+++ Num Copy: ', _.clone(num), ' +++');
1368
- if (num % 1 < 0.5) {
1369
- num = Math.floor(num);
1370
- } else {
1371
- num = Math.ceil(num);
1372
- }
1373
-
1374
- return num.toString().padStart(2, '0');
1375
- }
1376
-
1377
- filterByDuration(
1378
- minDuration: number,
1379
- maxDuration: number,
1380
- results: FlightItinerary[],
1381
- isReturn = false
1382
- ): FlightItinerary[] {
1383
- results = results.filter((result) => {
1384
- let dur = 0;
1385
- if (!isReturn) {
1386
- result.outboundFlights.forEach((out: FlightJourney) => {
1387
- dur += out.totalDuration;
1388
- });
1389
- }
1390
-
1391
- if (result.inboundFlights?.length && isReturn) {
1392
- result.inboundFlights.forEach((inb: FlightJourney) => {
1393
- dur += inb.totalDuration;
1394
- });
1395
- }
1396
-
1397
- return dur >= minDuration && dur <= maxDuration;
1398
- });
1399
-
1400
- return results;
1401
- }
1402
-
1403
- filterByDepartureTime(
1404
- minDep: number,
1405
- maxDep: number,
1406
- results: FlightItinerary[]
1407
- ): FlightItinerary[] {
1408
- results = results.filter((result) => {
1409
- const departureTime = Number(
1410
- moment(result.outboundFlights[0].dateTimeDeparting).format('HHmm')
1411
- );
1412
- const newNumString1 = Number(
1413
- Math.floor(Number(minDep / 100)).toString() +
1414
- this.transformMin(Math.ceil(Number(minDep % 100)))
1415
- );
1416
- const newNumString2 = Number(
1417
- Math.floor(Number(maxDep / 100)).toString() +
1418
- this.transformMin(Math.ceil(Number(maxDep % 100)))
1419
- );
1420
-
1421
- return departureTime >= newNumString1 && departureTime <= newNumString2;
1422
- });
1423
-
1424
- return results;
1425
- }
1426
-
1427
- filterByReturnDepartureTime(
1428
- minDep: number,
1429
- maxDep: number,
1430
- results: FlightItinerary[]
1431
- ): FlightItinerary[] {
1432
- if (!minDep && !maxDep) {
1433
- return results;
1434
- }
1435
-
1436
- const newNumString1 = Number(
1437
- Math.floor(Number(minDep / 100)).toString() +
1438
- this.transformMin(Math.ceil(Number(minDep % 100)))
1439
- );
1440
- const newNumString2 = Number(
1441
- Math.floor(Number(maxDep / 100)).toString() +
1442
- this.transformMin(Math.ceil(Number(maxDep % 100)))
1443
- );
1444
-
1445
- results = results.filter((result) => {
1446
- if (!result.inboundFlights || !result.inboundFlights[0]) {
1447
- return true;
1448
- }
1449
-
1450
- const departureTime = Number(
1451
- moment(result.inboundFlights[0].dateTimeDeparting).format('HHmm')
1452
- );
1453
- return departureTime >= newNumString1 && departureTime <= newNumString2;
1454
- });
1455
-
1456
- return results;
1457
- }
1458
-
1459
- filterByReturnArrivalTime(
1460
- minArr: number,
1461
- maxArr: number,
1462
- results: FlightItinerary[]
1463
- ): FlightItinerary[] {
1464
- if (!minArr && !maxArr) {
1465
- return results;
1466
- }
1467
-
1468
- const newNumString1 = Number(
1469
- Math.floor(Number(minArr / 100)).toString() +
1470
- this.transformMin(Math.ceil(Number(minArr % 100)))
1471
- );
1472
- const newNumString2 = Number(
1473
- Math.floor(Number(maxArr / 100)).toString() +
1474
- this.transformMin(Math.ceil(Number(maxArr % 100)))
1475
- );
1476
-
1477
- results = results.filter((result) => {
1478
- if (!result.inboundFlights || !result.inboundFlights[0]) {
1479
- return true;
1480
- }
1481
-
1482
- const arrivalTime = Number(
1483
- moment(
1484
- result.inboundFlights[result.inboundFlights.length - 1]
1485
- .dateTimeArriving
1486
- ).format('HHmm')
1487
- );
1488
- const retVal =
1489
- arrivalTime >= newNumString1 && arrivalTime <= newNumString2;
1490
-
1491
- // for debugging
1492
- // if (!retVal) {
1493
- // console.warn(`+++ Filtering Out: ${arrivalTime} +++`);
1494
- // }
1495
-
1496
- return retVal;
1497
- });
1498
-
1499
- return results;
1500
- }
1501
-
1502
- filterByArrivalTime(
1503
- minArr: number,
1504
- maxArr: number,
1505
- results: FlightItinerary[]
1506
- ): FlightItinerary[] {
1507
- const newNumString1 = Number(
1508
- Math.floor(Number(minArr / 100)).toString() +
1509
- this.transformMin(Math.ceil(Number(minArr % 100)))
1510
- );
1511
- const newNumString2 = Number(
1512
- Math.floor(Number(maxArr / 100)).toString() +
1513
- this.transformMin(Math.ceil(Number(maxArr % 100)))
1514
- );
1515
-
1516
- results = results.filter((result) => {
1517
- const arrivalTime = Number(
1518
- moment(
1519
- result.outboundFlights[result.outboundFlights.length - 1]
1520
- .dateTimeArriving
1521
- ).format('HHmm')
1522
- );
1523
-
1524
- return arrivalTime >= newNumString1 && arrivalTime <= newNumString2;
1525
- });
1526
-
1527
- return results;
1528
- }
1529
-
1530
- filterByBaggage(
1531
- baggageFilters: SelectFilter[],
1532
- results: FlightItinerary[]
1533
- ): FlightItinerary[] {
1534
- const selected = baggageFilters.filter((x) => x.selected);
1535
-
1536
- if (selected?.length >= 1 && selected.length !== baggageFilters.length) {
1537
- results = results.filter((result) => {
1538
- try {
1539
- const totalBags = this.getTotalBaggage(result);
1540
-
1541
- return selected.find((x) => x.value === totalBags);
1542
- } catch (error) {
1543
- console.error('+++ Error determening baggage: ${error} +++');
1544
- return false;
1545
- }
1546
- });
1547
- }
1548
-
1549
- return results;
1550
- }
1551
-
1552
- filterByPrice(
1553
- minPrice: number,
1554
- maxPrice: number,
1555
- results: FlightItinerary[]
1556
- ): FlightItinerary[] {
1557
- results = results.filter((result) => {
1558
- // console.log(`+++ Price: ${result.total.price} is between: ${minPrice} and ${maxPrice}: ${result.total.price >= minPrice && result.total.price <= maxPrice} +++`)
1559
-
1560
- return result.total.price >= minPrice && result.total.price <= maxPrice;
1561
- });
1562
-
1563
- return results;
1564
- }
1565
-
1566
- /**
1567
- * @description - filter the results by the number of stops
1568
- * @param stopFilters - the selected stops
1569
- * @param fullResults - all of our results so far
1570
- */
1571
- filterResultsByStops(
1572
- stopFilters: SelectFilter[],
1573
- fullResults: FlightItinerary[]
1574
- ): FlightItinerary[] {
1575
- const selected = stopFilters.filter((x) => x.selected);
1576
-
1577
- if (selected?.length >= 1 && selected.length !== stopFilters.length) {
1578
- fullResults = fullResults.filter((result) => {
1579
- const totalStops = result.outboundFlights.length - 1;
1580
-
1581
- const haveStop = selected.find(
1582
- (selected1: SelectFilter) => selected1.value === totalStops
1583
- );
1584
-
1585
- return haveStop;
1586
- });
1587
- }
1588
-
1589
- return fullResults;
1590
- }
1591
-
1592
- filterResultsByAirline(
1593
- airlineFilters: SelectFilter[],
1594
- results: FlightItinerary[]
1595
- ): FlightItinerary[] {
1596
- const selected = airlineFilters.filter((x) => x.selected);
1597
-
1598
- if (selected?.length >= 1 && selected.length !== airlineFilters.length) {
1599
- results = results.filter((result) => {
1600
- return selected.find(
1601
- (x) => x.value === result.outboundFlights[0].operatingCarrier
1602
- );
1603
- });
1604
- }
1605
-
1606
- return results;
1607
- }
1608
-
1609
- filterResultsByClass(
1610
- classFilters: SelectFilter[],
1611
- results: FlightItinerary[]
1612
- ): FlightItinerary[] {
1613
- const selected = classFilters.filter((x) => x.selected);
1614
-
1615
- if (selected?.length >= 1 && selected.length !== classFilters.length) {
1616
- results = results.filter((result) => {
1617
- return selected.find(
1618
- (x) => x.value === result.outboundFlights[0].cabinClass
1619
- );
1620
- });
1621
- }
1622
-
1623
- return results;
1624
- }
1625
-
1626
- filterByDepartureAirport(
1627
- departureAirports: SelectFilter[],
1628
- results: FlightItinerary[]
1629
- ): FlightItinerary[] {
1630
- const selected = departureAirports.filter((x) => x.selected);
1631
-
1632
- if (selected?.length >= 1 && selected.length !== departureAirports.length) {
1633
- results = results.filter((result) => {
1634
- return selected.find(
1635
- (x) => x.value === result.outboundFlights[0].originAirport
1636
- );
1637
- });
1638
- }
1639
-
1640
- return results;
1641
- }
1642
-
1643
- filterByArrivalAirport(
1644
- arrivalAirports: SelectFilter[],
1645
- results: FlightItinerary[]
1646
- ): FlightItinerary[] {
1647
- const selected = arrivalAirports.filter((x) => x.selected);
1648
-
1649
- if (selected?.length >= 1 && selected.length !== arrivalAirports.length) {
1650
- results = results.filter((result) => {
1651
- const destinationAirport =
1652
- result.outboundFlights[result.outboundFlights.length - 1]
1653
- .destinationAirport;
1654
- return selected.find((x) => x.value === destinationAirport);
1655
- });
1656
- }
1657
-
1658
- return results;
1659
- }
1660
-
1661
- filterByDepartureReturnAirport(
1662
- departureAirports: SelectFilter[],
1663
- results: FlightItinerary[]
1664
- ): FlightItinerary[] {
1665
- const selected = departureAirports.filter((x) => x.selected);
1666
-
1667
- if (selected?.length >= 1 && selected.length !== departureAirports.length) {
1668
- results = results.filter((result) => {
1669
- if (!result.inboundFlights?.length) {
1670
- return true;
1671
- }
1672
-
1673
- return selected.find(
1674
- (x) => x.value === result.inboundFlights[0].originAirport
1675
- );
1676
- });
1677
- }
1678
-
1679
- return results;
1680
- }
1681
-
1682
- filterByArrivalReturnAirport(
1683
- arrivalAirports: SelectFilter[],
1684
- results: FlightItinerary[]
1685
- ): FlightItinerary[] {
1686
- const selected = arrivalAirports.filter((x) => x.selected);
1687
-
1688
- if (selected?.length >= 1 && selected.length !== arrivalAirports.length) {
1689
- results = results.filter((result) => {
1690
- if (!result.inboundFlights?.length) {
1691
- return true;
1692
- }
1693
-
1694
- const destinationAirport =
1695
- result.inboundFlights[result.inboundFlights.length - 1]
1696
- .destinationAirport;
1697
- return selected.find((x) => x.value === destinationAirport);
1698
- });
1699
- }
1700
-
1701
- return results;
1702
- }
1703
-
1704
- filterByFlightNumber(
1705
- flightNumber: string,
1706
- results: FlightItinerary[]
1707
- ): FlightItinerary[] {
1708
- if (flightNumber) {
1709
- // make sure to check both outbound and inbound
1710
-
1711
- results = results.filter((result: FlightItinerary) => {
1712
- const inOutbound = result.outboundFlights.find((out: FlightJourney) => {
1713
- return out.operatingFlightNumber
1714
- .toUpperCase()
1715
- .includes(flightNumber.toUpperCase());
1716
- });
1717
-
1718
- let inInbound;
1719
-
1720
- if (result.inboundFlights?.length) {
1721
- inInbound = result.inboundFlights.find((inB: FlightJourney) => {
1722
- return inB.operatingFlightNumber
1723
- .toUpperCase()
1724
- .includes(flightNumber.toUpperCase());
1725
- });
1726
- }
1727
-
1728
- return inOutbound || inInbound;
1729
- });
1730
- }
1731
-
1732
- return results;
1733
- }
1734
-
1735
- createFilters(results: FlightItinerary[] = []): FlightFilters {
1736
- const minPrice = this.getMinPrice(results);
1737
- const maxPrice = this.getMaxPrice(results);
1738
-
1739
- const newFilters: FlightFilters = {
1740
- stops: this.getAllStops(results),
1741
- mustInclude: [],
1742
- classes: this.getAllClasses(results),
1743
- airlines: this.getAllAirlines(results),
1744
- travelPolicy: [],
1745
- depatureAirport: this.getAllDepartureAirports(results),
1746
- arrivalAirport: this.getAllArrivalAirports(results),
1747
- minPrice,
1748
- maxPrice,
1749
- depatureReturnAirport: this.getAllDepartureAirports(results, true),
1750
- arrivalReturnAirport: this.getAllArrivalAirports(results, true),
1751
- baggage: this.getBaggage(results),
1752
- fareTypes: [],
1753
- minDuration: this.getMinDuration(results),
1754
- maxDuration: this.getMaxDuration(results),
1755
- minReturnDuration: this.getMinDuration(results, true),
1756
- maxReturnDuration: this.getMaxDuration(results, true),
1757
- minDepartureTime: this.getMinDepartureTime(results),
1758
- maxDepartureTime: this.getMaxDepartureTime(results),
1759
- minArrivalTime: this.getMinArrivalTime(results),
1760
- maxArrivalTime: this.getMaxArrivalTime(results),
1761
- minReturnDepartureTime: this.getMinReturnDepartureTime(results),
1762
- maxReturnDepartureTime: this.getMaxReturnDepartureTime(results),
1763
- maxReturnArrivalTime: this.getMaxReturnArrivalTime(results),
1764
- minReturnArrivalTime: this.getMinReturnArrivalTime(results),
1765
- flightNumber: ''
1766
- };
1767
-
1768
- return newFilters;
1769
- }
1770
-
1771
- getMinDuration(results: FlightItinerary[], isReturn = false): number {
1772
- let min = 0;
1773
-
1774
- results.forEach((result) => {
1775
- let dur = 0;
1776
-
1777
- if (!isReturn) {
1778
- result.outboundFlights.forEach((out: FlightJourney) => {
1779
- dur += out.totalDuration;
1780
- });
1781
- }
1782
-
1783
- if (result.inboundFlights?.length && isReturn) {
1784
- result.inboundFlights.forEach((inb: FlightJourney) => {
1785
- dur += inb.totalDuration;
1786
- });
1787
- }
1788
-
1789
- if (!min || dur < min) {
1790
- min = dur;
1791
- }
1792
- });
1793
-
1794
- return min;
1795
- }
1796
-
1797
- getMaxDuration(results: FlightItinerary[], isReturn = false): number {
1798
- let max = 0;
1799
-
1800
- results.forEach((result) => {
1801
- let dur = 0;
1802
- if (!isReturn) {
1803
- result.outboundFlights.forEach((out: FlightJourney) => {
1804
- dur += out.totalDuration;
1805
- });
1806
- }
1807
-
1808
- if (result.inboundFlights?.length && isReturn) {
1809
- result.inboundFlights.forEach((inb: FlightJourney) => {
1810
- dur += inb.totalDuration;
1811
- });
1812
- }
1813
-
1814
- if (!max || dur > max) {
1815
- max = dur;
1816
- }
1817
- });
1818
-
1819
- return max;
1820
- }
1821
-
1822
- getMinArrivalTime(results: FlightItinerary[]): number {
1823
- let min: number;
1824
-
1825
- results.forEach((result) => {
1826
- let minDepTime = Number(
1827
- moment(
1828
- result.outboundFlights[result.outboundFlights.length - 1]
1829
- .dateTimeArriving
1830
- ).format('HHmm')
1831
- );
1832
- minDepTime = Math.floor(minDepTime / 100) * 100;
1833
- if (!min || minDepTime < min) {
1834
- min = minDepTime;
1835
- }
1836
- });
1837
-
1838
- return min;
1839
- }
1840
-
1841
- getMinReturnArrivalTime(results: FlightItinerary[]): number {
1842
- let min: number;
1843
-
1844
- results.forEach((result) => {
1845
- if (result.inboundFlights && result.inboundFlights.length) {
1846
- let minDepTime = Number(
1847
- moment(
1848
- result.inboundFlights[result.inboundFlights.length - 1]
1849
- .dateTimeArriving
1850
- ).format('HHmm')
1851
- );
1852
- minDepTime = Math.floor(minDepTime / 100) * 100;
1853
- if (!min || minDepTime < min) {
1854
- min = minDepTime;
1855
- }
1856
- }
1857
- });
1858
-
1859
- return min;
1860
- }
1861
-
1862
- getMaxReturnArrivalTime(results: FlightItinerary[]): number {
1863
- let max: number;
1864
-
1865
- results.forEach((result) => {
1866
- if (result.inboundFlights && result.inboundFlights.length) {
1867
- let maxDepTime = Number(
1868
- moment(
1869
- result.inboundFlights[result.inboundFlights.length - 1]
1870
- .dateTimeArriving
1871
- ).format('HHmm')
1872
- );
1873
- maxDepTime = Math.ceil(maxDepTime / 100) * 100;
1874
- if (!max || maxDepTime > max) {
1875
- max = maxDepTime;
1876
- }
1877
- }
1878
- });
1879
-
1880
- return max;
1881
- }
1882
-
1883
- getMaxArrivalTime(results: FlightItinerary[]): number {
1884
- let max: number;
1885
-
1886
- results.forEach((result) => {
1887
- let maxDepTime = Number(
1888
- moment(
1889
- result.outboundFlights[result.outboundFlights.length - 1]
1890
- .dateTimeArriving
1891
- ).format('HHmm')
1892
- );
1893
-
1894
- maxDepTime = Math.ceil(maxDepTime / 100) * 100;
1895
- if (!max || maxDepTime > max) {
1896
- max = maxDepTime;
1897
- }
1898
- });
1899
- return max;
1900
- }
1901
-
1902
- getMinDepartureTime(results: FlightItinerary[]): number {
1903
- let min: number;
1904
-
1905
- results.forEach((result) => {
1906
- let minDepTime = Number(
1907
- moment(result.outboundFlights[0].dateTimeDeparting).format('HHmm')
1908
- );
1909
- minDepTime = Math.floor(minDepTime / 100) * 100;
1910
- if (!min || minDepTime < min) {
1911
- min = minDepTime;
1912
- }
1913
- });
1914
-
1915
- return min;
1916
- }
1917
-
1918
- getMinReturnDepartureTime(results: FlightItinerary[]): number {
1919
- let min: number;
1920
-
1921
- results.forEach((result) => {
1922
- if (result.inboundFlights && result.inboundFlights[0]) {
1923
- let minDepTime = Number(
1924
- moment(result.inboundFlights[0].dateTimeDeparting).format('HHmm')
1925
- );
1926
- minDepTime = Math.floor(minDepTime / 100) * 100;
1927
- if (!min || minDepTime < min) {
1928
- min = minDepTime;
1929
- }
1930
- }
1931
- });
1932
-
1933
- return min;
1934
- }
1935
-
1936
- getMaxReturnDepartureTime(results: FlightItinerary[]): number {
1937
- let max: number;
1938
-
1939
- results.forEach((result) => {
1940
- if (result.inboundFlights && result.inboundFlights[0]) {
1941
- let maxDepTime = Number(
1942
- moment(result.inboundFlights[0].dateTimeDeparting).format('HHmm')
1943
- );
1944
-
1945
- maxDepTime = Math.ceil(maxDepTime / 100) * 100;
1946
-
1947
- if (!max || maxDepTime > max) {
1948
- max = maxDepTime;
1949
- }
1950
- }
1951
- });
1952
-
1953
- return max;
1954
- }
1955
-
1956
- getMaxDepartureTime(results: FlightItinerary[]): number {
1957
- let max: number;
1958
-
1959
- results.forEach((result) => {
1960
- let maxDepTime = Number(
1961
- moment(result.outboundFlights[0].dateTimeDeparting).format('HHmm')
1962
- );
1963
-
1964
- maxDepTime = Math.ceil(maxDepTime / 100) * 100;
1965
-
1966
- if (!max || maxDepTime > max) {
1967
- max = maxDepTime;
1968
- }
1969
- });
1970
-
1971
- return max;
1972
- }
1973
-
1974
- getBaggage(results: FlightItinerary[]): SelectFilter[] {
1975
- const baggage: any = {};
1976
-
1977
- results.forEach((result) => {
1978
- try {
1979
- if (result.baggageAllowance.length) {
1980
- let total = +result.baggageAllowance[0]?.qty;
1981
- if (result.inboundFlights.length) {
1982
- // ! assuming second item is inbound if the airlines are different, steven said he would sort this out
1983
- if (
1984
- result.baggageAllowance[1] &&
1985
- +result.baggageAllowance[1].qty > total
1986
- ) {
1987
- total = +result.baggageAllowance[1]?.qty;
1988
- } else if (+result.baggageAllowance[0]?.qty > total) {
1989
- total = +result.baggageAllowance[0]?.qty;
1990
- }
1991
- }
1992
- if (+result.baggageAllowance[0]?.qty > total) {
1993
- total = +result.baggageAllowance[0]?.qty;
1994
- }
1995
- baggage[total] = {
1996
- selected: false,
1997
- value: total,
1998
- display: `${total} bag${total !== 1 ? 's' : ''}`
1999
- };
2000
- }
2001
- } catch (error) {
2002
- console.error(`+++ Error parsing additional flight data: ${error} +++`);
2003
- }
2004
- });
2005
-
2006
- return Object.values(baggage);
2007
- }
2008
-
2009
- getMinPrice(results: FlightItinerary[]): number {
2010
- let minPrice: number;
2011
-
2012
- results.forEach((result) => {
2013
- if (!minPrice || result.total.price < minPrice) {
2014
- minPrice = result.total.price;
2015
- }
2016
- });
2017
-
2018
- return minPrice;
2019
- }
2020
-
2021
- getMaxPrice(results: FlightItinerary[]): number {
2022
- let maxPrice: any;
2023
-
2024
- results.forEach((result) => {
2025
- if (!maxPrice || result.total.price > maxPrice) {
2026
- maxPrice = result.total.price;
2027
- }
2028
- });
2029
-
2030
- return maxPrice;
2031
- }
2032
-
2033
- getAllStops(results: FlightItinerary[]): SelectFilter[] {
2034
- const allStops: any = {};
2035
-
2036
- results.forEach((result) => {
2037
- const totalStops = result.outboundFlights.length - 1; // might have to recalculate this
2038
- allStops[totalStops] = {
2039
- value: totalStops,
2040
- display: `${totalStops} stop` + (totalStops !== 1 ? 's' : ''),
2041
- selected: false
2042
- };
2043
- });
2044
-
2045
- return Object.values(allStops);
2046
- }
2047
-
2048
- getAllClasses(results: FlightItinerary[]): SelectFilter[] {
2049
- const allClasses: any = [];
2050
-
2051
- results.forEach((result) => {
2052
- result.outboundFlights.forEach((outFlight: FlightJourney) => {
2053
- allClasses[outFlight.cabinClass] = {
2054
- value: outFlight.cabinClass,
2055
- display: outFlight.cabinClass,
2056
- selected: false
2057
- } as SelectFilter;
2058
- });
2059
-
2060
- if (result.inboundFlights) {
2061
- result.inboundFlights.forEach((inFlight: FlightJourney) => {
2062
- allClasses[inFlight.cabinClass] = {
2063
- value: inFlight.cabinClass,
2064
- display: inFlight.cabinClass,
2065
- selected: false
2066
- } as SelectFilter;
2067
- });
2068
- }
2069
- });
2070
-
2071
- return Object.values(allClasses);
2072
- }
2073
-
2074
- /**
2075
- * @description - create select filters for all unique departure airports returned in the search
2076
- * @param results - the flight results
2077
- */
2078
- getAllDepartureAirports(
2079
- results: FlightItinerary[],
2080
- inbound = false
2081
- ): SelectFilter[] {
2082
- const allAirports: any = {};
2083
-
2084
- results.forEach((result) => {
2085
- if (result.outboundFlights.length && !inbound) {
2086
- allAirports[result.outboundFlights[0].originAirport] = {
2087
- value: result.outboundFlights[0].originAirport,
2088
- display: result.outboundFlights[0].originAirportName,
2089
- selected: false
2090
- };
2091
- }
2092
-
2093
- if (result.inboundFlights?.length && inbound) {
2094
- allAirports[result.inboundFlights[0].originAirport] = {
2095
- value: result.inboundFlights[0].originAirport,
2096
- display: result.inboundFlights[0].originAirportName,
2097
- selected: false
2098
- };
2099
- }
2100
- });
2101
-
2102
- return Object.values(allAirports);
2103
- }
2104
-
2105
- /**
2106
- * @description - create select filters for all unique departure airports returned in the search
2107
- * @param results - the flight results
2108
- */
2109
- getAllArrivalAirports(
2110
- results: FlightItinerary[],
2111
- inbound = false
2112
- ): SelectFilter[] {
2113
- const allAirports: any = {};
2114
-
2115
- results.forEach((result) => {
2116
- if (result.outboundFlights.length && !inbound) {
2117
- allAirports[
2118
- result.outboundFlights[
2119
- result.outboundFlights.length - 1
2120
- ].destinationAirport
2121
- ] = {
2122
- value:
2123
- result.outboundFlights[result.outboundFlights.length - 1]
2124
- .destinationAirport,
2125
- display:
2126
- result.outboundFlights[result.outboundFlights.length - 1]
2127
- .destinationAirportName,
2128
- selected: false
2129
- };
2130
- }
2131
-
2132
- if (result.inboundFlights?.length && inbound) {
2133
- allAirports[
2134
- result.inboundFlights[
2135
- result.inboundFlights.length - 1
2136
- ].destinationAirport
2137
- ] = {
2138
- value:
2139
- result.inboundFlights[result.inboundFlights.length - 1]
2140
- .destinationAirport,
2141
- display:
2142
- result.inboundFlights[result.inboundFlights.length - 1]
2143
- .destinationAirportName,
2144
- selected: false
2145
- };
2146
- }
2147
- });
2148
-
2149
- return Object.values(allAirports);
2150
- }
2151
-
2152
- /**
2153
- * @description - create select filters for all unique airlines returned in the search
2154
- * @param results - the flight results
2155
- */
2156
- getAllAirlines(results: FlightItinerary[]): SelectFilter[] {
2157
- const allAirlines: any = {};
2158
-
2159
- results.forEach((result: FlightItinerary) => {
2160
- result.outboundFlights.forEach((outFlight: FlightJourney) => {
2161
- allAirlines[outFlight.operatingCarrier] = {
2162
- value: outFlight.operatingCarrier,
2163
- display: outFlight.operatingCarrierName,
2164
- selected: false
2165
- } as SelectFilter;
2166
- });
2167
-
2168
- if (result.inboundFlights) {
2169
- result.inboundFlights.forEach((inFlight: FlightJourney) => {
2170
- allAirlines[inFlight.operatingCarrier] = {
2171
- value: inFlight.operatingCarrier,
2172
- display: inFlight.operatingCarrierName,
2173
- selected: false
2174
- } as SelectFilter;
2175
- });
2176
- }
2177
- });
2178
-
2179
- return Object.values(allAirlines);
2180
- }
2181
-
2182
- updateLowestPrice(results: FlightQuoteResultArray): ICheapestPrice {
2183
- return null;
2184
- // add in once filght result is updated///
2185
- // const results = this.storageService.getSessionItemAsList<FlightQuoteResultArray>(this.resultsSessionName) || [] as FlightQuoteResultArray;
2186
- // if(!results.length) return;
2187
- // this._cheapestResultPrice.currencyCode = results[0].total.currency;
2188
- // results.map(result => {
2189
- // const price = result.total.price;
2190
- // if( this._cheapestResultPrice.amount > price || this._cheapestResultPrice.amount === null){
2191
- // this._cheapestResultPrice.amount = price;
2192
- // }
2193
- // })
2194
- }
2195
-
2196
- async selectGroupedFlight(
2197
- selectedFlight: FlightItineraryWithSelected,
2198
- direction: FlightDirectionEnum
2199
- ) {
2200
- const intBasket: InternalBasketInterface =
2201
- await this.basketService.getDefaultBasket();
2202
- const basket = intBasket?.subject.value;
2203
-
2204
- if (
2205
- basket &&
2206
- this.originalUserSearch.chosenSearchType === FlightSearchType.oneWay &&
2207
- direction === FlightDirectionEnum.Outbound
2208
- ) {
2209
- this.doBooking(
2210
- intBasket,
2211
- selectedFlight,
2212
- {
2213
- outboundFlights: selectedFlight.outboundFlights.map(
2214
- (flight: FlightJourney, segmentIndex: number) =>
2215
- this.makeSchemaFlights(flight, 'outbound', 0, segmentIndex)
2216
- ),
2217
- inboundFlights: [],
2218
- journeyType: 'single'
2219
- },
2220
- selectedFlight.outboundFlights[0].dateTimeDeparting
2221
- );
2222
- return;
2223
- }
2224
- if (
2225
- basket &&
2226
- this.originalUserSearch.chosenSearchType === FlightSearchType.return &&
2227
- direction === FlightDirectionEnum.Outbound
2228
- ) {
2229
- if (selectedFlight.selected) {
2230
- this.results.next(this.fullResults);
2231
- this.selectedGroupFlight = null;
2232
- } else {
2233
- this.selectedGroupFlight = selectedFlight;
2234
- const groupsToShow = this.flightsToGroup[selectedFlight.uid];
2235
- // const relatedFlights = this.grouped[groupsToShow[0]].flights;
2236
- // const filter = (flight: FlightItinerary, segmentIndex: number) => {
2237
- // return true;
2238
- // };
2239
- this.results.next(
2240
- (this.fullResults as FlightGroupedQuoteResult[]).filter(
2241
- (result: FlightGroupedQuoteResult, groupIndex: number) => {
2242
- return groupsToShow.includes(groupIndex);
2243
- }
2244
- )
2245
- );
2246
- }
2247
- selectedFlight.selected = !selectedFlight.selected;
2248
- }
2249
- if (
2250
- basket &&
2251
- this.originalUserSearch.chosenSearchType === FlightSearchType.return &&
2252
- direction === FlightDirectionEnum.Inbound &&
2253
- this.selectedGroupFlight
2254
- ) {
2255
- this.doBooking(
2256
- intBasket,
2257
- selectedFlight,
2258
- {
2259
- outboundFlights: [
2260
- ...selectedFlight.outboundFlights.map(
2261
- (flight: FlightJourney, segmentIndex: number) =>
2262
- this.makeSchemaFlights(flight, 'outbound', 0, segmentIndex)
2263
- )
2264
- ],
2265
- inboundFlights: [
2266
- ...selectedFlight.inboundFlights.map(
2267
- (flight: FlightJourney, segmentIndex: number) =>
2268
- this.makeSchemaFlights(flight, 'inbound', 0, segmentIndex)
2269
- )
2270
- ],
2271
- journeyType: 'roundtrip'
2272
- },
2273
- selectedFlight.outboundFlights[0].dateTimeDepartingUTC,
2274
- selectedFlight.inboundFlights[0].dateTimeDepartingUTC
2275
- );
2276
- this.selectedGroupFlight.selected = false;
2277
- this.results.next(this.fullResults);
2278
- }
2279
- }
2280
-
2281
- doBooking(
2282
- intBasket: InternalBasketInterface,
2283
- selectedFlight: FlightItinerary,
2284
- schemaDetails: any,
2285
- outboundDate: string,
2286
- inboundDate?: string
2287
- ): void {
2288
- const { sourceId, co2PerItem, co2PerPassenger, total } = selectedFlight;
2289
- const booking: AddItemToBasketMutationVariables = {
2290
- adults: this.adults,
2291
- basket: intBasket.id,
2292
- children: this.children,
2293
- co2PerItem,
2294
- co2PerPassenger,
2295
- currency: total.currency as CurrencyCode,
2296
- detail: schemaDetails,
2297
- price: total.price,
2298
- searchQuery: this.resultQuery,
2299
- service: sourceId.toString(),
2300
- outboundDate
2301
- };
2302
- if (inboundDate) {
2303
- booking.inboundDate = inboundDate;
2304
- }
2305
- this.basketService.addToBasket(
2306
- booking,
2307
- intBasket,
2308
- this.searchService,
2309
- this.travellers
2310
- );
2311
- }
2312
- makeSchemaFlights(
2313
- selectedFlight: FlightJourney,
2314
- flightGroup: 'outbound' | 'inbound',
2315
- groupIndex: number,
2316
- segmentIndex: number
2317
- ): any {
2318
- return {
2319
- cabinClass: selectedFlight.cabinClass,
2320
- dateTimeArriving: selectedFlight.dateTimeArriving,
2321
- dateTimeArrivingUTC: selectedFlight.dateTimeArrivingUTC,
2322
- dateTimeDeparting: selectedFlight.dateTimeDeparting,
2323
- dateTimeDepartingUTC: selectedFlight.dateTimeDepartingUTC,
2324
- destinationAirport: selectedFlight.destinationAirport,
2325
- journeyInfo: {
2326
- flightGroup,
2327
- groupIndex,
2328
- segmentIndex
2329
- },
2330
- marketingCarrier: selectedFlight.marketingCarrier,
2331
- marketingFlightNumber: selectedFlight.marketingFlightNumber,
2332
- operatingCarrier: selectedFlight.operatingCarrier,
2333
- operatingFlightNumber: selectedFlight.operatingFlightNumber,
2334
- originAirport: selectedFlight.originAirport,
2335
- totalDuration: selectedFlight.totalDuration
2336
- };
2337
- }
2338
-
2339
- async addFlightJourneysToBasket(
2340
- flightQuote: FlightItinerary
2341
- ): Promise<boolean> {
2342
- if (flightQuote.unavailable) {
2343
- return Promise.resolve(false);
2344
- }
2345
- const intBasket: InternalBasketInterface =
2346
- await this.basketService.getDefaultBasket();
2347
- const basket = intBasket?.subject.value;
2348
- if (basket) {
2349
- const { sourceId, co2PerItem, co2PerPassenger, total } = flightQuote;
2350
- const outboundDate: any = moment(
2351
- flightQuote.outboundFlights[0].dateTimeDeparting
2352
- );
2353
- const inboundDate: any = flightQuote.inboundFlights.length
2354
- ? moment(flightQuote.inboundFlights[0].dateTimeDeparting)
2355
- : null;
2356
-
2357
- const schemaDetails = {
2358
- outboundFlights: [
2359
- ...flightQuote.outboundFlights.map(
2360
- (flight: FlightJourney, segmentIndex: number) =>
2361
- this.makeSchemaFlights(flight, 'outbound', 0, segmentIndex)
2362
- )
2363
- ],
2364
- inboundFlights: [
2365
- ...flightQuote.inboundFlights.map(
2366
- (flight: FlightJourney, segmentIndex: number) =>
2367
- this.makeSchemaFlights(flight, 'inbound', 0, segmentIndex)
2368
- )
2369
- ],
2370
- journeyType: 'single'
2371
- };
2372
- const booking: AddItemToBasketMutationVariables = {
2373
- adults: this.adults,
2374
- basket: intBasket.id,
2375
- children: this.children,
2376
- co2PerItem,
2377
- co2PerPassenger,
2378
- currency: total.currency as CurrencyCode,
2379
- detail: schemaDetails,
2380
- price: total.price,
2381
- searchQuery: this.resultQuery,
2382
- service: sourceId.toString(),
2383
- outboundDate: outboundDate.format()
2384
- };
2385
- if (inboundDate) {
2386
- booking.inboundDate = inboundDate.format();
2387
- schemaDetails.journeyType = 'roundtrip';
2388
- }
2389
-
2390
- return this.basketService.addToBasket(
2391
- booking,
2392
- intBasket,
2393
- this.searchService,
2394
- this.travellers
2395
- );
2396
- }
2397
- return Promise.resolve(false); // TODO should this throw an error?
2398
- }
2399
- }