@hapl/api-queries 0.1.118 → 0.1.119

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/api-queries.cjs.development.js +255 -9
  3. package/dist/api-queries.cjs.development.js.map +1 -1
  4. package/dist/api-queries.cjs.production.min.js +1 -1
  5. package/dist/api-queries.cjs.production.min.js.map +1 -1
  6. package/dist/api-queries.esm.js +255 -9
  7. package/dist/api-queries.esm.js.map +1 -1
  8. package/dist/clients/v1/api/index.d.ts +1 -1
  9. package/dist/clients/v1/api/serviceRequest/findServiceRequestSellerReports/index.d.ts +42 -0
  10. package/dist/clients/v1/index.d.ts +1 -1
  11. package/dist/registry/v1/api/{complexes → complex}/findComplexIds/index.d.ts +0 -0
  12. package/dist/registry/v1/api/index.d.ts +2 -1
  13. package/dist/registry/v1/api/realty/findRealties/index.d.ts +34 -0
  14. package/dist/registry/v1/dictionaries/AddressBTIParams.d.ts +24 -0
  15. package/dist/registry/v1/dictionaries/Realty.d.ts +71 -0
  16. package/dist/registry/v1/dictionaries/Shape.d.ts +11 -0
  17. package/dist/registry/v1/dictionaries/index.d.ts +3 -0
  18. package/dist/registry/v1/index.d.ts +3 -0
  19. package/dist/registry/v1/types/Address.d.ts +31 -0
  20. package/dist/registry/v1/types/AddressBTIParams.d.ts +39 -0
  21. package/dist/registry/v1/types/AddressMetroDistance.d.ts +9 -0
  22. package/dist/registry/v1/types/Image.d.ts +15 -0
  23. package/dist/registry/v1/types/Realty.d.ts +116 -0
  24. package/dist/registry/v1/types/RealtyOffer.d.ts +6 -0
  25. package/dist/registry/v1/types/Shape.d.ts +24 -0
  26. package/dist/registry/v1/types/index.d.ts +7 -0
  27. package/package.json +1 -1
  28. package/src/clients/v1/api/index.ts +1 -1
  29. package/src/clients/v1/api/serviceRequest/{findServiceRequestSellerReport → findServiceRequestSellerReports}/index.ts +13 -13
  30. package/src/clients/v1/index.ts +5 -5
  31. package/src/registry/v1/api/{complexes → complex}/findComplexIds/index.ts +0 -0
  32. package/src/registry/v1/api/index.ts +3 -1
  33. package/src/registry/v1/api/realty/findRealties/index.ts +54 -0
  34. package/src/registry/v1/dictionaries/AddressBTIParams.ts +25 -0
  35. package/src/registry/v1/dictionaries/Realty.ts +84 -0
  36. package/src/registry/v1/dictionaries/Shape.ts +12 -0
  37. package/src/registry/v1/dictionaries/index.ts +3 -0
  38. package/src/registry/v1/index.ts +10 -0
  39. package/src/registry/v1/types/Address.ts +29 -0
  40. package/src/registry/v1/types/AddressBTIParams.ts +42 -0
  41. package/src/registry/v1/types/AddressMetroDistance.ts +9 -0
  42. package/src/registry/v1/types/Image.ts +13 -0
  43. package/src/registry/v1/types/Realty.ts +123 -0
  44. package/src/registry/v1/types/RealtyOffer.ts +6 -0
  45. package/src/registry/v1/types/Shape.ts +24 -0
  46. package/src/registry/v1/types/index.ts +7 -0
  47. package/dist/clients/v1/api/serviceRequest/findServiceRequestSellerReport/index.d.ts +0 -42
