@hapl/api-queries 0.1.118 → 0.1.121
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 +36 -0
- package/dist/api-queries.cjs.development.js +324 -30
- 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 +324 -30
- package/dist/api-queries.esm.js.map +1 -1
- package/dist/clients/v1/api/buyer/countBuyers/index.d.ts +21 -0
- package/dist/clients/v1/api/index.d.ts +2 -1
- package/dist/clients/v1/api/serviceRequest/findServiceRequestSellerReports/index.d.ts +42 -0
- package/dist/clients/v1/index.d.ts +2 -1
- package/dist/publisher/v1/api/findActualEventsRow/index.d.ts +20 -15
- package/dist/registry/v1/api/{complexes → complex}/findComplexIds/index.d.ts +0 -0
- package/dist/registry/v1/api/index.d.ts +2 -1
- package/dist/registry/v1/api/realty/findRealties/index.d.ts +34 -0
- package/dist/registry/v1/dictionaries/AddressBTIParams.d.ts +24 -0
- package/dist/registry/v1/dictionaries/Realty.d.ts +71 -0
- package/dist/registry/v1/dictionaries/Shape.d.ts +11 -0
- package/dist/registry/v1/dictionaries/index.d.ts +3 -0
- package/dist/registry/v1/index.d.ts +3 -0
- package/dist/registry/v1/types/Address.d.ts +31 -0
- package/dist/registry/v1/types/AddressBTIParams.d.ts +39 -0
- package/dist/registry/v1/types/AddressMetroDistance.d.ts +9 -0
- package/dist/registry/v1/types/Image.d.ts +15 -0
- package/dist/registry/v1/types/Realty.d.ts +116 -0
- package/dist/registry/v1/types/RealtyOffer.d.ts +6 -0
- package/dist/registry/v1/types/Shape.d.ts +24 -0
- package/dist/registry/v1/types/index.d.ts +7 -0
- package/package.json +2 -1
- package/src/clients/v1/api/buyer/countBuyers/index.ts +47 -0
- package/src/clients/v1/api/index.ts +3 -1
- package/src/clients/v1/api/serviceRequest/{findServiceRequestSellerReport → findServiceRequestSellerReports}/index.ts +13 -13
- package/src/clients/v1/index.ts +11 -5
- package/src/publisher/v1/api/findActualEventsRow/index.ts +34 -33
- package/src/registry/v1/api/{complexes → complex}/findComplexIds/index.ts +0 -0
- package/src/registry/v1/api/index.ts +3 -1
- package/src/registry/v1/api/realty/findRealties/index.ts +54 -0
- package/src/registry/v1/dictionaries/AddressBTIParams.ts +25 -0
- package/src/registry/v1/dictionaries/Realty.ts +84 -0
- package/src/registry/v1/dictionaries/Shape.ts +12 -0
- package/src/registry/v1/dictionaries/index.ts +3 -0
- package/src/registry/v1/index.ts +10 -0
- package/src/registry/v1/types/Address.ts +29 -0
- package/src/registry/v1/types/AddressBTIParams.ts +42 -0
- package/src/registry/v1/types/AddressMetroDistance.ts +9 -0
- package/src/registry/v1/types/Image.ts +13 -0
- package/src/registry/v1/types/Realty.ts +123 -0
- package/src/registry/v1/types/RealtyOffer.ts +6 -0
- package/src/registry/v1/types/Shape.ts +24 -0
- package/src/registry/v1/types/index.ts +7 -0
- package/dist/clients/v1/api/serviceRequest/findServiceRequestSellerReport/index.d.ts +0 -42
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AxiosResponse, AxiosError } from 'axios';
|
|
2
|
+
declare type ResultData = number;
|
|
3
|
+
declare type ResultError = string;
|
|
4
|
+
export declare type CountBuyersHeaders = {
|
|
5
|
+
'x-auth-hc': string;
|
|
6
|
+
};
|
|
7
|
+
export declare type CountBuyersParams = {
|
|
8
|
+
filter?: {
|
|
9
|
+
'serviceRequest.id'?: number;
|
|
10
|
+
everHadStatus?: 'show_complete';
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare type CountBuyersData = AxiosResponse<ResultData>;
|
|
14
|
+
export declare type CountBuyersError = AxiosError<ResultError>;
|
|
15
|
+
export declare type CountBuyersConfig = {
|
|
16
|
+
baseURL?: string;
|
|
17
|
+
headers: CountBuyersHeaders;
|
|
18
|
+
params: CountBuyersParams;
|
|
19
|
+
};
|
|
20
|
+
export declare function countBuyersRequest({ baseURL, headers, params }: CountBuyersConfig): Promise<CountBuyersData>;
|
|
21
|
+
export {};
|
|
@@ -5,6 +5,7 @@ export * from './availableFunds/createAvailableFunds';
|
|
|
5
5
|
export * from './availableFunds/findAvailableFunds';
|
|
6
6
|
export * from './availableFunds/updateAvailableFunds';
|
|
7
7
|
export * from './availableFunds/deleteAvailableFunds';
|
|
8
|
+
export * from './buyer/countBuyers';
|
|
8
9
|
export * from './call/findCalls';
|
|
9
10
|
export * from './call/findFirstSuccessOutgoingCalls';
|
|
10
11
|
export * from './call/markupCall';
|
|
@@ -43,7 +44,7 @@ export * from './serviceRequest/findServiceRequestActivities';
|
|
|
43
44
|
export * from './serviceRequest/findServiceRequestById';
|
|
44
45
|
export * from './serviceRequest/findServiceRequestDuplicates';
|
|
45
46
|
export * from './serviceRequest/findServiceRequests';
|
|
46
|
-
export * from './serviceRequest/
|
|
47
|
+
export * from './serviceRequest/findServiceRequestSellerReports';
|
|
47
48
|
export * from './serviceRequest/findServiceRequestShortInfo';
|
|
48
49
|
export * from './serviceRequest/findServiceRequestShortInfoById';
|
|
49
50
|
export * from './serviceRequest/findServiceRequestShortInfoByDealId';
|
|
@@ -0,0 +1,42 @@
|
|
|
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 FindServiceRequestSellerReportsParams = {
|
|
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 FindServiceRequestSellerReportsUrlParams = {
|
|
28
|
+
id: number;
|
|
29
|
+
};
|
|
30
|
+
export declare type FindServiceRequestSellerReportsHeaders = {
|
|
31
|
+
'x-auth-hc': string;
|
|
32
|
+
};
|
|
33
|
+
export declare type FindServiceRequestSellerReportsData = AxiosResponse<ResultData>;
|
|
34
|
+
export declare type FindServiceRequestSellerReportsError = AxiosError<ResultError>;
|
|
35
|
+
export declare type FindServiceRequestSellerReportsConfig = {
|
|
36
|
+
baseURL?: string;
|
|
37
|
+
urlParams: FindServiceRequestSellerReportsUrlParams;
|
|
38
|
+
params: FindServiceRequestSellerReportsParams;
|
|
39
|
+
headers?: FindServiceRequestSellerReportsHeaders;
|
|
40
|
+
};
|
|
41
|
+
export declare function findServiceRequestSellerReportsRequest({ baseURL, urlParams, headers, params, }: FindServiceRequestSellerReportsConfig): Promise<FindServiceRequestSellerReportsData>;
|
|
42
|
+
export {};
|
|
@@ -9,6 +9,7 @@ export declare class Api {
|
|
|
9
9
|
findAvailableFunds: (params: api.FindAvailableFundsParams, headers: api.FindAvailableFundsHeaders) => Promise<api.FindAvailableFundsData>;
|
|
10
10
|
updateAvailableFunds: (urlParams: api.UpdateAvailableFundsUrlParams, body: api.UpdateAvailableFundsBody, headers: api.UpdateAvailableFundsHeaders) => Promise<api.UpdateAvailableFundsData>;
|
|
11
11
|
deleteAvailableFunds: (urlParams: api.DeleteAvailableFundsUrlParams, headers: api.DeleteAvailableFundsHeaders) => Promise<api.DeleteAvailableFundsData>;
|
|
12
|
+
countBuyers: (params: api.CountBuyersParams, headers: api.CountBuyersHeaders) => Promise<api.CountBuyersData>;
|
|
12
13
|
findCalls: (params: api.FindCallsParams, headers: api.FindCallsHeaders) => Promise<api.FindCallsData>;
|
|
13
14
|
findFirstSuccessOutgoingCalls: (params: api.FindFirstSuccessOutgoingCallsParams, headers: api.FindFirstSuccessOutgoingCallsHeaders) => Promise<api.FindFirstSuccessOutgoingCallsData>;
|
|
14
15
|
markupCall: (body: api.MarkupCallBody, headers: api.MarkupCallHeaders) => Promise<api.MarkupCallData>;
|
|
@@ -56,7 +57,7 @@ export declare class Api {
|
|
|
56
57
|
returnDeferredServiceRequest: (body: api.ReturnDeferredServiceRequestBody, headers: api.ReturnDeferredServiceRequestHeaders) => Promise<api.ReturnDeferredServiceRequestData>;
|
|
57
58
|
startServiceRequestModeration: (urlParams: api.StartServiceRequestModerationUrlParams, headers: api.StartServiceRequestModerationHeaders) => Promise<api.StartServiceRequestModerationData>;
|
|
58
59
|
startServiceRequestModerationForOldRealty: (urlParams: api.StartServiceRequestModerationForOldRealtyUrlParams, headers: api.StartServiceRequestModerationForOldRealtyHeaders) => Promise<api.StartServiceRequestModerationForOldRealtyData>;
|
|
59
|
-
|
|
60
|
+
findServiceRequestSellerReports: (urlParams: api.FindServiceRequestSellerReportsUrlParams, params: api.FindServiceRequestSellerReportsParams, headers: api.FindServiceRequestSellerReportsHeaders) => Promise<api.FindServiceRequestSellerReportsData>;
|
|
60
61
|
findSoldStatistic: (headers?: api.FindSoldStatisticHeaders | undefined) => Promise<api.FindSoldStatisticData>;
|
|
61
62
|
findTasks: (params: api.FindTasksParams, headers: api.FindTasksHeaders) => Promise<api.FindTasksData>;
|
|
62
63
|
createUser: (body: api.CreateUserBody, headers: api.CreateUserHeaders) => Promise<api.CreateUserData>;
|
|
@@ -1,32 +1,37 @@
|
|
|
1
|
+
import { AxiosResponse, AxiosError } from 'axios';
|
|
1
2
|
import { ActualEventsRow } from '../../types';
|
|
3
|
+
declare type ResultData = {
|
|
4
|
+
ids: string[];
|
|
5
|
+
byId: Record<string, ActualEventsRow & {
|
|
6
|
+
_id: string;
|
|
7
|
+
}>;
|
|
8
|
+
meta: {
|
|
9
|
+
total: number;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
declare type ResultError = string;
|
|
2
13
|
export declare type FindActualEventsRowHeaders = {
|
|
3
14
|
'x-auth-hc': string;
|
|
4
15
|
};
|
|
5
16
|
export declare type FindActualEventsRowParams = {
|
|
6
17
|
filter?: {
|
|
7
|
-
'
|
|
18
|
+
'realty.id'?: number;
|
|
19
|
+
createdAt?: {
|
|
20
|
+
from?: string;
|
|
21
|
+
to?: string;
|
|
22
|
+
};
|
|
8
23
|
};
|
|
9
24
|
limits?: {
|
|
10
25
|
page: number;
|
|
11
|
-
count: number;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export declare type FindActualEventsRowData = {
|
|
15
|
-
data: {
|
|
16
|
-
ids: number[];
|
|
17
|
-
byId: Record<string, ActualEventsRow>;
|
|
26
|
+
count: number | 'all';
|
|
18
27
|
};
|
|
19
|
-
meta: {
|
|
20
|
-
total: number;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export declare type FindActualEventsRowError = {
|
|
24
|
-
status: number;
|
|
25
|
-
data: string;
|
|
26
28
|
};
|
|
29
|
+
export declare type FindActualEventsRowData = AxiosResponse<ResultData>;
|
|
30
|
+
export declare type FindActualEventsRowError = AxiosError<ResultError>;
|
|
27
31
|
export declare type FindActualEventsRowConfig = {
|
|
28
32
|
baseURL?: string;
|
|
29
33
|
headers: FindActualEventsRowHeaders;
|
|
30
34
|
params: FindActualEventsRowParams;
|
|
31
35
|
};
|
|
32
36
|
export declare function findActualEventsRowRequest({ baseURL, headers, params, }: FindActualEventsRowConfig): Promise<FindActualEventsRowData>;
|
|
37
|
+
export {};
|
|
File without changes
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './complex/findComplexIds';
|
|
2
|
+
export * from './realty/findRealties';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AxiosResponse, AxiosError } from 'axios';
|
|
2
|
+
import { Realty } from '../../../types';
|
|
3
|
+
declare type ResultData = {
|
|
4
|
+
ids: number[];
|
|
5
|
+
byId: Record<string, Realty>;
|
|
6
|
+
meta: {
|
|
7
|
+
total: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
declare type ResultError = string;
|
|
11
|
+
export declare type FindRealtiesHeaders = {
|
|
12
|
+
'x-auth-hc': string;
|
|
13
|
+
};
|
|
14
|
+
export declare type FindRealtiesParams = {
|
|
15
|
+
filter?: {
|
|
16
|
+
id?: number | number[];
|
|
17
|
+
};
|
|
18
|
+
limits?: {
|
|
19
|
+
page?: number;
|
|
20
|
+
count?: number | 'all';
|
|
21
|
+
};
|
|
22
|
+
sorting?: {
|
|
23
|
+
direction: 'asc' | 'desc';
|
|
24
|
+
type: 'createdAt' | 'id';
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare type FindRealtiesData = AxiosResponse<ResultData>;
|
|
28
|
+
export declare type FindRealtiesError = AxiosError<ResultError>;
|
|
29
|
+
export declare type FindRealtiesConfig = {
|
|
30
|
+
baseURL?: string;
|
|
31
|
+
params: FindRealtiesParams;
|
|
32
|
+
};
|
|
33
|
+
export declare function findRealtiesRequest({ baseURL, params }: FindRealtiesConfig): Promise<FindRealtiesData>;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AddressBTIParamsParking, AddressBTIParamsWallsMaterial, AddressBTIParamsHeatingType } from '../types';
|
|
2
|
+
export declare const AddressBTIParamsDictionary: {
|
|
3
|
+
Parking: {
|
|
4
|
+
ground: string;
|
|
5
|
+
multilevel: string;
|
|
6
|
+
underground: string;
|
|
7
|
+
};
|
|
8
|
+
WallsMaterial: {
|
|
9
|
+
brick: string;
|
|
10
|
+
monolith: string;
|
|
11
|
+
monobrick: string;
|
|
12
|
+
timber: string;
|
|
13
|
+
panel: string;
|
|
14
|
+
block: string;
|
|
15
|
+
};
|
|
16
|
+
HeatingType: {
|
|
17
|
+
none: string;
|
|
18
|
+
central: string;
|
|
19
|
+
local: string;
|
|
20
|
+
gas: string;
|
|
21
|
+
electricity: string;
|
|
22
|
+
liquid: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { RealtyType, RealtyRenovationType, RealtyGas, RealtyHouseType, RealtyLandShape, RealtyLandUsageType, RealtyRelief, RealtyElectricity, RealtyFurniture, RealtySewerage, RealtyWindowView } from '../types';
|
|
2
|
+
export declare const RealtyDictionary: {
|
|
3
|
+
Type: {
|
|
4
|
+
flat: string;
|
|
5
|
+
house: string;
|
|
6
|
+
};
|
|
7
|
+
RenovationType: {
|
|
8
|
+
none: string;
|
|
9
|
+
author: string;
|
|
10
|
+
cosmetic: string;
|
|
11
|
+
euro: string;
|
|
12
|
+
fine_finishing: string;
|
|
13
|
+
rough_finishing: string;
|
|
14
|
+
};
|
|
15
|
+
Gas: {
|
|
16
|
+
none: string;
|
|
17
|
+
connected: string;
|
|
18
|
+
border: string;
|
|
19
|
+
possible: string;
|
|
20
|
+
autonomous: string;
|
|
21
|
+
};
|
|
22
|
+
HouseType: {
|
|
23
|
+
townhouse: string;
|
|
24
|
+
house: string;
|
|
25
|
+
cottage: string;
|
|
26
|
+
part: string;
|
|
27
|
+
duplex: string;
|
|
28
|
+
};
|
|
29
|
+
LandShape: {
|
|
30
|
+
regular: string;
|
|
31
|
+
irregular: string;
|
|
32
|
+
};
|
|
33
|
+
LandUsageType: {
|
|
34
|
+
igs: string;
|
|
35
|
+
lph: string;
|
|
36
|
+
dnp: string;
|
|
37
|
+
snt: string;
|
|
38
|
+
farm: string;
|
|
39
|
+
garden: string;
|
|
40
|
+
investproject: string;
|
|
41
|
+
};
|
|
42
|
+
Relief: {
|
|
43
|
+
flat: string;
|
|
44
|
+
elevations: string;
|
|
45
|
+
slope: string;
|
|
46
|
+
hills: string;
|
|
47
|
+
};
|
|
48
|
+
Electricity: {
|
|
49
|
+
none: string;
|
|
50
|
+
connected: string;
|
|
51
|
+
possible: string;
|
|
52
|
+
autonomous: string;
|
|
53
|
+
};
|
|
54
|
+
Furniture: {
|
|
55
|
+
none: string;
|
|
56
|
+
full: string;
|
|
57
|
+
part: string;
|
|
58
|
+
};
|
|
59
|
+
Sewerage: {
|
|
60
|
+
none: string;
|
|
61
|
+
cesspool: string;
|
|
62
|
+
septic: string;
|
|
63
|
+
bio: string;
|
|
64
|
+
central: string;
|
|
65
|
+
};
|
|
66
|
+
WindowView: {
|
|
67
|
+
street: string;
|
|
68
|
+
yard: string;
|
|
69
|
+
both: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
@@ -3,5 +3,8 @@ export declare class Api {
|
|
|
3
3
|
private baseURL;
|
|
4
4
|
constructor(baseURL: string | undefined);
|
|
5
5
|
findComplexIds: (params: api.FindComplexIdsParams) => Promise<api.FindComplexIdsData>;
|
|
6
|
+
findRealties: (params: api.FindRealtiesParams) => Promise<api.FindRealtiesData>;
|
|
6
7
|
}
|
|
7
8
|
export * from './api';
|
|
9
|
+
export * from './dictionaries';
|
|
10
|
+
export * from './types';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AddressBTIParams } from './AddressBTIParams';
|
|
2
|
+
import { AddressMetroDistance } from './AddressMetroDistance';
|
|
3
|
+
import { Shape } from './Shape';
|
|
4
|
+
export declare type Address = {
|
|
5
|
+
btiParams: Partial<AddressBTIParams>;
|
|
6
|
+
country: string;
|
|
7
|
+
fullAddress: string;
|
|
8
|
+
id: number;
|
|
9
|
+
isManual: boolean;
|
|
10
|
+
lat: number;
|
|
11
|
+
lng: number;
|
|
12
|
+
metroDistances: Array<Partial<AddressMetroDistance> & {
|
|
13
|
+
id: number;
|
|
14
|
+
}>;
|
|
15
|
+
shapes: Array<Partial<Shape> & {
|
|
16
|
+
id: number;
|
|
17
|
+
}>;
|
|
18
|
+
city?: string;
|
|
19
|
+
cityArea?: string;
|
|
20
|
+
district?: string;
|
|
21
|
+
draftName?: string;
|
|
22
|
+
fiasCode?: number;
|
|
23
|
+
house?: string;
|
|
24
|
+
kladrCode?: number;
|
|
25
|
+
medianPrice?: number;
|
|
26
|
+
medianSqmPrice?: number;
|
|
27
|
+
postalCode?: number;
|
|
28
|
+
realtyIds?: number[];
|
|
29
|
+
region?: string;
|
|
30
|
+
street?: string;
|
|
31
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare enum AddressBTIParamsParking {
|
|
2
|
+
Ground = "ground",
|
|
3
|
+
Multilevel = "multilevel",
|
|
4
|
+
Underground = "underground"
|
|
5
|
+
}
|
|
6
|
+
export declare enum AddressBTIParamsWallsMaterial {
|
|
7
|
+
Brick = "brick",
|
|
8
|
+
Monolith = "monolith",
|
|
9
|
+
Monobrick = "monobrick",
|
|
10
|
+
Timber = "timber",
|
|
11
|
+
Panel = "panel",
|
|
12
|
+
Block = "block"
|
|
13
|
+
}
|
|
14
|
+
export declare enum AddressBTIParamsHeatingType {
|
|
15
|
+
None = "none",
|
|
16
|
+
Central = "central",
|
|
17
|
+
Local = "local",
|
|
18
|
+
Gas = "gas",
|
|
19
|
+
Electricity = "electricity",
|
|
20
|
+
Liquid = "liquid"
|
|
21
|
+
}
|
|
22
|
+
export declare type AddressBTIParams = {
|
|
23
|
+
buildYear?: number;
|
|
24
|
+
cargoLifts?: number;
|
|
25
|
+
ceilingHeight?: number;
|
|
26
|
+
deliveryQuarter?: number;
|
|
27
|
+
deliveryYear?: number;
|
|
28
|
+
emergency?: boolean;
|
|
29
|
+
floors?: number;
|
|
30
|
+
garbageChute?: boolean;
|
|
31
|
+
heatingType?: AddressBTIParamsHeatingType;
|
|
32
|
+
id?: number;
|
|
33
|
+
isDelivered?: boolean;
|
|
34
|
+
isUpToDate?: boolean;
|
|
35
|
+
parking?: AddressBTIParamsParking;
|
|
36
|
+
passengerLifts?: number;
|
|
37
|
+
series?: string;
|
|
38
|
+
wallsMaterial?: AddressBTIParamsWallsMaterial;
|
|
39
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum ImageType {
|
|
2
|
+
Complex = "complex",
|
|
3
|
+
Apartment = "apartment",
|
|
4
|
+
Layout = "layout"
|
|
5
|
+
}
|
|
6
|
+
export declare type Image = {
|
|
7
|
+
id: number;
|
|
8
|
+
properties: {
|
|
9
|
+
oldId?: number;
|
|
10
|
+
maxSize?: string;
|
|
11
|
+
};
|
|
12
|
+
storagePath: string;
|
|
13
|
+
thumbnailPath: string;
|
|
14
|
+
type: string | ImageType;
|
|
15
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { Address } from './Address';
|
|
2
|
+
import { Image } from './Image';
|
|
3
|
+
import { RealtyOffer } from './RealtyOffer';
|
|
4
|
+
export declare enum RealtyType {
|
|
5
|
+
Flat = "flat",
|
|
6
|
+
House = "house"
|
|
7
|
+
}
|
|
8
|
+
export declare enum RealtyRenovationType {
|
|
9
|
+
None = "none",
|
|
10
|
+
Author = "author",
|
|
11
|
+
Cosmetic = "cosmetic",
|
|
12
|
+
Euro = "euro",
|
|
13
|
+
FineFinishing = "fine_finishing",
|
|
14
|
+
RoughFinishing = "rough_finishing"
|
|
15
|
+
}
|
|
16
|
+
export declare enum RealtyGas {
|
|
17
|
+
None = "none",
|
|
18
|
+
Connected = "connected",
|
|
19
|
+
Border = "border",
|
|
20
|
+
Possible = "possible",
|
|
21
|
+
Autonomous = "autonomous"
|
|
22
|
+
}
|
|
23
|
+
export declare enum RealtyHouseType {
|
|
24
|
+
Townhouse = "townhouse",
|
|
25
|
+
House = "house",
|
|
26
|
+
Cottage = "cottage",
|
|
27
|
+
Part = "part",
|
|
28
|
+
Duplex = "duplex"
|
|
29
|
+
}
|
|
30
|
+
export declare enum RealtyLandShape {
|
|
31
|
+
Regular = "regular",
|
|
32
|
+
Irregular = "irregular"
|
|
33
|
+
}
|
|
34
|
+
export declare enum RealtyLandUsageType {
|
|
35
|
+
IGS = "igs",
|
|
36
|
+
LPH = "lph",
|
|
37
|
+
DNP = "dnp",
|
|
38
|
+
SNT = "snt",
|
|
39
|
+
Farm = "farm",
|
|
40
|
+
Garden = "garden",
|
|
41
|
+
Investproject = "investproject"
|
|
42
|
+
}
|
|
43
|
+
export declare enum RealtyRelief {
|
|
44
|
+
Flat = "flat",
|
|
45
|
+
Elevations = "elevations",
|
|
46
|
+
Slope = "slope",
|
|
47
|
+
Hills = "hills"
|
|
48
|
+
}
|
|
49
|
+
export declare enum RealtyElectricity {
|
|
50
|
+
None = "none",
|
|
51
|
+
Connected = "connected",
|
|
52
|
+
Possible = "possible",
|
|
53
|
+
Autonomous = "autonomous"
|
|
54
|
+
}
|
|
55
|
+
export declare enum RealtyFurniture {
|
|
56
|
+
None = "none",
|
|
57
|
+
Full = "full",
|
|
58
|
+
Part = "part"
|
|
59
|
+
}
|
|
60
|
+
export declare enum RealtySewerage {
|
|
61
|
+
None = "none",
|
|
62
|
+
Cesspool = "cesspool",
|
|
63
|
+
Septic = "septic",
|
|
64
|
+
Bio = "bio",
|
|
65
|
+
Central = "central"
|
|
66
|
+
}
|
|
67
|
+
export declare enum RealtyWindowView {
|
|
68
|
+
Street = "street",
|
|
69
|
+
Yard = "yard",
|
|
70
|
+
Both = "both"
|
|
71
|
+
}
|
|
72
|
+
export declare type Realty = {
|
|
73
|
+
address: Partial<Address> & {
|
|
74
|
+
id: number;
|
|
75
|
+
};
|
|
76
|
+
addressId: number;
|
|
77
|
+
area: number;
|
|
78
|
+
createdAt: string;
|
|
79
|
+
floor: number;
|
|
80
|
+
id: number;
|
|
81
|
+
images: Array<Partial<Image> & {
|
|
82
|
+
id: number;
|
|
83
|
+
}>;
|
|
84
|
+
price: number;
|
|
85
|
+
realtyType: RealtyType;
|
|
86
|
+
renovationType: RealtyRenovationType;
|
|
87
|
+
roomsNumber: number;
|
|
88
|
+
balconyCount?: number;
|
|
89
|
+
burden?: boolean;
|
|
90
|
+
ceilingHeight?: number;
|
|
91
|
+
chambers?: string;
|
|
92
|
+
cityDistance?: number;
|
|
93
|
+
communityName?: string;
|
|
94
|
+
documentationUrl?: number;
|
|
95
|
+
electricity?: RealtyElectricity;
|
|
96
|
+
features?: string[];
|
|
97
|
+
floorsNumber?: number;
|
|
98
|
+
furniture?: RealtyFurniture;
|
|
99
|
+
gas?: RealtyGas;
|
|
100
|
+
houseType?: RealtyHouseType;
|
|
101
|
+
isDevelopersOffer?: boolean;
|
|
102
|
+
kitchenArea?: number;
|
|
103
|
+
landArea?: number;
|
|
104
|
+
landShape?: RealtyLandShape;
|
|
105
|
+
landUsageType?: RealtyLandUsageType;
|
|
106
|
+
livingArea?: number;
|
|
107
|
+
mainOffer?: Partial<RealtyOffer> & {
|
|
108
|
+
id: number;
|
|
109
|
+
};
|
|
110
|
+
number?: number;
|
|
111
|
+
relief?: RealtyRelief;
|
|
112
|
+
separatedRoomsNumber?: number;
|
|
113
|
+
sewerage?: RealtySewerage;
|
|
114
|
+
soldAt?: string;
|
|
115
|
+
windowView?: RealtyWindowView;
|
|
116
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare type Coordinates = number[];
|
|
2
|
+
declare type Polygon = {
|
|
3
|
+
type: 'Polygon';
|
|
4
|
+
coordinates: Array<Coordinates>;
|
|
5
|
+
};
|
|
6
|
+
declare type MultiPolygon = {
|
|
7
|
+
type: 'MultiPolygon';
|
|
8
|
+
coordinates: Array<Array<Coordinates>>;
|
|
9
|
+
};
|
|
10
|
+
export declare enum ShapeType {
|
|
11
|
+
AdministrativeDistrict = "administrative_district",
|
|
12
|
+
Block = "block",
|
|
13
|
+
Complex = "complex",
|
|
14
|
+
District = "district",
|
|
15
|
+
House = "house",
|
|
16
|
+
Microdistrict = "microdistrict"
|
|
17
|
+
}
|
|
18
|
+
export declare type Shape = {
|
|
19
|
+
geometry: Polygon | MultiPolygon;
|
|
20
|
+
id: number;
|
|
21
|
+
name: string;
|
|
22
|
+
type: ShapeType;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.1.
|
|
2
|
+
"version": "0.1.121",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"axios": "^0.21.1",
|
|
69
69
|
"lodash": "^4.17.21",
|
|
70
70
|
"lodash-es": "^4.17.21",
|
|
71
|
+
"nanoid": "^3.2.0",
|
|
71
72
|
"qs": "^6.10.1"
|
|
72
73
|
}
|
|
73
74
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
|
+
import qs from 'qs';
|
|
3
|
+
|
|
4
|
+
type SuccessData = { success: true; data: number };
|
|
5
|
+
type ErrorData = { success: false; data: { error: string } };
|
|
6
|
+
|
|
7
|
+
type ResultData = number;
|
|
8
|
+
type ResultError = string;
|
|
9
|
+
|
|
10
|
+
export type CountBuyersHeaders = { 'x-auth-hc': string };
|
|
11
|
+
export type CountBuyersParams = {
|
|
12
|
+
filter?: {
|
|
13
|
+
'serviceRequest.id'?: number;
|
|
14
|
+
everHadStatus?: 'show_complete';
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type CountBuyersData = AxiosResponse<ResultData>;
|
|
18
|
+
export type CountBuyersError = AxiosError<ResultError>;
|
|
19
|
+
export type CountBuyersConfig = {
|
|
20
|
+
baseURL?: string;
|
|
21
|
+
headers: CountBuyersHeaders;
|
|
22
|
+
params: CountBuyersParams;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export function countBuyersRequest({ baseURL = 'https://clients.homeapp.ru', headers, params }: CountBuyersConfig) {
|
|
26
|
+
return axios
|
|
27
|
+
.get('/api/buyer/count', {
|
|
28
|
+
baseURL,
|
|
29
|
+
params,
|
|
30
|
+
paramsSerializer: params => qs.stringify(params, { arrayFormat: 'brackets' }),
|
|
31
|
+
headers: { Accept: 'application/json', ...headers },
|
|
32
|
+
transformResponse: [
|
|
33
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
34
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => {
|
|
35
|
+
if (data.success) {
|
|
36
|
+
return data.data;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return data.data.error;
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
})
|
|
43
|
+
.then((res: CountBuyersData) => res)
|
|
44
|
+
.catch((err: CountBuyersError) => {
|
|
45
|
+
throw err;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
@@ -7,6 +7,8 @@ export * from './availableFunds/findAvailableFunds';
|
|
|
7
7
|
export * from './availableFunds/updateAvailableFunds';
|
|
8
8
|
export * from './availableFunds/deleteAvailableFunds';
|
|
9
9
|
|
|
10
|
+
export * from './buyer/countBuyers';
|
|
11
|
+
|
|
10
12
|
export * from './call/findCalls';
|
|
11
13
|
export * from './call/findFirstSuccessOutgoingCalls';
|
|
12
14
|
export * from './call/markupCall';
|
|
@@ -51,7 +53,7 @@ export * from './serviceRequest/findServiceRequestActivities';
|
|
|
51
53
|
export * from './serviceRequest/findServiceRequestById';
|
|
52
54
|
export * from './serviceRequest/findServiceRequestDuplicates';
|
|
53
55
|
export * from './serviceRequest/findServiceRequests';
|
|
54
|
-
export * from './serviceRequest/
|
|
56
|
+
export * from './serviceRequest/findServiceRequestSellerReports';
|
|
55
57
|
export * from './serviceRequest/findServiceRequestShortInfo';
|
|
56
58
|
export * from './serviceRequest/findServiceRequestShortInfoById';
|
|
57
59
|
export * from './serviceRequest/findServiceRequestShortInfoByDealId';
|