@findhotel/sapi 1.20.1 → 1.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -673,152 +673,132 @@ so there is a simplified example:
673
673
 
674
674
  ```json
675
675
  {
676
- "anchor": {
677
- "admDivisionLevel1": "The Netherlands",
678
- "admDivisionLevel2": "Amsterdam",
679
- "admDivisionLevel3": "Bedrijventerrein Sloterdijk",
680
- "hotelName": "Holiday Inn Express Amsterdam - Sloterdijk Station, an IHG Hotel",
681
- "objectID": "hotel:1714808",
682
- "objectType": "hotel",
683
- "pageSize": 26,
684
- "placeDisplayName": "Bedrijventerrein Sloterdijk, Amsterdam",
685
- "priceBucketWidth": 19,
686
- "_geoloc": {
687
- "lat": 52.388326,
688
- "lon": 4.837264,
689
- "precision": 5000,
690
- "radius": 20000
691
- }
692
- },
693
- "anchorHotelId": "1714808",
694
- "anchorType": "hotel",
695
- "facets": {
696
- "facilities": { "1": 212, "2": 348, "3": 116 },
697
- "pricing.medianRateBkt": { "3": 4, "4": 12, "5": 19 },
698
- "pricing.medianRateMoFrBkt": { "3": 4, "4": 6, "5": 8, "6": 9 },
699
- "pricing.medianRateSaSuBkt": { "2": 2, "3": 4, "4": 6, "5": 10 },
700
- "pricing.minRateBkt": { "2": 22, "3": 38, "4": 46, "5": 98 },
701
- "propertyTypeId": { "0": 1030, "2": 6, "3": 601, "4": 86 },
702
- "starRating": { "1": 351, "2": 313, "3": 596, "4": 441, "5": 86 },
703
- "themeIds": { "1": 9, "2": 1373, "3": 143, "5": 1092, "8": 119 }
704
- },
705
- "hotelEntities": {
706
- "1041597": {
707
- "chainID": "351",
708
- "checkInTime": "15:00",
709
- "checkOutTime": "12:00",
710
- "country": "NL",
711
- "displayAddress": "Stationsplein 49, Burgwallen-Nieuwe Zijde, Amsterdam, The Netherlands",
712
- "facilities": [1, 2, 5, 8, 9, 11],
713
- "guestRating": {
714
- "cleanliness": 7.94,
715
- "dining": 7.51,
716
- "facilities": 7.54,
717
- "location": 8.09,
718
- "overall": 7.83,
719
- "service": 8.8
720
- },
721
- "guestType": {
722
- "business": 793,
723
- "couples": 2558,
724
- "families": 1145,
725
- "groups": 1276,
726
- "solo": 398
727
- },
728
- "hotelName": "ibis Amsterdam Centre",
729
- "imageURIs": [
730
- "https://i.travelapi.com/hotels/1000000/30000/25600/25525/c2387aed_w.jpg"
731
- ],
732
- "isDeleted": false,
733
- "lastBooked": 1658320362,
734
- "objectID": "1041597",
735
- "parentChainID": "10",
736
- "placeDisplayName": "Burgwallen-Nieuwe Zijde, Amsterdam",
737
- "pricing": {
738
- "medianRateBkt": 12,
739
- "medianRateMoFrBkt": 13,
740
- "medianRateSaSuBkt": 11,
741
- "minRate": 116,
742
- "minRateInUserCurrency": 200,
743
- "minRateBkt": 75,
744
- "minRateBkt": 5,
745
- "priced": 1
746
- },
747
- "propertyTypeId": 0,
748
- "regularPriceRange": [224, 243],
749
- "reviewCount": 5766,
750
- "sentiments": [177, 250, 300, 419],
751
- "starRating": 3,
752
- "tags": ["b220918-1"],
753
- "themeIds": [2, 5, 12],
754
- "_geoloc": { "lat": 52.37947, "lon": 4.89699 }
755
- }
756
- },
757
- "hotelIds": ["1840170", "2766940", "3310443", "3035769"],
758
- "hotelOfferEntities": {
759
- "1041597": {
760
- "anchorRate": {
761
- "base": 244.6021305,
762
- "hotelFees": 23.122149135,
763
- "taxes": 20.4147
764
- },
765
- "availableOffersCount": 23,
766
- "cheapestRate": {
767
- "base": 222.55,
768
- "taxes": 19.08,
769
- "hotelFees": 16.17
770
- },
771
- "id": "1041597",
772
- "offers": [
773
- {
774
- "id": "o5vFF4-wmvcc",
775
- "currency": "EUR",
776
- "availableRooms": 6,
777
- "url": "https://r.vio.com?...",
778
- "rate": {
779
- "base": 197.17,
780
- "taxes": 17.75,
781
- "hotelFees": 31.8
782
- },
783
- "accessTier": "",
784
- "providerCode": "BKS",
785
- "intermediaryProvider": "BKS",
786
- "roomName": "Standard Twin Room",
787
- "package": {
788
- "amenities": ["breakfast"],
789
- "canPayLater": false
790
- },
791
- "cancellationPenalties": [],
792
- "tags": ["top_offer"],
793
- "metadata": {
794
- "feedID": ""
795
- }
676
+ "anchor": {
677
+ "_geoloc": {
678
+ "lat": -6.28067,
679
+ "lon": 39.53601,
680
+ "precision": 5000,
681
+ "radius": 20000
682
+ },
683
+ "objectID": "hotel:9660485",
684
+ "objectType": "hotel",
685
+ "pageSize": 25,
686
+ "priceBucketWidth": 16,
687
+ "admDivisionLevel1": "Tanzania",
688
+ "navPath": [
689
+ "3429",
690
+ "300878",
691
+ "235186"
692
+ ],
693
+ "navPathNames": {
694
+ "country": "Tanzania"
695
+ },
696
+ "navPathInfo": [
697
+ {"id": "1419", "name": "United Kingdom"}, // country
698
+ {"id": "126252", "name": "West Midlands"} // division/region
699
+ {"id": "135057", "name": "Birmingham"} // city/village
700
+ ],
701
+ "hotelName": "Zanzibar White Sand Luxury Villas & Spa - Relais & Chateaux",
702
+ "placeDisplayName": "Zanzibar"
703
+ },
704
+ "anchorType": "hotel",
705
+ "anchorHotelId": "9660485",
706
+ "hotelEntities": {
707
+ "9660485": {
708
+ "_geoloc": {
709
+ "lat": -6.28067,
710
+ "lon": 39.53601
711
+ },
712
+ "checkInTime": "14:00",
713
+ "checkOutTime": "11:00",
714
+ "country": "TZ",
715
+ "facilities": [
716
+ 2,
717
+ 5,
718
+ 6,
719
+ 7,
720
+ 9,
721
+ 11,
722
+ 13,
723
+ 20,
724
+ 21,
725
+ 22,
726
+ 23,
727
+ 28,
728
+ 29,
729
+ 31,
730
+ 34,
731
+ 35,
732
+ 66,
733
+ 84,
734
+ 85,
735
+ 86,
736
+ 98,
737
+ 99,
738
+ 100,
739
+ 103,
740
+ 104,
741
+ 122,
742
+ 127,
743
+ 189,
744
+ 191,
745
+ 193,
746
+ 195,
747
+ 202,
748
+ 222,
749
+ 235,
750
+ 238,
751
+ 243,
752
+ 244,
753
+ 253,
754
+ 255,
755
+ 266,
756
+ 270,
757
+ 292,
758
+ 299
759
+ ],
760
+ "guestRating": {
761
+ "cleanliness": 9.66,
762
+ "dining": 9.42,
763
+ "facilities": 9.9,
764
+ "location": 9.8,
765
+ "overall": 9.55,
766
+ "rooms": 9.72
767
+ },
768
+ "guestType": {
769
+ "business": 6,
770
+ "couples": 235,
771
+ "families": 110,
772
+ "groups": 68,
773
+ "solo": 13
774
+ },
775
+ "imageURIs": [
776
+ "https://img.fih.io/image/raw/regular/provider_partition=eps/3xWl0k2P0Ofb7vxD4dr1NhFjOtdQaHXLe2p1tYLaOmw=.webp",
777
+ ],
778
+ "navPath": [
779
+ "3429",
780
+ "300878",
781
+ "235186"
782
+ ],
783
+ "navPathInfo": [
784
+ {"id": "1419", "name": "United Kingdom"}, // country
785
+ {"id": "126252", "name": "West Midlands"} // division/region
786
+ {"id": "135057", "name": "Birmingham"} // city/village
787
+ ]
796
788
  }
797
- ],
798
- "discount": {
799
- "discountProvider": "FHT",
800
- "hasDiscountProvider": true,
801
- "hasParityProvider": true,
802
- "modifier": "b"
803
- }
804
789
  }
805
- },
806
- "hotelsHaveStaticPosition": true,
807
- "offset": 0,
808
- "resultsCount": 26,
809
- "resultsCountTotal": 3401,
810
- "searchId": "0f9642a0-eab7-4acb-8313-bc6d19c408f6",
811
- "searchParameters": {
812
- "hotelId": "1714808",
813
- "checkIn": "2022-09-01",
814
- "checkOut": "2022-09-02",
815
- "rooms": "2"
816
- },
817
- "status": {
818
- "anchorComplete": true,
819
- "nonAnchorComplete": true
820
- }
821
790
  }
791
+
792
+ ```
793
+ #### navPathInfo
794
+ this holds all information about the hotel location(starting from country -> region -> city -> village), in case any of this information is missing (for example hotel is not in a city), the row for city will not be in the response
795
+
796
+ example:
797
+ ```json
798
+ "navPathInfo": [
799
+ {"id": "1419", "name": "United Kingdom"}, // country
800
+ {"id": "126252", "name": "West Midlands"} // division/region
801
+ ]
822
802
  ```