@@ -0,0 +1,84 @@
1
+ import {
2
+ RealtyType,
3
+ RealtyRenovationType,
4
+ RealtyGas,
5
+ RealtyHouseType,
6
+ RealtyLandShape,
7
+ RealtyLandUsageType,
8
+ RealtyRelief,
9
+ RealtyElectricity,
10
+ RealtyFurniture,
11
+ RealtySewerage,
12
+ RealtyWindowView,
13
+ } from '../types';
14
+
15
+ export const RealtyDictionary = {
16
+ Type: {
17
+ [RealtyType.Flat]: 'Квартира',
18
+ [RealtyType.House]: 'Дом',
19
+ },
20
+ RenovationType: {
21
+ [RealtyRenovationType.None]: 'Без ремонта',
22
+ [RealtyRenovationType.Author]: 'Авторский',
23
+ [RealtyRenovationType.Cosmetic]: 'Косметический',
24
+ [RealtyRenovationType.Euro]: 'Евро',
25
+ [RealtyRenovationType.FineFinishing]: 'Чистовая отделка',
26
+ [RealtyRenovationType.RoughFinishing]: 'Черновая отделка',
27
+ },
28
+ Gas: {
29
+ [RealtyGas.None]: 'Нет',
30
+ [RealtyGas.Connected]: 'Подключено',
31
+ [RealtyGas.Border]: 'По границе',
32
+ [RealtyGas.Possible]: 'Возможно',
33
+ [RealtyGas.Autonomous]: 'Автономное',
34
+ },
35
+ HouseType: {
36
+ [RealtyHouseType.Townhouse]: 'Таунхаус',
37
+ [RealtyHouseType.House]: 'Дом',
38
+ [RealtyHouseType.Cottage]: 'Коттедж',
39
+ [RealtyHouseType.Part]: 'Часть дома',
40
+ [RealtyHouseType.Duplex]: 'Дуплекс',
41
+ },
42
+ LandShape: {
43
+ [RealtyLandShape.Regular]: 'Правильная',
44
+ [RealtyLandShape.Irregular]: 'Неправильная',
45
+ },
46
+ LandUsageType: {
47
+ [RealtyLandUsageType.IGS]: 'ИЖС',
48
+ [RealtyLandUsageType.LPH]: 'ЛПХ (личное подсобное хозяйство)',
49
+ [RealtyLandUsageType.DNP]: 'ДНП (дачное некоммерческое партнероство)',
50
+ [RealtyLandUsageType.SNT]: 'СНТ (садоводческое некоммерческое товарищество)',
51
+ [RealtyLandUsageType.Farm]: 'Фермерское хозяйство',
52
+ [RealtyLandUsageType.Garden]: 'Садоводство',
53
+ [RealtyLandUsageType.Investproject]: 'Инвестпроект',
54
+ },
55
+ Relief: {
56
+ [RealtyRelief.Flat]: 'Ровный',
57
+ [RealtyRelief.Elevations]: 'Значительные перепады высот',
58
+ [RealtyRelief.Slope]: 'Склон',
59
+ [RealtyRelief.Hills]: 'Холмы',
60
+ },
61
+ Electricity: {
62
+ [RealtyElectricity.None]: 'Нет',
63
+ [RealtyElectricity.Connected]: 'Подключено',
64
+ [RealtyElectricity.Possible]: 'Возможно',
65
+ [RealtyElectricity.Autonomous]: 'Автономное',
66
+ },
67
+ Furniture: {
68
+ [RealtyFurniture.None]: 'Отсутствует',
69
+ [RealtyFurniture.Full]: 'Полностью мебелирован',
70
+ [RealtyFurniture.Part]: 'Частично мебелирован',
71
+ },
72
+ Sewerage: {
73
+ [RealtySewerage.None]: 'Нет',
74
+ [RealtySewerage.Cesspool]: 'Выгребная яма',
75
+ [RealtySewerage.Septic]: 'Септик',
76
+ [RealtySewerage.Bio]: 'Устройства биологической очистки',
77
+ [RealtySewerage.Central]: 'Центральная',
78
+ },
79
+ WindowView: {
80
+ [RealtyWindowView.Street]: 'На улицу',
81
+ [RealtyWindowView.Yard]: 'Во двор',
82
+ [RealtyWindowView.Both]: 'В обе стороны',
83
+ },
84
+ };
@@ -0,0 +1,12 @@
1
+ import { ShapeType } from '../types';
2
+
3
+ export const ShapeDictionary = {
4
+ Type: {
5
+ [ShapeType.AdministrativeDistrict]: 'Административный округ',
6
+ [ShapeType.Block]: 'Квартал',
7
+ [ShapeType.Complex]: 'Новостройка',
8
+ [ShapeType.District]: 'Район',
9
+ [ShapeType.House]: 'Здание',
10
+ [ShapeType.Microdistrict]: 'Микрорайон',
11
+ },
12
+ };
@@ -0,0 +1,3 @@
1
+ export * from './AddressBTIParams';
2
+ export * from './Realty';
3
+ export * from './Shape';
@@ -3,9 +3,19 @@ import * as api from './api';
3
3
  export class Api {
4
4
  constructor(private baseURL: string | undefined) {}
5
5
 
6
+ // complex
7
+
6
8
  findComplexIds = (params: api.FindComplexIdsParams) => {
7
9
  return api.findComplexIdsRequest({ params, baseURL: this.baseURL });
8
10
  };
11
+
12
+ // realty
13
+
14
+ findRealties = (params: api.FindRealtiesParams) => {
15
+ return api.findRealtiesRequest({ params, baseURL: this.baseURL });
16
+ };
9
17
  }
