@findhotel/sapi 1.20.2 → 1.20.3

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
@@ -671,134 +671,121 @@ the state can be repeated between different callbacks.
671
671
  The complete SAPI search response is too big to be displayed on the page
672
672
  so there is a simplified example:
673
673
 
674
+ ```json
674
675
  ```json
675
676
  {
676
- "anchor": {
677
- "_geoloc": {
678
- "lat": -6.28067,
679
- "lon": 39.53601,
680
- "precision": 5000,
681
- "radius": 20000
677
+ "anchor": {
678
+ "_geoloc": {
679
+ "lat": -6.28067,
680
+ "lon": 39.53601,
681
+ "precision": 5000,
682
+ "radius": 20000
683
+ },
684
+ "objectID": "hotel:9660485",
685
+ "objectType": "hotel",
686
+ "pageSize": 25,
687
+ "priceBucketWidth": 16,
688
+ "admDivisionLevel1": "Tanzania",
689
+ "navPath": [
690
+ "3429",
691
+ "300878",
692
+ "235186"
693
+ ],
694
+ "navPathNames": {
695
+ "country": "Tanzania"
696
+ },
697
+ "navPathInfo": {
698
+ "adminDivision": {
699
+ "id": "12598",
700
+ "name": "Hokkaido Prefecture"
701
+ },
702
+ "city": {
703
+ "id": "43727",
704
+ "name": "Otaru"
705
+ },
706
+ "country": {
707
+ "id": "125948",
708
+ "name": "Japan"
709
+ }
710
+ },
711
+ "hotelName": "Zanzibar White Sand Luxury Villas & Spa - Relais & Chateaux",
712
+ "placeDisplayName": "Zanzibar"
713
+ },
714
+ "anchorType": "hotel",
715
+ "anchorHotelId": "9660485",
716
+ "hotelEntities": {
717
+ "9660485": {
718
+ "_geoloc": {
719
+ "lat": -6.28067,
720
+ "lon": 39.53601
721
+ },
722
+ "checkInTime": "14:00",
723
+ "checkOutTime": "11:00",
724
+ "country": "TZ",
725
+ "facilities": [
726
+ 2, 5, 6, 7, 9, 11, 13, 20, 21, 22, 23, 28, 29, 31, 34, 35, 66, 84, 85, 86, 98, 99, 100, 103, 104, 122, 127, 189, 191, 193, 195, 202, 222, 235, 238, 243, 244, 253, 255, 266, 270, 292, 299
727
+ ],
728
+ "guestRating": {
729
+ "cleanliness": 9.66,
730
+ "dining": 9.42,
731
+ "facilities": 9.9,
732
+ "location": 9.8,
733
+ "overall": 9.55,
734
+ "rooms": 9.72
735
+ },
736
+ "guestType": {
737
+ "business": 6,
738
+ "couples": 235,
739
+ "families": 110,
740
+ "groups": 68,
741
+ "solo": 13
742
+ },
743
+ "imageURIs": [
744
+ "https://img.fih.io/image/raw/regular/provider_partition=eps/3xWl0k2P0Ofb7vxD4dr1NhFjOtdQaHXLe2p1tYLaOmw=.webp"
745
+ ],
746
+ "navPath": [
747
+ "3429",
748
+ "300878",
749
+ "235186"
750
+ ],
751
+ "navPathInfo": {
752
+ "adminDivision": {
753
+ "id": "12598",
754
+ "name": "Hokkaido Prefecture"
682
755
  },
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"
756
+ "city": {
757
+ "id": "43727",
758
+ "name": "Otaru"
695
759
  },
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
- ]
760
+ "country": {
761
+ "id": "125948",
762
+ "name": "Japan"
788
763
  }
764
+ }
789
765
  }
766
+ }
790
767
  }
768
+ ```
791
769
 
792
770
  ```
793
771
  #### 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
-
772
+ this structure holds all information about the hotel location(starting from country -> region -> city -> village)
796
773
  example:
797
774
  ```json
798
- "navPathInfo": [
799
- {"id": "1419", "name": "United Kingdom"}, // country
800
- {"id": "126252", "name": "West Midlands"} // division/region
801
- ]
775
+ "navPathInfo": {
776
+ "adminDivision": {
777
+ "id": "12598",
778
+ "name": "Hokkaido Prefecture"
779
+ },
780
+ "city": {
781
+ "id": "43727",
782
+ "name": "Otaru"
783
+ },
784
+ "country": {
785
+ "id": "125948",
786
+ "name": "Japan"
787
+ }
788
+ }
802
789
  ```
803
790
 
804
791
  ### 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,7 +237,12 @@ export interface NavPathNames {
237
237
  country?: string;
238
238
  }
239
239
  export interface NavPathInfo {
240
- id?: string;
240
+ country?: PlaceInfo;
241
+ city?: PlaceInfo;
242
+ adminDivision?: PlaceInfo;
243
+ }
244
+ export interface PlaceInfo {
245
+ id: string;
241
246
  name?: string;
242
247
  }
243
248
  export interface Hotel extends Omit<Hit, 'hotelName' | 'address' | 'placeDN' | 'placeADName'> {
@@ -249,7 +254,7 @@ export interface Hotel extends Omit<Hit, 'hotelName' | 'address' | 'placeDN' | '
249
254
  vrDetails?: VrDetails;
250
255
  isVr?: boolean;
251
256
  navPathNames?: NavPathNames;
252
- navPathInfo?: NavPathInfo[];
257
+ navPathInfo?: NavPathInfo;
253
258
  partiallyMatched: boolean;
254
259
  }
255
260
  export interface ContentHotelDescriptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@findhotel/sapi",
3
- "version": "1.20.2",
3
+ "version": "1.20.3",
4
4
  "description": "FindHotel Search API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/packages/core/src",