@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.
@@ -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
- commission?: number;
15
- contractType?: CrossSaleContractorType;
15
+ contractorType?: CrossSaleContractorType;
16
16
  phone?: {
17
17
  id: number;
18
18
  number: string;
@@ -21,6 +21,7 @@ export declare type PhotoOrder = {
21
21
  expertPhone: string;
22
22
  hasAccessToFlat: boolean;
23
23
  id: string;
24
+ isOutCKAD: boolean;
24
25
  renovation: PhotoOrderRenovation;
25
26
  scheduledAt: string;
26
27
  serviceRequestId: number;
@@ -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
- included?: Array<Address | AddressBTIParams | Complex | ComplexHousing | RealtyImage | Image | RealtyHouseHighwayDistance | RealtyMetroDistance>;
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 | RealtyImage | Image | RealtyHouseHighwayDistance | RealtyMetroDistance>;
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
  };
@@ -0,0 +1,8 @@
1
+ export declare type ExternalLink = {
2
+ id: string;
3
+ type: 'externalLink';
4
+ attributes: {
5
+ source: string;
6
+ url: string;
7
+ };
8
+ };
@@ -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
- metroDistance?: {
353
- data: Array<{
361
+ externalLink?: {
362
+ data: {
354
363
  id: string;
355
- type: 'realtyMetroDistance';
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;
@@ -3,6 +3,7 @@ export * from './AddressBTIParams';
3
3
  export * from './AddressMetroDistance';
4
4
  export * from './Complex';
5
5
  export * from './ComplexHousing';
6
+ export * from './ExternalLink';
6
7
  export * from './Highway';
7
8
  export * from './Image';
8
9
  export * from './MetroStation';
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.154",
2
+ "version": "0.1.156",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -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
- commission?: number;
14
- contractType?: CrossSaleContractorType;
14
+ contractorType?: CrossSaleContractorType;
15
15
  phone?: { id: number; number: string };
16
16
  realtyServiceRequest?: { id: number };
17
17
  updatedAt?: string;
@@ -23,6 +23,7 @@ export type PhotoOrder = {
23
23
  expertPhone: string;
24
24
  hasAccessToFlat: boolean;
25
25
  id: string;
26
+ isOutCKAD: boolean;
26
27
  renovation: PhotoOrderRenovation;
27
28
  scheduledAt: string;
28
29
  serviceRequestId: number;
@@ -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
- | RealtyImage
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
- | RealtyImage
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 };
@@ -0,0 +1,8 @@
1
+ export type ExternalLink = {
2
+ id: string;
3
+ type: 'externalLink';
4
+ attributes: {
5
+ source: string;
6
+ url: string;
7
+ };
8
+ };
@@ -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
- metroDistance?: { data: Array<{ id: string; type: 'realtyMetroDistance' }> };
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
  };
@@ -3,6 +3,7 @@ export * from './AddressBTIParams';
3
3
  export * from './AddressMetroDistance';
4
4
  export * from './Complex';
5
5
  export * from './ComplexHousing';
6
+ export * from './ExternalLink';
6
7
  export * from './Highway';
7
8
  export * from './Image';
8
9
  export * from './MetroStation';