Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Commit

Permalink
feat: add similarTo to ListingQueryParams (#465)
Browse files Browse the repository at this point in the history
  • Loading branch information
ufkaya authored Mar 3, 2022
1 parent 799c713 commit cdeb9e7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export {
ListingQueryParams,
ListingSearchParams,
DealerListingQueryParams,
SimilarTo,
} from "./types/params/listings"

export {
Expand Down
13 changes: 13 additions & 0 deletions src/types/params/listings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ export interface LocationFilter {
geoPoint?: GeoPoint
}

export interface SimilarTo {
makeKey: string
modelKey: string
fuelType: string
bodyType: string
bodyColor: string
conditionType: string
price: number
}

type VariantParams = "A" | "B" | "C" | "D" | "E"
export interface ListingQueryParams extends PaginationParams {
lng?: string
Expand All @@ -42,6 +52,7 @@ export interface ListingQueryParams extends PaginationParams {
| LocationFilter
| boolean
| Array<{ from: string; to: string }>
| SimilarTo
}

export interface ListingSearchParams extends ListingQueryParams {
Expand Down Expand Up @@ -100,12 +111,14 @@ export interface ListingFilterParams {

[key: string]:
| number
| number[]
| string[]
| string
| MakeModelFilter[]
| LocationFilter
| boolean
| Array<{ from: string; to: string }>
| SimilarTo
}

export interface DealerListingQueryParams
Expand Down

0 comments on commit cdeb9e7

Please sign in to comment.