823
803
 
824
804
  ### Load more results and load more offers for a hotel
@@ -152,7 +152,7 @@ interface BasicAnchorHit {
152
152
  priceBucketWidth?: number;
153
153
  _geoloc: Location;
154
154
  navPathNames?: NavPathNames;
155
- navPathInfo?: NavPathInfo;
155
+ navPathInfo?: NavPathInfo[];
156
156
  }
157
157
  export declare type AnchorType = 'hotel' | 'place';
158
158
  export interface HotelAnchorHit extends BasicAnchorHit {
@@ -237,11 +237,8 @@ export interface NavPathNames {
237
237
  country?: string;
238
238
  }
239
239
  export interface NavPathInfo {
240
- city?: string;
241
- adminDivisions?: string[];
242
- country?: string;
243
- cityID?: string;
244
- countryID?: string;
240
+ id?: string;
241
+ name?: string;
245
242
  }
246
243
  export interface Hotel extends Omit<Hit, 'hotelName' | 'address' | 'placeDN' | 'placeADName'> {
247
244
  displayAddress: string;
@@ -252,7 +249,7 @@ export interface Hotel extends Omit<Hit, 'hotelName' | 'address' | 'placeDN' | '
252
249
  vrDetails?: VrDetails;
253
250
  isVr?: boolean;
254
251
  navPathNames?: NavPathNames;
255
- navPathInfo?: NavPathInfo;
252
+ navPathInfo?: NavPathInfo[];
256
253
  partiallyMatched: boolean;
257
254
  }
258
255
  export interface ContentHotelDescriptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@findhotel/sapi",
3
- "version": "1.20.1",
3
+ "version": "1.20.2",
4
4
  "description": "FindHotel Search API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/packages/core/src",