@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 +123 -143
- package/dist/types/packages/core/src/types/types.d.ts +4 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -673,152 +673,132 @@ so there is a simplified example:
|
|
|
673
673
|
|
|
674
674
|
```json
|
|
675
675
|
{
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
"
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
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
|
-
|
|
241
|
-
|
|
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 {
|