@hapl/api-queries 0.2.29 → 0.2.30

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.
@@ -5,6 +5,21 @@ export declare type FindApartmentsParams = {
5
5
  from?: number;
6
6
  to?: number;
7
7
  };
8
+ price?: {
9
+ from?: number;
10
+ to?: number;
11
+ };
12
+ roomsNumber?: number | number[];
13
+ coordinates?: {
14
+ 'top-left': {
15
+ lat: number;
16
+ lng: number;
17
+ };
18
+ 'bottom-right': {
19
+ lat: number;
20
+ lng: number;
21
+ };
22
+ };
8
23
  };
9
24
  limits?: {
10
25
  page: number;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.2.29",
2
+ "version": "0.2.30",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -20,7 +20,7 @@ export type CountApartmentsConfig = { baseURL?: string; params: CountApartmentsP
20
20
 
21
21
  export function countApartmentsRequest({ baseURL = 'https://search.homeapp.ru', params }: CountApartmentsConfig) {
22
22
  return axios
23
- .get('/api/apartment/', {
23
+ .get('/api/apartment/count', {
24
24
  baseURL,
25
25
  params,
26
26
  paramsSerializer: params => qs.stringify(params, { arrayFormat: 'brackets' }),
@@ -7,7 +7,12 @@ type SuccessData = { success: true; data: Apartment[]; pageParams: { page: numbe
7
7
  type ErrorData = { success: false; data: { error: string } };
8
8
 
9
9
  export type FindApartmentsParams = {
10
- filter?: { area?: { from?: number; to?: number } };
10
+ filter?: {
11
+ area?: { from?: number; to?: number };
12
+ price?: { from?: number; to?: number };
13
+ roomsNumber?: number | number[];
14
+ coordinates?: { 'top-left': { lat: number; lng: number }; 'bottom-right': { lat: number; lng: number } };
15
+ };
11
16
  limits?: { page: number; count: number };
12
17
  sorting?: { direction: 'asc' | 'desc'; type: 'distance'; base: { lat: number; lng: number } };
13
18
  };