@hapl/api-queries 0.1.154 → 0.1.156
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/CHANGELOG.md +24 -0
- package/dist/api-queries.cjs.development.js +1 -1
- 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 +1 -1
- package/dist/api-queries.esm.js.map +1 -1
- package/dist/clients/v1/api/crossSale/updateCrossSale/index.d.ts +3 -3
- package/dist/clients/v1/types/CrossSale.d.ts +2 -2
- package/dist/clients/v1/types/PhotoOrder.d.ts +1 -0
- package/dist/clients/v2/api/realty/findRealties/index.d.ts +12 -5
- package/dist/clients/v2/api/realty/findRealtyById/index.d.ts +4 -3
- package/dist/clients/v2/types/ExternalLink.d.ts +8 -0
- package/dist/clients/v2/types/Realty.d.ts +19 -4
- package/dist/clients/v2/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/clients/v1/api/crossSale/updateCrossSale/index.ts +3 -3
- package/src/clients/v1/dictionaries/CrossSale.ts +1 -1
- package/src/clients/v1/types/CrossSale.ts +2 -2
- package/src/clients/v1/types/PhotoOrder.ts +1 -0
- package/src/clients/v2/api/realty/findRealties/index.ts +9 -4
- package/src/clients/v2/api/realty/findRealtyById/index.ts +6 -2
- package/src/clients/v2/types/ExternalLink.ts +8 -0
- package/src/clients/v2/types/Realty.ts +6 -1
- package/src/clients/v2/types/index.ts +1 -0
|
@@ -20,12 +20,12 @@ export declare type UpdateCrossSaleHeaders = {
|
|
|
20
20
|
'x-auth-hc': string;
|
|
21
21
|
};
|
|
22
22
|
export declare type UpdateCrossSaleBody = {
|
|
23
|
-
contractorType?: CrossSaleContractorType;
|
|
23
|
+
contractorType?: CrossSaleContractorType | null;
|
|
24
24
|
phone?: {
|
|
25
25
|
number: string;
|
|
26
|
-
};
|
|
26
|
+
} | null;
|
|
27
27
|
commission?: number;
|
|
28
|
-
comment?: string;
|
|
28
|
+
comment?: string | null;
|
|
29
29
|
};
|
|
30
30
|
export declare type UpdateCrossSaleData = AxiosResponse<ResultData>;
|
|
31
31
|
export declare type UpdateCrossSaleError = AxiosError<ResultError>;
|
|
@@ -10,9 +10,9 @@ export declare type CrossSale = {
|
|
|
10
10
|
id: number;
|
|
11
11
|
};
|
|
12
12
|
realtyExtId: number;
|
|
13
|
+
commission: number;
|
|
13
14
|
comment?: string;
|
|
14
|
-
|
|
15
|
-
contractType?: CrossSaleContractorType;
|
|
15
|
+
contractorType?: CrossSaleContractorType;
|
|
16
16
|
phone?: {
|
|
17
17
|
id: number;
|
|
18
18
|
number: string;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { AxiosResponse, AxiosError } from 'axios';
|
|
2
|
-
import { Realty, Address, AddressBTIParams, Complex, ComplexHousing, RealtyImage, Image, RealtyHouseHighwayDistance, RealtyMetroDistance, RealtyType } from '../../../types';
|
|
2
|
+
import { Realty, Address, AddressBTIParams, Complex, ComplexHousing, RealtyImage, Image, RealtyHouseHighwayDistance, RealtyMetroDistance, RealtyType, ExternalLink } from '../../../types';
|
|
3
|
+
declare type RealtyMeta = {
|
|
4
|
+
createdAt: string;
|
|
5
|
+
};
|
|
3
6
|
declare type SuccessData = {
|
|
4
|
-
data: Realty
|
|
5
|
-
|
|
7
|
+
data: Array<Realty & {
|
|
8
|
+
meta: RealtyMeta;
|
|
9
|
+
}>;
|
|
10
|
+
included?: Array<Address | AddressBTIParams | Complex | ComplexHousing | ExternalLink | Image | RealtyHouseHighwayDistance | RealtyImage | RealtyMetroDistance>;
|
|
6
11
|
meta: {
|
|
7
12
|
page: {
|
|
8
13
|
offset: number;
|
|
@@ -26,12 +31,14 @@ declare type ErrorData = {
|
|
|
26
31
|
};
|
|
27
32
|
declare type ResultData = {
|
|
28
33
|
ids: string[];
|
|
29
|
-
byId: Record<string, Realty
|
|
34
|
+
byId: Record<string, Realty & {
|
|
35
|
+
meta: RealtyMeta;
|
|
36
|
+
}>;
|
|
30
37
|
meta: SuccessData['meta'];
|
|
31
38
|
included?: SuccessData['included'];
|
|
32
39
|
};
|
|
33
40
|
declare type ResultError = ErrorData['errors'];
|
|
34
|
-
export declare type FindRealtiesInclude = 'address.bti' | 'complex' | 'complexHousing' | 'metroDistance.metroStation' | 'address.metroDistance.metroStation' | 'highwayDistance.highway' | 'realtyImage.image';
|
|
41
|
+
export declare type FindRealtiesInclude = 'address.bti' | 'complex' | 'complexHousing' | 'metroDistance.metroStation' | 'address.metroDistance.metroStation' | 'highwayDistance.highway' | 'realtyImage.image' | 'externalLink';
|
|
35
42
|
export declare type FindRealtiesParams = {
|
|
36
43
|
include?: Array<FindRealtiesInclude>;
|
|
37
44
|
filter?: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosResponse, AxiosError } from 'axios';
|
|
2
|
-
import { Realty, Address, AddressBTIParams, Complex, ComplexHousing, RealtyImage, Image, RealtyHouseHighwayDistance, RealtyMetroDistance } from '../../../types';
|
|
2
|
+
import { Realty, Address, AddressBTIParams, Complex, ComplexHousing, RealtyImage, Image, RealtyHouseHighwayDistance, RealtyMetroDistance, ExternalLink } from '../../../types';
|
|
3
3
|
export declare enum FindRealtyByIdDataMetaRealtyAccess {
|
|
4
4
|
Curator = "curator",
|
|
5
5
|
CuratorMentor = "curator_mentor",
|
|
@@ -10,6 +10,7 @@ export declare enum FindRealtyByIdDataMetaRealtyAccess {
|
|
|
10
10
|
declare type SuccessData = {
|
|
11
11
|
data: Realty & {
|
|
12
12
|
meta: {
|
|
13
|
+
createdAt: string;
|
|
13
14
|
consistency?: Array<{
|
|
14
15
|
message: string;
|
|
15
16
|
fields: string[];
|
|
@@ -19,7 +20,7 @@ declare type SuccessData = {
|
|
|
19
20
|
serviceRequestId?: number;
|
|
20
21
|
};
|
|
21
22
|
};
|
|
22
|
-
included?: Array<Address | AddressBTIParams | Complex | ComplexHousing |
|
|
23
|
+
included?: Array<Address | AddressBTIParams | Complex | ComplexHousing | ExternalLink | Image | RealtyHouseHighwayDistance | RealtyImage | RealtyMetroDistance>;
|
|
23
24
|
errors: never;
|
|
24
25
|
};
|
|
25
26
|
declare type ErrorData = {
|
|
@@ -40,7 +41,7 @@ declare type ResultData = {
|
|
|
40
41
|
included?: SuccessData['included'];
|
|
41
42
|
};
|
|
42
43
|
declare type ResultError = ErrorData['errors'];
|
|
43
|
-
export declare type RealtyInclude = 'address.bti' | 'complex' | 'complexHousing' | 'metroDistance.metroStation' | 'address.metroDistance.metroStation' | 'highwayDistance.highway' | 'realtyImage.image';
|
|
44
|
+
export declare type RealtyInclude = 'address.bti' | 'complex' | 'complexHousing' | 'metroDistance.metroStation' | 'address.metroDistance.metroStation' | 'highwayDistance.highway' | 'realtyImage.image' | 'externalLink';
|
|
44
45
|
export declare type FindRealtyByIdHeaders = {
|
|
45
46
|
'x-auth-hc': string;
|
|
46
47
|
};
|
|
@@ -189,6 +189,7 @@ export declare type RealtyAttributesFlatSecondary = {
|
|
|
189
189
|
parkingType?: RealtyParkingType;
|
|
190
190
|
renovationType?: RealtyRenovationType;
|
|
191
191
|
rooms?: Array<number>;
|
|
192
|
+
soldAt?: string;
|
|
192
193
|
title?: string;
|
|
193
194
|
toilets?: Array<{
|
|
194
195
|
kind: RealtyToiletKind;
|
|
@@ -216,6 +217,12 @@ export declare type RealtyRelationshipsFlatSecondary = {
|
|
|
216
217
|
type: 'complexHousing';
|
|
217
218
|
};
|
|
218
219
|
};
|
|
220
|
+
externalLink?: {
|
|
221
|
+
data: {
|
|
222
|
+
id: string;
|
|
223
|
+
type: 'externalLink';
|
|
224
|
+
};
|
|
225
|
+
};
|
|
219
226
|
metroDistance?: {
|
|
220
227
|
data: Array<{
|
|
221
228
|
id: string;
|
|
@@ -274,6 +281,7 @@ export declare type RealtyAttributesFlatNew = {
|
|
|
274
281
|
parkingType?: RealtyParkingType;
|
|
275
282
|
renovationType?: RealtyRenovationTypeFlatNew;
|
|
276
283
|
rooms?: Array<number>;
|
|
284
|
+
soldAt?: string;
|
|
277
285
|
title?: string;
|
|
278
286
|
toilets?: Array<{
|
|
279
287
|
kind: RealtyToiletKind;
|
|
@@ -334,6 +342,7 @@ export declare type RealtyAttributesHouse = {
|
|
|
334
342
|
rooms?: Array<number>;
|
|
335
343
|
sewerage?: RealtySewerage;
|
|
336
344
|
shareSize?: number;
|
|
345
|
+
soldAt?: string;
|
|
337
346
|
title?: string;
|
|
338
347
|
toilets?: Array<{
|
|
339
348
|
kind: RealtyToiletKind;
|
|
@@ -349,11 +358,11 @@ export declare type RealtyRelationshipsHouse = {
|
|
|
349
358
|
type: 'address';
|
|
350
359
|
};
|
|
351
360
|
};
|
|
352
|
-
|
|
353
|
-
data:
|
|
361
|
+
externalLink?: {
|
|
362
|
+
data: {
|
|
354
363
|
id: string;
|
|
355
|
-
type: '
|
|
356
|
-
}
|
|
364
|
+
type: 'externalLink';
|
|
365
|
+
};
|
|
357
366
|
};
|
|
358
367
|
highwayDistance?: {
|
|
359
368
|
data: Array<{
|
|
@@ -361,6 +370,12 @@ export declare type RealtyRelationshipsHouse = {
|
|
|
361
370
|
type: 'houseHighwayDistance';
|
|
362
371
|
}>;
|
|
363
372
|
};
|
|
373
|
+
metroDistance?: {
|
|
374
|
+
data: Array<{
|
|
375
|
+
id: string;
|
|
376
|
+
type: 'realtyMetroDistance';
|
|
377
|
+
}>;
|
|
378
|
+
};
|
|
364
379
|
realtyImage?: {
|
|
365
380
|
data: Array<{
|
|
366
381
|
id: string;
|
package/package.json
CHANGED
|
@@ -10,10 +10,10 @@ type ResultError = ErrorData['data']['error'];
|
|
|
10
10
|
export type UpdateCrossSaleUrlParams = { serviceRequestId: number; realtyId: number };
|
|
11
11
|
export type UpdateCrossSaleHeaders = { 'x-auth-hc': string };
|
|
12
12
|
export type UpdateCrossSaleBody = {
|
|
13
|
-
contractorType?: CrossSaleContractorType;
|
|
14
|
-
phone?: { number: string };
|
|
13
|
+
contractorType?: CrossSaleContractorType | null;
|
|
14
|
+
phone?: { number: string } | null;
|
|
15
15
|
commission?: number;
|
|
16
|
-
comment?: string;
|
|
16
|
+
comment?: string | null;
|
|
17
17
|
};
|
|
18
18
|
export type UpdateCrossSaleData = AxiosResponse<ResultData>;
|
|
19
19
|
export type UpdateCrossSaleError = AxiosError<ResultError>;
|
|
@@ -3,7 +3,7 @@ import { CrossSaleContractorType } from '../types';
|
|
|
3
3
|
export const CrossSaleDictionary = {
|
|
4
4
|
ContractorType: {
|
|
5
5
|
[CrossSaleContractorType.Owner]: 'Собственник',
|
|
6
|
-
[CrossSaleContractorType.Agent]: '
|
|
6
|
+
[CrossSaleContractorType.Agent]: 'Частный агент',
|
|
7
7
|
[CrossSaleContractorType.Agency]: 'Агентство',
|
|
8
8
|
},
|
|
9
9
|
};
|
|
@@ -9,9 +9,9 @@ export type CrossSale = {
|
|
|
9
9
|
id: number;
|
|
10
10
|
mainServiceRequest: { id: number };
|
|
11
11
|
realtyExtId: number;
|
|
12
|
+
commission: number;
|
|
12
13
|
comment?: string;
|
|
13
|
-
|
|
14
|
-
contractType?: CrossSaleContractorType;
|
|
14
|
+
contractorType?: CrossSaleContractorType;
|
|
15
15
|
phone?: { id: number; number: string };
|
|
16
16
|
realtyServiceRequest?: { id: number };
|
|
17
17
|
updatedAt?: string;
|
|
@@ -11,18 +11,22 @@ import {
|
|
|
11
11
|
RealtyHouseHighwayDistance,
|
|
12
12
|
RealtyMetroDistance,
|
|
13
13
|
RealtyType,
|
|
14
|
+
ExternalLink,
|
|
14
15
|
} from '../../../types';
|
|
15
16
|
|
|
17
|
+
type RealtyMeta = { createdAt: string };
|
|
18
|
+
|
|
16
19
|
type SuccessData = {
|
|
17
|
-
data: Realty
|
|
20
|
+
data: Array<Realty & { meta: RealtyMeta }>;
|
|
18
21
|
included?: Array<
|
|
19
22
|
| Address
|
|
20
23
|
| AddressBTIParams
|
|
21
24
|
| Complex
|
|
22
25
|
| ComplexHousing
|
|
23
|
-
|
|
|
26
|
+
| ExternalLink
|
|
24
27
|
| Image
|
|
25
28
|
| RealtyHouseHighwayDistance
|
|
29
|
+
| RealtyImage
|
|
26
30
|
| RealtyMetroDistance
|
|
27
31
|
>;
|
|
28
32
|
meta: { page: { offset: number; count: number; total: number } };
|
|
@@ -37,7 +41,7 @@ type ErrorData = {
|
|
|
37
41
|
|
|
38
42
|
type ResultData = {
|
|
39
43
|
ids: string[];
|
|
40
|
-
byId: Record<string, Realty>;
|
|
44
|
+
byId: Record<string, Realty & { meta: RealtyMeta }>;
|
|
41
45
|
meta: SuccessData['meta'];
|
|
42
46
|
included?: SuccessData['included'];
|
|
43
47
|
};
|
|
@@ -50,7 +54,8 @@ export type FindRealtiesInclude =
|
|
|
50
54
|
| 'metroDistance.metroStation'
|
|
51
55
|
| 'address.metroDistance.metroStation'
|
|
52
56
|
| 'highwayDistance.highway'
|
|
53
|
-
| 'realtyImage.image'
|
|
57
|
+
| 'realtyImage.image'
|
|
58
|
+
| 'externalLink';
|
|
54
59
|
|
|
55
60
|
export type FindRealtiesParams = {
|
|
56
61
|
include?: Array<FindRealtiesInclude>;
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
Image,
|
|
11
11
|
RealtyHouseHighwayDistance,
|
|
12
12
|
RealtyMetroDistance,
|
|
13
|
+
ExternalLink,
|
|
13
14
|
} from '../../../types';
|
|
14
15
|
|
|
15
16
|
export enum FindRealtyByIdDataMetaRealtyAccess {
|
|
@@ -23,6 +24,7 @@ export enum FindRealtyByIdDataMetaRealtyAccess {
|
|
|
23
24
|
type SuccessData = {
|
|
24
25
|
data: Realty & {
|
|
25
26
|
meta: {
|
|
27
|
+
createdAt: string;
|
|
26
28
|
consistency?: Array<{ message: string; fields: string[] }>;
|
|
27
29
|
realtyAccess?: Array<FindRealtyByIdDataMetaRealtyAccess>;
|
|
28
30
|
updatedAt?: string;
|
|
@@ -34,9 +36,10 @@ type SuccessData = {
|
|
|
34
36
|
| AddressBTIParams
|
|
35
37
|
| Complex
|
|
36
38
|
| ComplexHousing
|
|
37
|
-
|
|
|
39
|
+
| ExternalLink
|
|
38
40
|
| Image
|
|
39
41
|
| RealtyHouseHighwayDistance
|
|
42
|
+
| RealtyImage
|
|
40
43
|
| RealtyMetroDistance
|
|
41
44
|
>;
|
|
42
45
|
errors: never;
|
|
@@ -62,7 +65,8 @@ export type RealtyInclude =
|
|
|
62
65
|
| 'metroDistance.metroStation'
|
|
63
66
|
| 'address.metroDistance.metroStation'
|
|
64
67
|
| 'highwayDistance.highway'
|
|
65
|
-
| 'realtyImage.image'
|
|
68
|
+
| 'realtyImage.image'
|
|
69
|
+
| 'externalLink';
|
|
66
70
|
|
|
67
71
|
export type FindRealtyByIdHeaders = { 'x-auth-hc': string };
|
|
68
72
|
export type FindRealtyByIdUrlParams = { id: string };
|
|
@@ -215,6 +215,7 @@ export type RealtyAttributesFlatSecondary = {
|
|
|
215
215
|
parkingType?: RealtyParkingType;
|
|
216
216
|
renovationType?: RealtyRenovationType;
|
|
217
217
|
rooms?: Array<number>;
|
|
218
|
+
soldAt?: string;
|
|
218
219
|
title?: string;
|
|
219
220
|
toilets?: Array<{ kind: RealtyToiletKind; isInside?: boolean }>;
|
|
220
221
|
videoUrl?: string;
|
|
@@ -225,6 +226,7 @@ export type RealtyRelationshipsFlatSecondary = {
|
|
|
225
226
|
address: { data: { id: string; type: 'address' } };
|
|
226
227
|
complex?: { data: { id: string; type: 'complex' } };
|
|
227
228
|
complexHousing?: { data: { id: string; type: 'complexHousing' } };
|
|
229
|
+
externalLink?: { data: { id: string; type: 'externalLink' } };
|
|
228
230
|
metroDistance?: { data: Array<{ id: string; type: 'realtyMetroDistance' }> };
|
|
229
231
|
realtyImage?: { data: Array<{ id: string; type: 'realtyImage' }> };
|
|
230
232
|
};
|
|
@@ -275,6 +277,7 @@ export type RealtyAttributesFlatNew = {
|
|
|
275
277
|
parkingType?: RealtyParkingType;
|
|
276
278
|
renovationType?: RealtyRenovationTypeFlatNew;
|
|
277
279
|
rooms?: Array<number>;
|
|
280
|
+
soldAt?: string;
|
|
278
281
|
title?: string;
|
|
279
282
|
toilets?: Array<{ kind: RealtyToiletKind; isInside?: boolean }>;
|
|
280
283
|
videoUrl?: string;
|
|
@@ -335,6 +338,7 @@ export type RealtyAttributesHouse = {
|
|
|
335
338
|
rooms?: Array<number>;
|
|
336
339
|
sewerage?: RealtySewerage;
|
|
337
340
|
shareSize?: number;
|
|
341
|
+
soldAt?: string;
|
|
338
342
|
title?: string;
|
|
339
343
|
toilets?: Array<{ kind: RealtyToiletKind; isInside?: boolean }>;
|
|
340
344
|
videoUrl?: string;
|
|
@@ -343,7 +347,8 @@ export type RealtyAttributesHouse = {
|
|
|
343
347
|
|
|
344
348
|
export type RealtyRelationshipsHouse = {
|
|
345
349
|
address: { data: { id: string; type: 'address' } };
|
|
346
|
-
|
|
350
|
+
externalLink?: { data: { id: string; type: 'externalLink' } };
|
|
347
351
|
highwayDistance?: { data: Array<{ id: string; type: 'houseHighwayDistance' }> };
|
|
352
|
+
metroDistance?: { data: Array<{ id: string; type: 'realtyMetroDistance' }> };
|
|
348
353
|
realtyImage?: { data: Array<{ id: string; type: 'realtyImage' }> };
|
|
349
354
|
};
|