@hapl/api-queries 1.0.20 → 1.0.21
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/dist/api-queries.cjs.development.js +73 -11
- package/dist/api-queries.cjs.development.js.map +1 -1
- package/dist/api-queries.cjs.production.min.js +1 -1
- package/dist/api-queries.cjs.production.min.js.map +1 -1
- package/dist/api-queries.esm.js +72 -11
- package/dist/api-queries.esm.js.map +1 -1
- package/dist/clients/v1/types/Valuation.d.ts +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/registry/v2/api/metroStation/findMetroStations.d.ts +3 -0
- package/dist/registry/v2/api.d.ts +1 -0
- package/dist/registry/v2/index.d.ts +16 -0
- package/package.json +2 -2
- package/src/clients/v1/types/Valuation.ts +1 -1
- package/src/index.ts +3 -2
- package/src/registry/{api → v1/api}/address/createAddress.ts +1 -1
- package/src/registry/{api → v1/api}/address/findAddressById.ts +1 -1
- package/src/registry/{api → v1/api}/address/findAddressesByRealtyParams.ts +1 -1
- package/src/registry/{api → v1/api}/complex/findComplexIds.ts +1 -1
- package/src/registry/{api → v1/api}/image/uploadImages.ts +1 -1
- package/src/registry/{api → v1/api}/realty/findRealties.ts +1 -1
- package/src/registry/{api → v1/api}/valuation/calculateValuation.ts +1 -1
- package/src/registry/v2/api/metroStation/findMetroStations.ts +15 -0
- package/src/registry/v2/api.ts +1 -0
- package/src/registry/v2/index.ts +22 -0
- /package/dist/registry/{api → v1/api}/address/createAddress.d.ts +0 -0
- /package/dist/registry/{api → v1/api}/address/findAddressById.d.ts +0 -0
- /package/dist/registry/{api → v1/api}/address/findAddressesByRealtyParams.d.ts +0 -0
- /package/dist/registry/{api → v1/api}/complex/findComplexIds.d.ts +0 -0
- /package/dist/registry/{api → v1/api}/image/uploadImages.d.ts +0 -0
- /package/dist/registry/{api → v1/api}/realty/findRealties.d.ts +0 -0
- /package/dist/registry/{api → v1/api}/valuation/calculateValuation.d.ts +0 -0
- /package/dist/registry/{api.d.ts → v1/api.d.ts} +0 -0
- /package/dist/registry/{dictionaries → v1/dictionaries}/AddressBTIParams.d.ts +0 -0
- /package/dist/registry/{dictionaries → v1/dictionaries}/Realty.d.ts +0 -0
- /package/dist/registry/{dictionaries → v1/dictionaries}/Shape.d.ts +0 -0
- /package/dist/registry/{dictionaries → v1/dictionaries}/Valuation.d.ts +0 -0
- /package/dist/registry/{dictionaries.d.ts → v1/dictionaries.d.ts} +0 -0
- /package/dist/registry/{index.d.ts → v1/index.d.ts} +0 -0
- /package/dist/registry/{types → v1/types}/Address.d.ts +0 -0
- /package/dist/registry/{types → v1/types}/AddressBTIParams.d.ts +0 -0
- /package/dist/registry/{types → v1/types}/AddressMetroDistance.d.ts +0 -0
- /package/dist/registry/{types → v1/types}/Image.d.ts +0 -0
- /package/dist/registry/{types → v1/types}/Realty.d.ts +0 -0
- /package/dist/registry/{types → v1/types}/RealtyOffer.d.ts +0 -0
- /package/dist/registry/{types → v1/types}/Shape.d.ts +0 -0
- /package/dist/registry/{types → v1/types}/Valuation.d.ts +0 -0
- /package/dist/registry/{types.d.ts → v1/types.d.ts} +0 -0
- /package/src/registry/{api.ts → v1/api.ts} +0 -0
- /package/src/registry/{dictionaries → v1/dictionaries}/AddressBTIParams.ts +0 -0
- /package/src/registry/{dictionaries → v1/dictionaries}/Realty.ts +0 -0
- /package/src/registry/{dictionaries → v1/dictionaries}/Shape.ts +0 -0
- /package/src/registry/{dictionaries → v1/dictionaries}/Valuation.ts +0 -0
- /package/src/registry/{dictionaries.ts → v1/dictionaries.ts} +0 -0
- /package/src/registry/{index.ts → v1/index.ts} +0 -0
- /package/src/registry/{types → v1/types}/Address.ts +0 -0
- /package/src/registry/{types → v1/types}/AddressBTIParams.ts +0 -0
- /package/src/registry/{types → v1/types}/AddressMetroDistance.ts +0 -0
- /package/src/registry/{types → v1/types}/Image.ts +0 -0
- /package/src/registry/{types → v1/types}/Realty.ts +0 -0
- /package/src/registry/{types → v1/types}/RealtyOffer.ts +0 -0
- /package/src/registry/{types → v1/types}/Shape.ts +0 -0
- /package/src/registry/{types → v1/types}/Valuation.ts +0 -0
- /package/src/registry/{types.ts → v1/types.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ServiceRequest } from './ServiceRequest';
|
|
2
2
|
import { AddressBTIParamsWallsMaterial } from './AddressBTIParams';
|
|
3
|
-
import { ValuationCalculationData } from '../../../registry';
|
|
3
|
+
import { ValuationCalculationData } from '../../../registry/v1';
|
|
4
4
|
export declare type ValuationRealtyParams = {
|
|
5
5
|
address?: string;
|
|
6
6
|
area?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as Clients from './clients/v1';
|
|
|
2
2
|
import * as ClientsV2 from './clients/v2';
|
|
3
3
|
import * as External from './external';
|
|
4
4
|
import * as Publisher from './publisher';
|
|
5
|
-
import * as Registry from './registry';
|
|
5
|
+
import * as Registry from './registry/v1';
|
|
6
|
+
import * as RegistryV2 from './registry/v2';
|
|
6
7
|
import * as Search from './search';
|
|
7
|
-
export { Clients, ClientsV2, External, Publisher, Registry, Search };
|
|
8
|
+
export { Clients, ClientsV2, External, Publisher, Registry, RegistryV2, Search };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { FindMetroStationsConfig } from '../../../../clients/v2/api/metroStation/findMetroStations';
|
|
2
|
+
export { FindMetroStationsData, FindMetroStationsError, FindMetroStationsConfig, } from '../../../../clients/v2/api/metroStation/findMetroStations';
|
|
3
|
+
export declare function findMetroStationsRequest({ baseURL }: FindMetroStationsConfig): Promise<import("../../../../clients/v2/api/metroStation/findMetroStations").FindMetroStationsData>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './api/metroStation/findMetroStations';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as api from './api';
|
|
2
|
+
export declare class Api {
|
|
3
|
+
private baseURL;
|
|
4
|
+
constructor(baseURL: Promise<string | undefined> | string | undefined);
|
|
5
|
+
/**
|
|
6
|
+
* Использовать этот метод только в тестовом окружении (на альфа стендах).
|
|
7
|
+
* Он нужен только для решения проблемы которая возникает на тестовых стендах.
|
|
8
|
+
* Проблема заключается в том что на бэке сервис clients, проксирует этот метод на сервис registry,
|
|
9
|
+
* и именно в alpha-окружении этот запрос выполнятся очень долго, больше 15 секунд,
|
|
10
|
+
* а curl который проксирует этот запрос имеет таймаут 15 секунд, из-за чего запрос падает с ошибкой,
|
|
11
|
+
* поэтому как временное решение, пока корневая проблема на бэке не будет исправлена,
|
|
12
|
+
* на альфах будет вызываться этот метод напрямую с сервиса registry, на проде будет как обычно с clients.
|
|
13
|
+
*/
|
|
14
|
+
findMetroStations: () => Promise<api.FindMetroStationsData>;
|
|
15
|
+
}
|
|
16
|
+
export * from './api';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hapl/api-queries",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"author": "Homeapp",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/api-queries.esm.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"src"
|
|
12
12
|
],
|
|
13
13
|
"engines": {
|
|
14
|
-
"node": ">=
|
|
14
|
+
"node": ">=22"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"start": "tsdx watch",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ServiceRequest } from './ServiceRequest';
|
|
2
2
|
import { AddressBTIParamsWallsMaterial } from './AddressBTIParams';
|
|
3
|
-
import { ValuationCalculationData } from '../../../registry';
|
|
3
|
+
import { ValuationCalculationData } from '../../../registry/v1';
|
|
4
4
|
|
|
5
5
|
export type ValuationRealtyParams = {
|
|
6
6
|
address?: string;
|
package/src/index.ts
CHANGED
|
@@ -2,7 +2,8 @@ import * as Clients from './clients/v1';
|
|
|
2
2
|
import * as ClientsV2 from './clients/v2';
|
|
3
3
|
import * as External from './external';
|
|
4
4
|
import * as Publisher from './publisher';
|
|
5
|
-
import * as Registry from './registry';
|
|
5
|
+
import * as Registry from './registry/v1';
|
|
6
|
+
import * as RegistryV2 from './registry/v2';
|
|
6
7
|
import * as Search from './search';
|
|
7
8
|
|
|
8
|
-
export { Clients, ClientsV2, External, Publisher, Registry, Search };
|
|
9
|
+
export { Clients, ClientsV2, External, Publisher, Registry, RegistryV2, Search };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import axios, { AxiosResponse, AxiosError, AxiosResponseTransformer } from 'axios';
|
|
2
2
|
import { Address } from '../../types';
|
|
3
|
-
import { DEFAULT_BASE_URL } from '
|
|
3
|
+
import { DEFAULT_BASE_URL } from '../../../constants';
|
|
4
4
|
|
|
5
5
|
type SuccessData = { success: true; data: Address };
|
|
6
6
|
type ErrorData = { success: false; data: { error: string } };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import axios, { AxiosResponse, AxiosError, AxiosResponseTransformer } from 'axios';
|
|
2
2
|
import { Address } from '../../types';
|
|
3
|
-
import { DEFAULT_BASE_URL } from '
|
|
3
|
+
import { DEFAULT_BASE_URL } from '../../../constants';
|
|
4
4
|
|
|
5
5
|
type SuccessData = { success: true; data: Address };
|
|
6
6
|
type ErrorData = { success: false; data: { error: string } };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import axios, { AxiosResponse, AxiosError, AxiosResponseTransformer } from 'axios';
|
|
2
2
|
import qs from 'qs';
|
|
3
3
|
import { Address, AddressBTIParamsWallsMaterial } from '../../types';
|
|
4
|
-
import { DEFAULT_BASE_URL } from '
|
|
4
|
+
import { DEFAULT_BASE_URL } from '../../../constants';
|
|
5
5
|
|
|
6
6
|
type SuccessData = { success: true; data: Address[] };
|
|
7
7
|
type ErrorData = { success: false; data: { error: string } };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import axios, { AxiosResponse, AxiosError } from 'axios';
|
|
2
2
|
import qs from 'qs';
|
|
3
|
-
import { DEFAULT_BASE_URL } from '
|
|
3
|
+
import { DEFAULT_BASE_URL } from '../../../constants';
|
|
4
4
|
|
|
5
5
|
type SuccessData = { success: true; data: Array<{ id: number; complexAddresses: Array<{ id: number }> }> };
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import axios, { AxiosResponse, AxiosError, AxiosResponseTransformer } from 'axios';
|
|
2
2
|
import { Image } from '../../types';
|
|
3
|
-
import { DEFAULT_BASE_URL } from '
|
|
3
|
+
import { DEFAULT_BASE_URL } from '../../../constants';
|
|
4
4
|
|
|
5
5
|
type SuccessData = { success: true; data: Image[]; pageParams: { page: number; length: number } };
|
|
6
6
|
type ErrorData = { success: false; data: Record<'error' | 'message', string> };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import axios, { AxiosResponse, AxiosError, AxiosResponseTransformer } from 'axios';
|
|
2
2
|
import qs from 'qs';
|
|
3
3
|
import { Realty } from '../../types';
|
|
4
|
-
import { DEFAULT_BASE_URL } from '
|
|
4
|
+
import { DEFAULT_BASE_URL } from '../../../constants';
|
|
5
5
|
|
|
6
6
|
type SuccessData = { success: true; data: Realty[]; pageParams: { page: number; length: number } };
|
|
7
7
|
type ErrorData = { success: false; data: Record<'error' | 'message', string> };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import axios, { AxiosResponse, AxiosError, AxiosResponseTransformer } from 'axios';
|
|
2
2
|
import { ValuationCalculationData } from '../../types';
|
|
3
|
-
import { DEFAULT_BASE_URL } from '
|
|
3
|
+
import { DEFAULT_BASE_URL } from '../../../constants';
|
|
4
4
|
|
|
5
5
|
type SuccessData = { success: true; data: ValuationCalculationData };
|
|
6
6
|
type ErrorData = { success: false; data: { error: string } };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
findMetroStationsRequest as clientsFindMetroStationsRequest,
|
|
3
|
+
FindMetroStationsConfig,
|
|
4
|
+
} from '../../../../clients/v2/api/metroStation/findMetroStations';
|
|
5
|
+
import { DEFAULT_BASE_URL } from '../../../constants';
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
FindMetroStationsData,
|
|
9
|
+
FindMetroStationsError,
|
|
10
|
+
FindMetroStationsConfig,
|
|
11
|
+
} from '../../../../clients/v2/api/metroStation/findMetroStations';
|
|
12
|
+
|
|
13
|
+
export function findMetroStationsRequest({ baseURL = DEFAULT_BASE_URL }: FindMetroStationsConfig) {
|
|
14
|
+
return clientsFindMetroStationsRequest({ baseURL });
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './api/metroStation/findMetroStations';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as api from './api';
|
|
2
|
+
|
|
3
|
+
export class Api {
|
|
4
|
+
constructor(private baseURL: Promise<string | undefined> | string | undefined) {}
|
|
5
|
+
|
|
6
|
+
// metroStation
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Использовать этот метод только в тестовом окружении (на альфа стендах).
|
|
10
|
+
* Он нужен только для решения проблемы которая возникает на тестовых стендах.
|
|
11
|
+
* Проблема заключается в том что на бэке сервис clients, проксирует этот метод на сервис registry,
|
|
12
|
+
* и именно в alpha-окружении этот запрос выполнятся очень долго, больше 15 секунд,
|
|
13
|
+
* а curl который проксирует этот запрос имеет таймаут 15 секунд, из-за чего запрос падает с ошибкой,
|
|
14
|
+
* поэтому как временное решение, пока корневая проблема на бэке не будет исправлена,
|
|
15
|
+
* на альфах будет вызываться этот метод напрямую с сервиса registry, на проде будет как обычно с clients.
|
|
16
|
+
*/
|
|
17
|
+
findMetroStations = async () => {
|
|
18
|
+
return api.findMetroStationsRequest({ baseURL: await this.baseURL });
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export * from './api';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|