-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
88316a5
commit 1ebf39d
Showing
8 changed files
with
131 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
export interface Exhaustive { | ||
nbHits: boolean; | ||
typo: boolean; | ||
} | ||
|
||
export interface ProcessingTimingsMS { | ||
request: Request; | ||
total: number; | ||
} | ||
|
||
export interface Request { | ||
roundTrip: number; | ||
} | ||
|
||
export interface RenderingContent { | ||
} | ||
|
||
export interface Request { | ||
roundTrip: number; | ||
} | ||
|
||
export interface AlgoliaResponse { | ||
nbHits: number; | ||
page: number; | ||
nbPages: number; | ||
hitsPerPage: number; | ||
exhaustiveNbHits: boolean; | ||
exhaustiveTypo: boolean; | ||
exhaustive: Exhaustive; | ||
query: string; | ||
params: string; | ||
renderingContent: RenderingContent; | ||
processingTimeMS: number; | ||
processingTimingsMS: ProcessingTimingsMS; | ||
serverTimeMS: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { AlgoliaResponse } from "./algolia"; | ||
|
||
export interface HomeSearchResponse extends AlgoliaResponse { | ||
hits: Home[]; | ||
} | ||
|
||
export interface Home { | ||
type: string; | ||
title: string; | ||
description: string; | ||
note: string; | ||
reviewCount: number; | ||
reviewValue: number; | ||
features: string[]; | ||
pricePerNight: number; | ||
location: Location; | ||
guests: number; | ||
bedrooms: number; | ||
beds: number; | ||
bathrooms: number; | ||
images: string[]; | ||
_geoloc: Geoloc; | ||
objectID: string; | ||
} | ||
|
||
export interface HomeMarker { | ||
lat: number; | ||
lng: number; | ||
id: string; | ||
pricePerNight: number; | ||
} | ||
|
||
interface Geoloc { | ||
lat: number; | ||
lng: number; | ||
} | ||
|
||
interface Location { | ||
address: string; | ||
city: string; | ||
state: string; | ||
country: string; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { AlgoliaResponse } from "./algolia"; | ||
|
||
export interface ReviewResponse extends AlgoliaResponse { | ||
hits: Review[]; | ||
} | ||
|
||
export interface Review { | ||
homeId: string; | ||
reviewer: Reviewer; | ||
rating: number; | ||
date: string; | ||
comment: string; | ||
objectID: string; | ||
} | ||
|
||
export interface Reviewer { | ||
image: string; | ||
name: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { AlgoliaResponse } from "./algolia"; | ||
|
||
export interface UserResponse extends AlgoliaResponse { | ||
hits: User[]; | ||
} | ||
|
||
export interface User { | ||
joined: string; | ||
name: string; | ||
image: string; | ||
reviewCount: number; | ||
description: string; | ||
homeId: string[]; | ||
objectID: string; | ||
} |