10
18
 
11
19
  export * from './api';
20
+ export * from './dictionaries';
21
+ export * from './types';
@@ -0,0 +1,29 @@
1
+ import { AddressBTIParams } from './AddressBTIParams';
2
+ import { AddressMetroDistance } from './AddressMetroDistance';
3
+ import { Shape } from './Shape';
4
+
5
+ export type Address = {
6
+ btiParams: Partial<AddressBTIParams>;
7
+ country: string;
8
+ fullAddress: string;
9
+ id: number;
10
+ isManual: boolean;
11
+ lat: number;
12
+ lng: number;
13
+ metroDistances: Array<Partial<AddressMetroDistance> & { id: number }>;
14
+ shapes: Array<Partial<Shape> & { id: number }>;
15
+
16
+ city?: string;
17
+ cityArea?: string;
18
+ district?: string;
19
+ draftName?: string;
20
+ fiasCode?: number;
21
+ house?: string;
22
+ kladrCode?: number;
23
+ medianPrice?: number;
24
+ medianSqmPrice?: number;
25
+ postalCode?: number;
26
+ realtyIds?: number[];
27
+ region?: string;
28
+ street?: string;
29
+ };
@@ -0,0 +1,42 @@
1
+ export enum AddressBTIParamsParking {
2
+ Ground = 'ground',
3
+ Multilevel = 'multilevel',
4
+ Underground = 'underground',
5
+ }
6
+
7
+ export enum AddressBTIParamsWallsMaterial {
8
+ Brick = 'brick',
9
+ Monolith = 'monolith',
10
+ Monobrick = 'monobrick',
11
+ Timber = 'timber',
12
+ Panel = 'panel',
13
+ Block = 'block',
14
+ }
15
+
16
+ export enum AddressBTIParamsHeatingType {
17
+ None = 'none',
18
+ Central = 'central',
19
+ Local = 'local',
20
+ Gas = 'gas',
21
+ Electricity = 'electricity',
22
+ Liquid = 'liquid',
23
+ }
24
+
25
+ export type AddressBTIParams = {
26
+ buildYear?: number;
27
+ cargoLifts?: number;
28
+ ceilingHeight?: number;
29
+ deliveryQuarter?: number;
30
+ deliveryYear?: number;
31
+ emergency?: boolean;
32
+ floors?: number;
33
+ garbageChute?: boolean;
34
+ heatingType?: AddressBTIParamsHeatingType;
35
+ id?: number;
36
+ isDelivered?: boolean;
37
+ isUpToDate?: boolean;
38
+ parking?: AddressBTIParamsParking;
39
+ passengerLifts?: number;
40
+ series?: string;
41
+ wallsMaterial?: AddressBTIParamsWallsMaterial;
42
+ };
@@ -0,0 +1,9 @@
1
+ export type AddressMetroDistance = {
2
+ distance: number;
3
+ id: number;
4
+ metroLine: string;
5
+ metroLineColor: string;
6
+ metroStation: string;
7
+ timeCar: number;
8
+ timeFoot: number;
9
+ };
@@ -0,0 +1,13 @@
1
+ export enum ImageType {
2
+ Complex = 'complex',
3
+ Apartment = 'apartment',
4
+ Layout = 'layout',
5
+ }
6
+
7
+ export type Image = {
8
+ id: number;
9
+ properties: { oldId?: number; maxSize?: string };
10
+ storagePath: string;
11
+ thumbnailPath: string;
12
+ type: string | ImageType;
13
+ };
@@ -0,0 +1,123 @@
1
+ import { Address } from './Address';
2
+ import { Image } from './Image';
3
+ import { RealtyOffer } from './RealtyOffer';
4
+
5
+ export enum RealtyType {
6
+ Flat = 'flat',
7
+ House = 'house',
8
+ }
9
+
10
+ export enum RealtyRenovationType {
11
+ None = 'none',
12
+ Author = 'author',
13
+ Cosmetic = 'cosmetic',
14
+ Euro = 'euro',
15
+ FineFinishing = 'fine_finishing',
16
+ RoughFinishing = 'rough_finishing',
17
+ }
18
+
19
+ export enum RealtyGas {
20
+ None = 'none',
21
+ Connected = 'connected',
22
+ Border = 'border',
23
+ Possible = 'possible',
24
+ Autonomous = 'autonomous',
25
+ }
26
+
27
+ export enum RealtyHouseType {
28
+ Townhouse = 'townhouse',
29
+ House = 'house',
30
+ Cottage = 'cottage',
31
+ Part = 'part',
32
+ Duplex = 'duplex',
33
+ }
34
+
35
+ export enum RealtyLandShape {
36
+ Regular = 'regular',
37
+ Irregular = 'irregular',
38
+ }
39
+
40
+ export enum RealtyLandUsageType {
41
+ IGS = 'igs',
42
+ LPH = 'lph',
43
+ DNP = 'dnp',
44
+ SNT = 'snt',
45
+ Farm = 'farm',
46
+ Garden = 'garden',
47
+ Investproject = 'investproject',
48
+ }
49
+
50
+ export enum RealtyRelief {
51
+ Flat = 'flat',
52
+ Elevations = 'elevations',
53
+ Slope = 'slope',
54
+ Hills = 'hills',
55
+ }
56
+
57
+ export enum RealtyElectricity {
58
+ None = 'none',
59
+ Connected = 'connected',
60
+ Possible = 'possible',
61
+ Autonomous = 'autonomous',
62
+ }
63
+
64
+ export enum RealtyFurniture {
65
+ None = 'none',
66
+ Full = 'full',
67
+ Part = 'part',
68
+ }
69
+
70
+ export enum RealtySewerage {
71
+ None = 'none',
72
+ Cesspool = 'cesspool',
73
+ Septic = 'septic',
74
+ Bio = 'bio',
75
+ Central = 'central',
76
+ }
77
+
78
+ export enum RealtyWindowView {
79
+ Street = 'street',
80
+ Yard = 'yard',
81
+ Both = 'both',
82
+ }
83
+
84
+ export type Realty = {
85
+ address: Partial<Address> & { id: number };
86
+ addressId: number;
87
+ area: number;
88
+ createdAt: string;
89
+ floor: number;
90
+ id: number;
91
+ images: Array<Partial<Image> & { id: number }>;
92
+ price: number;
93
+ realtyType: RealtyType;
94
+ renovationType: RealtyRenovationType;
95
+ roomsNumber: number;
96
+
97
+ balconyCount?: number;
98
+ burden?: boolean;
99
+ ceilingHeight?: number;
100
+ chambers?: string;
101
+ cityDistance?: number;
102
+ communityName?: string;
103
+ documentationUrl?: number;
104
+ electricity?: RealtyElectricity;
105
+ features?: string[];
106
+ floorsNumber?: number;
107
+ furniture?: RealtyFurniture;
108
+ gas?: RealtyGas;
109
+ houseType?: RealtyHouseType;
110
+ isDevelopersOffer?: boolean;
111
+ kitchenArea?: number;
112
+ landArea?: number;
113
+ landShape?: RealtyLandShape;
114
+ landUsageType?: RealtyLandUsageType;
115
+ livingArea?: number;
116
+ mainOffer?: Partial<RealtyOffer> & { id: number };
117
+ number?: number;
118
+ relief?: RealtyRelief;
119
+ separatedRoomsNumber?: number;
120
+ sewerage?: RealtySewerage;
121
+ soldAt?: string;
122
+ windowView?: RealtyWindowView;
123
+ };
@@ -0,0 +1,6 @@
1
+ export type RealtyOffer = {
2
+ extId: string;
3
+ id: number;
4
+ source: string;
5
+ url: string;
6
+ };
@@ -0,0 +1,24 @@
1
+ type Coordinates = number[];
2
+
3
+ type Polygon = { type: 'Polygon'; coordinates: Array<Coordinates> };
4
+
5
+ type MultiPolygon = {
6
+ type: 'MultiPolygon';
7
+ coordinates: Array<Array<Coordinates>>;
8
+ };
9
+
10
+ export enum ShapeType {
11
+ AdministrativeDistrict = 'administrative_district',
12
+ Block = 'block',
13
+ Complex = 'complex',
14
+ District = 'district',
15
+ House = 'house',
16
+ Microdistrict = 'microdistrict',
17
+ }
18
+
19
+ export type Shape = {
20
+ geometry: Polygon | MultiPolygon;
21
+ id: number;
22
+ name: string;
23
+ type: ShapeType;
24
+ };
@@ -0,0 +1,7 @@
1
+ export * from './Address';
2
+ export * from './AddressBTIParams';
3
+ export * from './AddressMetroDistance';
4
+ export * from './Image';
5
+ export * from './Realty';
6
+ export * from './RealtyOffer';
7
+ export * from './Shape';
@@ -1,42 +0,0 @@
1
- import { AxiosResponse, AxiosError } from 'axios';
2
- import { ServiceRequestSellerReport } from '../../../types';
3
- declare type ErrorData = {
4
- success: false;
5
- data: {
6
- error: string;
7
- };
8
- };
9
- declare type ResultData = {
10
- ids: string[];
11
- byId: Record<string, ServiceRequestSellerReport>;
12
- meta: {
13
- total: number;
14
- };
15
- };
16
- declare type ResultError = ErrorData['data']['error'];
17
- export declare type FindServiceRequestSellerReportParams = {
18
- sorting?: {
19
- type: 'createdAt';
20
- direction: 'asc' | 'desc';
21
- };
22
- limits?: {
23
- page?: number;
24
- count?: number | 'all';
25
- };
26
- };
27
- export declare type FindServiceRequestSellerReportUrlParams = {
28
- id: number;
29
- };
30
- export declare type FindServiceRequestSellerReportHeaders = {
31
- 'x-auth-hc': string;
32
- };
33
- export declare type FindServiceRequestSellerReportData = AxiosResponse<ResultData>;
34
- export declare type FindServiceRequestSellerReportError = AxiosError<ResultError>;
35
- export declare type FindServiceRequestSellerReportConfig = {
36
- baseURL?: string;
37
- urlParams: FindServiceRequestSellerReportUrlParams;
38
- params: FindServiceRequestSellerReportParams;
39
- headers?: FindServiceRequestSellerReportHeaders;
40
- };
41
- export declare function findServiceRequestSellerReportRequest({ baseURL, urlParams, headers, params, }: FindServiceRequestSellerReportConfig): Promise<FindServiceRequestSellerReportData>;
42
- export {};