@hapl/api-queries 0.1.87 → 0.1.90
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 +134 -6
- 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 +134 -6
- package/dist/api-queries.esm.js.map +1 -1
- package/dist/clients/v1/api/callCenter/finishOperatorWork/index.d.ts +20 -0
- package/dist/clients/v1/api/callCenter/getOperatorStatus/index.d.ts +26 -0
- package/dist/clients/v1/api/callCenter/startOperatorWork/index.d.ts +32 -0
- package/dist/clients/v1/api/deal/deleteDealCategorizedFile/index.d.ts +1 -5
- package/dist/clients/v1/api/index.d.ts +4 -0
- package/dist/clients/v1/api/serviceRequest/deleteServiceRequestCategorizedFile/index.d.ts +1 -5
- package/dist/clients/v1/api/serviceRequest/deleteServiceRequestReportForSeller/index.d.ts +25 -0
- package/dist/clients/v1/index.d.ts +42 -38
- package/dist/clients/v2/index.d.ts +17 -17
- package/dist/publisher/v1/index.d.ts +9 -9
- package/dist/registry/v1/index.d.ts +2 -2
- package/dist/search/v1/index.d.ts +7 -7
- package/package.json +1 -1
- package/src/clients/v1/api/callCenter/finishOperatorWork/index.ts +39 -0
- package/src/clients/v1/api/callCenter/getOperatorStatus/index.ts +32 -0
- package/src/clients/v1/api/callCenter/startOperatorWork/index.ts +40 -0
- package/src/clients/v1/api/deal/createDealCategorizedFile/index.ts +1 -1
- package/src/clients/v1/api/deal/deleteDealCategorizedFile/index.ts +3 -3
- package/src/clients/v1/api/deal/findDealCategorizedFiles/index.ts +1 -1
- package/src/clients/v1/api/index.ts +5 -0
- package/src/clients/v1/api/serviceRequest/createServiceRequestCategorizedFile/index.ts +1 -1
- package/src/clients/v1/api/serviceRequest/deleteServiceRequestCategorizedFile/index.ts +3 -3
- package/src/clients/v1/api/serviceRequest/deleteServiceRequestReportForSeller/index.ts +37 -0
- package/src/clients/v1/api/serviceRequest/findServiceRequestCategorizedFiles/index.ts +1 -1
- package/src/clients/v1/index.ts +122 -222
- package/src/clients/v2/index.ts +49 -97
- package/src/publisher/v1/index.ts +17 -41
- package/src/registry/v1/index.ts +3 -3
- package/src/search/v1/index.ts +11 -22
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AxiosResponse, AxiosError } from 'axios';
|
|
2
|
+
declare type ErrorData = {
|
|
3
|
+
success: false;
|
|
4
|
+
data: {
|
|
5
|
+
error: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
declare type ResultData = null;
|
|
9
|
+
declare type ResultError = ErrorData['data']['error'];
|
|
10
|
+
export declare type FinishOperatorWorkHeaders = {
|
|
11
|
+
'x-auth-hc': string;
|
|
12
|
+
};
|
|
13
|
+
export declare type FinishOperatorWorkData = AxiosResponse<ResultData>;
|
|
14
|
+
export declare type FinishOperatorWorkError = AxiosError<ResultError>;
|
|
15
|
+
export declare type FinishOperatorWorkConfig = {
|
|
16
|
+
baseURL?: string;
|
|
17
|
+
headers: FinishOperatorWorkHeaders;
|
|
18
|
+
};
|
|
19
|
+
export declare function finishOperatorWorkRequest({ baseURL, headers, }: FinishOperatorWorkConfig): Promise<FinishOperatorWorkData>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AxiosResponse, AxiosError } from 'axios';
|
|
2
|
+
declare type SuccessData = {
|
|
3
|
+
success: true;
|
|
4
|
+
data: {
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
declare type ErrorData = {
|
|
9
|
+
success: false;
|
|
10
|
+
data: {
|
|
11
|
+
error: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
declare type ResultData = SuccessData['data'];
|
|
15
|
+
declare type ResultError = ErrorData['data']['error'];
|
|
16
|
+
export declare type GetOperatorStatusHeaders = {
|
|
17
|
+
'x-auth-hc': string;
|
|
18
|
+
};
|
|
19
|
+
export declare type GetOperatorStatusData = AxiosResponse<ResultData>;
|
|
20
|
+
export declare type GetOperatorStatusError = AxiosError<ResultError>;
|
|
21
|
+
export declare type GetOperatorStatusConfig = {
|
|
22
|
+
baseURL?: string;
|
|
23
|
+
headers: GetOperatorStatusHeaders;
|
|
24
|
+
};
|
|
25
|
+
export declare function getOperatorStatusRequest({ baseURL, headers }: GetOperatorStatusConfig): Promise<GetOperatorStatusData>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AxiosResponse, AxiosError } from 'axios';
|
|
2
|
+
import { User } from '../../../types';
|
|
3
|
+
declare type SuccessData = {
|
|
4
|
+
success: true;
|
|
5
|
+
data: {
|
|
6
|
+
finishedAt: string;
|
|
7
|
+
id: number;
|
|
8
|
+
startedAt: string;
|
|
9
|
+
user: Partial<User> & {
|
|
10
|
+
id: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
declare type ErrorData = {
|
|
15
|
+
success: false;
|
|
16
|
+
data: {
|
|
17
|
+
error: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
declare type ResultData = SuccessData['data'];
|
|
21
|
+
declare type ResultError = ErrorData['data']['error'];
|
|
22
|
+
export declare type StartOperatorWorkHeaders = {
|
|
23
|
+
'x-auth-hc': string;
|
|
24
|
+
};
|
|
25
|
+
export declare type StartOperatorWorkData = AxiosResponse<ResultData>;
|
|
26
|
+
export declare type StartOperatorWorkError = AxiosError<ResultError>;
|
|
27
|
+
export declare type StartOperatorWorkConfig = {
|
|
28
|
+
baseURL?: string;
|
|
29
|
+
headers: StartOperatorWorkHeaders;
|
|
30
|
+
};
|
|
31
|
+
export declare function startOperatorWorkRequest({ baseURL, headers }: StartOperatorWorkConfig): Promise<StartOperatorWorkData>;
|
|
32
|
+
export {};
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { AxiosResponse, AxiosError } from 'axios';
|
|
2
|
-
declare type SuccessData = {
|
|
3
|
-
success: true;
|
|
4
|
-
data?: string;
|
|
5
|
-
};
|
|
6
2
|
declare type ErrorData = {
|
|
7
3
|
success: false;
|
|
8
4
|
data: {
|
|
9
5
|
error: string;
|
|
10
6
|
};
|
|
11
7
|
};
|
|
12
|
-
declare type ResultData =
|
|
8
|
+
declare type ResultData = null;
|
|
13
9
|
declare type ResultError = ErrorData['data']['error'];
|
|
14
10
|
export declare type DeleteDealCategorizedFileHeaders = {
|
|
15
11
|
'x-auth-hc': string;
|
|
@@ -7,6 +7,9 @@ export * from './availableFunds/updateAvailableFunds';
|
|
|
7
7
|
export * from './availableFunds/deleteAvailableFunds';
|
|
8
8
|
export * from './call/findCalls';
|
|
9
9
|
export * from './call/findFirstSuccessOutgoingCalls';
|
|
10
|
+
export * from './callCenter/finishOperatorWork';
|
|
11
|
+
export * from './callCenter/getOperatorStatus';
|
|
12
|
+
export * from './callCenter/startOperatorWork';
|
|
10
13
|
export * from './deal/createDealCategorizedFile';
|
|
11
14
|
export * from './deal/deleteDealCategorizedFile';
|
|
12
15
|
export * from './deal/findDealCategorizedFiles';
|
|
@@ -21,6 +24,7 @@ export * from './serviceRequest/completeServiceRequestModeration';
|
|
|
21
24
|
export * from './serviceRequest/createServiceRequest';
|
|
22
25
|
export * from './serviceRequest/createServiceRequestCategorizedFile';
|
|
23
26
|
export * from './serviceRequest/deleteServiceRequestCategorizedFile';
|
|
27
|
+
export * from './serviceRequest/deleteServiceRequestReportForSeller';
|
|
24
28
|
export * from './serviceRequest/extendServiceRequestByRealty';
|
|
25
29
|
export * from './serviceRequest/findServiceRequestById';
|
|
26
30
|
export * from './serviceRequest/findServiceRequestDuplicates';
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { AxiosResponse, AxiosError } from 'axios';
|
|
2
|
-
declare type SuccessData = {
|
|
3
|
-
success: true;
|
|
4
|
-
data?: string;
|
|
5
|
-
};
|
|
6
2
|
declare type ErrorData = {
|
|
7
3
|
success: false;
|
|
8
4
|
data: {
|
|
9
5
|
error: string;
|
|
10
6
|
};
|
|
11
7
|
};
|
|
12
|
-
declare type ResultData =
|
|
8
|
+
declare type ResultData = null;
|
|
13
9
|
declare type ResultError = ErrorData['data']['error'];
|
|
14
10
|
export declare type DeleteServiceRequestCategorizedFileHeaders = {
|
|
15
11
|
'x-auth-hc': string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AxiosResponse, AxiosError } from 'axios';
|
|
2
|
+
declare type ErrorData = {
|
|
3
|
+
success: false;
|
|
4
|
+
data: {
|
|
5
|
+
error: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
declare type ResultData = null;
|
|
9
|
+
declare type ResultError = ErrorData['data']['error'];
|
|
10
|
+
export declare type DeleteServiceRequestReportForSellerHeaders = {
|
|
11
|
+
'x-auth-hc': string;
|
|
12
|
+
};
|
|
13
|
+
export declare type DeleteServiceRequestReportForSellerUrlParams = {
|
|
14
|
+
serviceRequestId: number;
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
export declare type DeleteServiceRequestReportForSellerData = AxiosResponse<ResultData>;
|
|
18
|
+
export declare type DeleteServiceRequestReportForSellerError = AxiosError<ResultError>;
|
|
19
|
+
export declare type DeleteServiceRequestReportForSellerConfig = {
|
|
20
|
+
baseURL?: string;
|
|
21
|
+
urlParams: DeleteServiceRequestReportForSellerUrlParams;
|
|
22
|
+
headers: DeleteServiceRequestReportForSellerHeaders;
|
|
23
|
+
};
|
|
24
|
+
export declare function deleteServiceRequestReportForSellerRequest({ baseURL, urlParams, headers, }: DeleteServiceRequestReportForSellerConfig): Promise<DeleteServiceRequestReportForSellerData>;
|
|
25
|
+
export {};
|
|
@@ -1,44 +1,48 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as api from './api';
|
|
2
2
|
export declare class Api {
|
|
3
3
|
private baseURL;
|
|
4
4
|
constructor(baseURL: string | undefined);
|
|
5
|
-
getPassword: (params: GetPasswordParams) => Promise<
|
|
6
|
-
checkPassword: (body: CheckPasswordBody) => Promise<
|
|
7
|
-
checkToken: (headers: CheckTokenHeaders) => Promise<
|
|
8
|
-
createAvailableFunds: (body: CreateAvailableFundsBody, headers: CreateAvailableFundsHeaders) => Promise<
|
|
9
|
-
findAvailableFunds: (params: FindAvailableFundsParams, headers: FindAvailableFundsHeaders) => Promise<
|
|
10
|
-
updateAvailableFunds: (urlParams: UpdateAvailableFundsUrlParams, body: UpdateAvailableFundsBody, headers: UpdateAvailableFundsHeaders) => Promise<
|
|
11
|
-
deleteAvailableFunds: (urlParams: DeleteAvailableFundsUrlParams, headers: DeleteAvailableFundsHeaders) => Promise<
|
|
12
|
-
findCalls: (params: FindCallsParams, headers: FindCallsHeaders) => Promise<
|
|
13
|
-
findFirstSuccessOutgoingCalls: (params: FindFirstSuccessOutgoingCallsParams, headers: FindFirstSuccessOutgoingCallsHeaders) => Promise<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
5
|
+
getPassword: (params: api.GetPasswordParams) => Promise<api.GetPasswordData>;
|
|
6
|
+
checkPassword: (body: api.CheckPasswordBody) => Promise<api.CheckPasswordData>;
|
|
7
|
+
checkToken: (headers: api.CheckTokenHeaders) => Promise<api.CheckTokenData>;
|
|
8
|
+
createAvailableFunds: (body: api.CreateAvailableFundsBody, headers: api.CreateAvailableFundsHeaders) => Promise<api.CreateAvailableFundsData>;
|
|
9
|
+
findAvailableFunds: (params: api.FindAvailableFundsParams, headers: api.FindAvailableFundsHeaders) => Promise<api.FindAvailableFundsData>;
|
|
10
|
+
updateAvailableFunds: (urlParams: api.UpdateAvailableFundsUrlParams, body: api.UpdateAvailableFundsBody, headers: api.UpdateAvailableFundsHeaders) => Promise<api.UpdateAvailableFundsData>;
|
|
11
|
+
deleteAvailableFunds: (urlParams: api.DeleteAvailableFundsUrlParams, headers: api.DeleteAvailableFundsHeaders) => Promise<api.DeleteAvailableFundsData>;
|
|
12
|
+
findCalls: (params: api.FindCallsParams, headers: api.FindCallsHeaders) => Promise<api.FindCallsData>;
|
|
13
|
+
findFirstSuccessOutgoingCalls: (params: api.FindFirstSuccessOutgoingCallsParams, headers: api.FindFirstSuccessOutgoingCallsHeaders) => Promise<api.FindFirstSuccessOutgoingCallsData>;
|
|
14
|
+
finishOperatorWork: (headers: api.FinishOperatorWorkHeaders) => Promise<api.FinishOperatorWorkData>;
|
|
15
|
+
startOperatorWork: (headers: api.StartOperatorWorkHeaders) => Promise<api.StartOperatorWorkData>;
|
|
16
|
+
getOperatorStatus: (headers: api.GetOperatorStatusHeaders) => Promise<api.GetOperatorStatusData>;
|
|
17
|
+
createDealCategorizedFile: (urlParams: api.CreateDealCategorizedFileUrlParams, body: api.CreateDealCategorizedFileBody, headers: api.CreateDealCategorizedFileHeaders) => Promise<api.CreateDealCategorizedFileData>;
|
|
18
|
+
findDealCategorizedFiles: (urlParams: api.FindDealCategorizedFilesUrlParams, params: api.FindDealCategorizedFilesParams, headers: api.FindDealCategorizedFilesHeaders) => Promise<api.FindDealCategorizedFilesData>;
|
|
19
|
+
deleteDealCategorizedFile: (urlParams: api.DeleteDealCategorizedFileUrlParams, headers: api.DeleteDealCategorizedFileHeaders) => Promise<api.DeleteDealCategorizedFileData>;
|
|
20
|
+
findExperts: (params: api.FindExpertsParams) => Promise<api.FindExpertsData>;
|
|
21
|
+
findPublishedExperts: (params: api.FindPublishedExpertsParams) => Promise<api.FindPublishedExpertsData>;
|
|
22
|
+
findExpertById: (urlParams: api.FindExpertByIdUrlParams, headers: api.FindExpertByIdHeaders) => Promise<api.FindExpertByIdData>;
|
|
23
|
+
createExpertCase: (body: api.CreateExpertCaseBody, headers: api.CreateExpertCaseHeaders) => Promise<api.CreateExpertCaseData>;
|
|
24
|
+
findExpertCases: (headers?: api.FindExpertCasesHeaders | undefined) => Promise<api.FindExpertCasesData>;
|
|
25
|
+
findExpertCaseById: (urlParams: api.FindExpertCaseByIdUrlParams, headers?: api.FindExpertCaseByIdHeaders | undefined) => Promise<api.FindExpertCaseByIdData>;
|
|
26
|
+
updateExpertCase: (urlParams: api.UpdateExpertCaseUrlParams, body: api.UpdateExpertCaseBody, headers: api.UpdateExpertCaseHeaders) => Promise<api.UpdateExpertCaseData>;
|
|
27
|
+
completeServiceRequestModeration: (urlParams: api.CompleteServiceRequestModerationUrlParams, headers: api.CompleteServiceRequestModerationHeaders) => Promise<api.CompleteServiceRequestModerationData>;
|
|
28
|
+
createServiceRequest: (body: api.CreateServiceRequestBody, headers: api.CreateServiceRequestHeaders) => Promise<api.CreateServiceRequestData>;
|
|
29
|
+
createServiceRequestCategorizedFile: (urlParams: api.CreateServiceRequestCategorizedFileUrlParams, body: api.CreateServiceRequestCategorizedFileBody, headers: api.CreateServiceRequestCategorizedFileHeaders) => Promise<api.CreateServiceRequestCategorizedFileData>;
|
|
30
|
+
deleteServiceRequestCategorizedFile: (urlParams: api.DeleteServiceRequestCategorizedFileUrlParams, headers: api.DeleteServiceRequestCategorizedFileHeaders) => Promise<api.DeleteServiceRequestCategorizedFileData>;
|
|
31
|
+
deleteServiceRequestReportForSeller: (urlParams: api.DeleteServiceRequestReportForSellerUrlParams, headers: api.DeleteServiceRequestReportForSellerHeaders) => Promise<api.DeleteServiceRequestReportForSellerData>;
|
|
32
|
+
extendServiceRequestByRealty: (urlParams: api.ExtendServiceRequestByRealtyUrlParams, body: api.ExtendServiceRequestByRealtyBody, headers: api.ExtendServiceRequestByRealtyHeaders) => Promise<api.ExtendServiceRequestByRealtyData>;
|
|
33
|
+
findServiceRequestById: (urlParams: api.FindServiceRequestByIdUrlParams, headers: api.FindServiceRequestByIdHeaders) => Promise<api.FindServiceRequestByIdData>;
|
|
34
|
+
findServiceRequestDuplicates: (body: api.FindServiceRequestDuplicatesBody, headers: api.FindServiceRequestDuplicatesHeaders) => Promise<api.FindServiceRequestDuplicatesData>;
|
|
35
|
+
findServiceRequests: (params: api.FindServiceRequestsParams, headers: api.FindServiceRequestsHeaders) => Promise<api.FindServiceRequestsData>;
|
|
36
|
+
findServiceRequestCategorizedFiles: (urlParams: api.FindServiceRequestCategorizedFilesUrlParams, params: api.FindServiceRequestCategorizedFilesParams, headers: api.FindServiceRequestCategorizedFilesHeaders) => Promise<api.FindServiceRequestCategorizedFilesData>;
|
|
37
|
+
sendServiceRequestToModeration: (urlParams: api.SendServiceRequestToModerationUrlParams, headers: api.SendServiceRequestToModerationHeaders) => Promise<api.SendServiceRequestToModerationData>;
|
|
38
|
+
startServiceRequestModeration: (urlParams: api.StartServiceRequestModerationUrlParams, headers: api.StartServiceRequestModerationHeaders) => Promise<api.StartServiceRequestModerationData>;
|
|
39
|
+
startServiceRequestModerationForOldRealty: (urlParams: api.StartServiceRequestModerationForOldRealtyUrlParams, headers: api.StartServiceRequestModerationForOldRealtyHeaders) => Promise<api.StartServiceRequestModerationForOldRealtyData>;
|
|
40
|
+
createUser: (body: api.CreateUserBody, headers: api.CreateUserHeaders) => Promise<api.CreateUserData>;
|
|
41
|
+
findUsers: (params: api.FindUsersParams, headers: api.FindUsersHeaders) => Promise<api.FindUsersData>;
|
|
42
|
+
findUserById: (urlParams: api.FindUserByIdUrlParams, headers: api.FindUserByIdHeaders) => Promise<api.FindUserByIdData>;
|
|
43
|
+
updateUser: (urlParams: api.UpdateUserUrlParams, body: api.UpdateUserBody, headers: api.UpdateUserHeaders) => Promise<api.UpdateUserData>;
|
|
44
|
+
fireUser: (urlParams: api.FireUserUrlParams, body: api.FireUserBody, headers: api.FireUserHeaders) => Promise<api.FireUserData>;
|
|
45
|
+
assignSubordinateUsers: (urlParams: api.AssignSubordinateUsersUrlParams, body: api.AssignSubordinateUsersBody, headers: api.AssignSubordinateUsersHeaders) => Promise<api.AssignSubordinateUsersData>;
|
|
42
46
|
}
|
|
43
47
|
export * from './api';
|
|
44
48
|
export * from './dictionaries';
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as api from './api';
|
|
2
2
|
export declare class Api {
|
|
3
3
|
private baseURL;
|
|
4
4
|
constructor(baseURL: string | undefined);
|
|
5
|
-
createAddress: (body: CreateAddressBody, headers: CreateAddressHeaders) => Promise<
|
|
6
|
-
createAddressBti: (body: CreateAddressBtiBody, headers: CreateAddressBtiHeaders) => Promise<
|
|
7
|
-
findAddressBtiById: (urlParams: FindAddressBtiByIdUrlParams) => Promise<
|
|
8
|
-
updateAddressBti: (urlParams: UpdateAddressBtiUrlParams, body: UpdateAddressBtiBody, headers: UpdateAddressBtiHeaders) => Promise<
|
|
9
|
-
findHighways: () => Promise<
|
|
10
|
-
findMetroStations: () => Promise<
|
|
11
|
-
createRealty: (body: CreateRealtyBody, headers: CreateRealtyHeaders) => Promise<
|
|
12
|
-
createRealtyHouseHighwayDistance: (body: CreateRealtyHouseHighwayDistanceBody, headers: CreateRealtyHouseHighwayDistanceHeaders) => Promise<
|
|
13
|
-
createRealtyImage: (body: CreateRealtyImageBody, headers: CreateRealtyImageHeaders) => Promise<
|
|
14
|
-
createRealtyMetroDistance: (body: CreateRealtyMetroDistanceBody, headers: CreateRealtyMetroDistanceHeaders) => Promise<
|
|
15
|
-
deleteRealtyImage: (urlParams: DeleteRealtyImageUrlParams, headers: DeleteRealtyImageHeaders) => Promise<
|
|
16
|
-
findRealtyById: (urlParams: FindRealtyByIdUrlParams, params: FindRealtyByIdParams, headers?: FindRealtyByIdHeaders | undefined) => Promise<
|
|
17
|
-
updateRealty: (urlParams: UpdateRealtyUrlParams, body: UpdateRealtyBody, headers: UpdateRealtyHeaders) => Promise<
|
|
18
|
-
updateRealtyHouseHighwayDistance: (urlParams: UpdateRealtyHouseHighwayDistanceUrlParams, body: UpdateRealtyHouseHighwayDistanceBody, headers: UpdateRealtyHouseHighwayDistanceHeaders) => Promise<
|
|
19
|
-
updateRealtyImage: (urlParams: UpdateRealtyImageUrlParams, body: UpdateRealtyImageBody, headers: UpdateRealtyImageHeaders) => Promise<
|
|
20
|
-
updateRealtyMetroDistance: (urlParams: UpdateRealtyMetroDistanceUrlParams, body: UpdateRealtyMetroDistanceBody, headers: UpdateRealtyMetroDistanceHeaders) => Promise<
|
|
5
|
+
createAddress: (body: api.CreateAddressBody, headers: api.CreateAddressHeaders) => Promise<api.CreateAddressData>;
|
|
6
|
+
createAddressBti: (body: api.CreateAddressBtiBody, headers: api.CreateAddressBtiHeaders) => Promise<api.CreateAddressBtiData>;
|
|
7
|
+
findAddressBtiById: (urlParams: api.FindAddressBtiByIdUrlParams) => Promise<api.FindAddressBtiByIdData>;
|
|
8
|
+
updateAddressBti: (urlParams: api.UpdateAddressBtiUrlParams, body: api.UpdateAddressBtiBody, headers: api.UpdateAddressBtiHeaders) => Promise<api.UpdateAddressBtiData>;
|
|
9
|
+
findHighways: () => Promise<api.FindHighwaysData>;
|
|
10
|
+
findMetroStations: () => Promise<api.FindMetroStationsData>;
|
|
11
|
+
createRealty: (body: api.CreateRealtyBody, headers: api.CreateRealtyHeaders) => Promise<api.CreateRealtyData>;
|
|
12
|
+
createRealtyHouseHighwayDistance: (body: api.CreateRealtyHouseHighwayDistanceBody, headers: api.CreateRealtyHouseHighwayDistanceHeaders) => Promise<api.CreateRealtyHouseHighwayDistanceData>;
|
|
13
|
+
createRealtyImage: (body: api.CreateRealtyImageBody, headers: api.CreateRealtyImageHeaders) => Promise<api.CreateRealtyImageData>;
|
|
14
|
+
createRealtyMetroDistance: (body: api.CreateRealtyMetroDistanceBody, headers: api.CreateRealtyMetroDistanceHeaders) => Promise<api.CreateRealtyMetroDistanceData>;
|
|
15
|
+
deleteRealtyImage: (urlParams: api.DeleteRealtyImageUrlParams, headers: api.DeleteRealtyImageHeaders) => Promise<api.DeleteRealtyImageData>;
|
|
16
|
+
findRealtyById: (urlParams: api.FindRealtyByIdUrlParams, params: api.FindRealtyByIdParams, headers?: api.FindRealtyByIdHeaders | undefined) => Promise<api.FindRealtyByIdData>;
|
|
17
|
+
updateRealty: (urlParams: api.UpdateRealtyUrlParams, body: api.UpdateRealtyBody, headers: api.UpdateRealtyHeaders) => Promise<api.UpdateRealtyData>;
|
|
18
|
+
updateRealtyHouseHighwayDistance: (urlParams: api.UpdateRealtyHouseHighwayDistanceUrlParams, body: api.UpdateRealtyHouseHighwayDistanceBody, headers: api.UpdateRealtyHouseHighwayDistanceHeaders) => Promise<api.UpdateRealtyHouseHighwayDistanceData>;
|
|
19
|
+
updateRealtyImage: (urlParams: api.UpdateRealtyImageUrlParams, body: api.UpdateRealtyImageBody, headers: api.UpdateRealtyImageHeaders) => Promise<api.UpdateRealtyImageData>;
|
|
20
|
+
updateRealtyMetroDistance: (urlParams: api.UpdateRealtyMetroDistanceUrlParams, body: api.UpdateRealtyMetroDistanceBody, headers: api.UpdateRealtyMetroDistanceHeaders) => Promise<api.UpdateRealtyMetroDistanceData>;
|
|
21
21
|
}
|
|
22
22
|
export * from './api';
|
|
23
23
|
export * from './dictionaries';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as api from './api';
|
|
2
2
|
export declare class Api {
|
|
3
3
|
private baseURL;
|
|
4
4
|
constructor(baseURL: string | undefined);
|
|
5
|
-
getFirstPublishedAt: (urlParams: GetFirstPublishedAtUrlParams, headers: GetFirstPublishedAtHeaders) => Promise<
|
|
6
|
-
getPublishedDays: (urlParams: GetPublishedDaysUrlParams, headers: GetPublishedDaysHeaders) => Promise<
|
|
7
|
-
findNewBuildings: (params: FindNewBuildingsParams, headers: FindNewBuildingsHeaders) => Promise<
|
|
8
|
-
getExternalLinks: (params: GetExternalLinksParams, headers: GetExternalLinksHeaders) => Promise<
|
|
9
|
-
findActualEventsRow: (params: FindActualEventsRowParams, headers: FindActualEventsRowHeaders) => Promise<
|
|
10
|
-
findPlannedEventsRow: (params: FindPlannedEventsRowParams, headers: FindPlannedEventsRowHeaders) => Promise<
|
|
11
|
-
getScoring: (params: FindScoringParams, headers: FindScoringHeaders) => Promise<
|
|
12
|
-
sendResume: (body: SendResumeBody) => Promise<
|
|
5
|
+
getFirstPublishedAt: (urlParams: api.GetFirstPublishedAtUrlParams, headers: api.GetFirstPublishedAtHeaders) => Promise<api.GetFirstPublishedAtData>;
|
|
6
|
+
getPublishedDays: (urlParams: api.GetPublishedDaysUrlParams, headers: api.GetPublishedDaysHeaders) => Promise<api.GetPublishedDaysData>;
|
|
7
|
+
findNewBuildings: (params: api.FindNewBuildingsParams, headers: api.FindNewBuildingsHeaders) => Promise<api.FindNewBuildingsData>;
|
|
8
|
+
getExternalLinks: (params: api.GetExternalLinksParams, headers: api.GetExternalLinksHeaders) => Promise<api.GetExternalLinksData>;
|
|
9
|
+
findActualEventsRow: (params: api.FindActualEventsRowParams, headers: api.FindActualEventsRowHeaders) => Promise<api.FindActualEventsRowData>;
|
|
10
|
+
findPlannedEventsRow: (params: api.FindPlannedEventsRowParams, headers: api.FindPlannedEventsRowHeaders) => Promise<api.FindPlannedEventsRowData>;
|
|
11
|
+
getScoring: (params: api.FindScoringParams, headers: api.FindScoringHeaders) => Promise<api.FindScoringData>;
|
|
12
|
+
sendResume: (body: api.SendResumeBody) => Promise<api.SendResumeData>;
|
|
13
13
|
}
|
|
14
14
|
export * from './api';
|
|
15
15
|
export * from './types';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as api from './api';
|
|
2
2
|
export declare class Api {
|
|
3
3
|
private baseURL;
|
|
4
4
|
constructor(baseURL: string | undefined);
|
|
5
|
-
findComplexIds: (params: FindComplexIdsParams) => Promise<
|
|
5
|
+
findComplexIds: (params: api.FindComplexIdsParams) => Promise<api.FindComplexIdsData>;
|
|
6
6
|
}
|
|
7
7
|
export * from './api';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as api from './api';
|
|
2
2
|
export declare class Api {
|
|
3
3
|
private baseURL;
|
|
4
4
|
constructor(baseURL: string | undefined);
|
|
5
|
-
findApartments: (params: FindApartmentsParams) => Promise<
|
|
6
|
-
countApartments: (params: CountApartmentsParams) => Promise<
|
|
7
|
-
findComplexes: (params: FindComplexesParams) => Promise<
|
|
8
|
-
findComplexById: (urlParams: FindComplexByIdUrlParams) => Promise<
|
|
9
|
-
findBuildingIds: () => Promise<
|
|
10
|
-
findBuildingOffers: () => Promise<
|
|
5
|
+
findApartments: (params: api.FindApartmentsParams) => Promise<api.FindApartmentsData>;
|
|
6
|
+
countApartments: (params: api.CountApartmentsParams) => Promise<api.CountApartmentsData>;
|
|
7
|
+
findComplexes: (params: api.FindComplexesParams) => Promise<api.FindComplexesData>;
|
|
8
|
+
findComplexById: (urlParams: api.FindComplexByIdUrlParams) => Promise<api.FindComplexByIdData>;
|
|
9
|
+
findBuildingIds: () => Promise<api.FindBuildingIdsData>;
|
|
10
|
+
findBuildingOffers: () => Promise<api.FindBuildingOffersData>;
|
|
11
11
|
}
|
|
12
12
|
export * from './api';
|
|
13
13
|
export * from './dictionaries';
|
package/package.json
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
|
+
|
|
3
|
+
type SuccessData = { success: true; data: Array<unknown> };
|
|
4
|
+
type ErrorData = { success: false; data: { error: string } };
|
|
5
|
+
|
|
6
|
+
type ResultData = null;
|
|
7
|
+
type ResultError = ErrorData['data']['error'];
|
|
8
|
+
|
|
9
|
+
export type FinishOperatorWorkHeaders = { 'x-auth-hc': string };
|
|
10
|
+
export type FinishOperatorWorkData = AxiosResponse<ResultData>;
|
|
11
|
+
export type FinishOperatorWorkError = AxiosError<ResultError>;
|
|
12
|
+
export type FinishOperatorWorkConfig = { baseURL?: string; headers: FinishOperatorWorkHeaders };
|
|
13
|
+
|
|
14
|
+
export function finishOperatorWorkRequest({
|
|
15
|
+
baseURL = 'https://clients.homeapp.ru',
|
|
16
|
+
headers,
|
|
17
|
+
}: FinishOperatorWorkConfig) {
|
|
18
|
+
return axios
|
|
19
|
+
.post(
|
|
20
|
+
'/api/call/operator/finish',
|
|
21
|
+
{},
|
|
22
|
+
{
|
|
23
|
+
baseURL,
|
|
24
|
+
headers: { Accept: 'application/json; version=1', ...headers },
|
|
25
|
+
transformResponse: [
|
|
26
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
27
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => {
|
|
28
|
+
if (data.success) return null;
|
|
29
|
+
|
|
30
|
+
return data.data.error;
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
.then((res: FinishOperatorWorkData) => res)
|
|
36
|
+
.catch((err: FinishOperatorWorkError) => {
|
|
37
|
+
throw err;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
|
+
|
|
3
|
+
type SuccessData = { success: true; data: { isActive: boolean } };
|
|
4
|
+
type ErrorData = { success: false; data: { error: string } };
|
|
5
|
+
|
|
6
|
+
type ResultData = SuccessData['data'];
|
|
7
|
+
type ResultError = ErrorData['data']['error'];
|
|
8
|
+
|
|
9
|
+
export type GetOperatorStatusHeaders = { 'x-auth-hc': string };
|
|
10
|
+
export type GetOperatorStatusData = AxiosResponse<ResultData>;
|
|
11
|
+
export type GetOperatorStatusError = AxiosError<ResultError>;
|
|
12
|
+
export type GetOperatorStatusConfig = { baseURL?: string; headers: GetOperatorStatusHeaders };
|
|
13
|
+
|
|
14
|
+
export function getOperatorStatusRequest({ baseURL = 'https://clients.homeapp.ru', headers }: GetOperatorStatusConfig) {
|
|
15
|
+
return axios
|
|
16
|
+
.get('/api/call/operator/status', {
|
|
17
|
+
baseURL,
|
|
18
|
+
headers: { Accept: 'application/json; version=1', ...headers },
|
|
19
|
+
transformResponse: [
|
|
20
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
21
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => {
|
|
22
|
+
if (data.success) return data.data;
|
|
23
|
+
|
|
24
|
+
return data.data.error;
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
})
|
|
28
|
+
.then((res: GetOperatorStatusData) => res)
|
|
29
|
+
.catch((err: GetOperatorStatusError) => {
|
|
30
|
+
throw err;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
|
+
import { User } from '../../../types';
|
|
3
|
+
|
|
4
|
+
type SuccessData = {
|
|
5
|
+
success: true;
|
|
6
|
+
data: { finishedAt: string; id: number; startedAt: string; user: Partial<User> & { id: number } };
|
|
7
|
+
};
|
|
8
|
+
type ErrorData = { success: false; data: { error: string } };
|
|
9
|
+
|
|
10
|
+
type ResultData = SuccessData['data'];
|
|
11
|
+
type ResultError = ErrorData['data']['error'];
|
|
12
|
+
|
|
13
|
+
export type StartOperatorWorkHeaders = { 'x-auth-hc': string };
|
|
14
|
+
export type StartOperatorWorkData = AxiosResponse<ResultData>;
|
|
15
|
+
export type StartOperatorWorkError = AxiosError<ResultError>;
|
|
16
|
+
export type StartOperatorWorkConfig = { baseURL?: string; headers: StartOperatorWorkHeaders };
|
|
17
|
+
|
|
18
|
+
export function startOperatorWorkRequest({ baseURL = 'https://clients.homeapp.ru', headers }: StartOperatorWorkConfig) {
|
|
19
|
+
return axios
|
|
20
|
+
.post(
|
|
21
|
+
'/api/call/operator/prolong',
|
|
22
|
+
{},
|
|
23
|
+
{
|
|
24
|
+
baseURL,
|
|
25
|
+
headers: { Accept: 'application/json; version=1', ...headers },
|
|
26
|
+
transformResponse: [
|
|
27
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
28
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => {
|
|
29
|
+
if (!data.success) return data.data.error;
|
|
30
|
+
|
|
31
|
+
return data.data;
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
.then((res: StartOperatorWorkData) => res)
|
|
37
|
+
.catch((err: StartOperatorWorkError) => {
|
|
38
|
+
throw err;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
@@ -43,7 +43,7 @@ export function createDealCategorizedFileRequest({
|
|
|
43
43
|
headers: { Accept: 'application/json', 'Content-Type': 'application/json', ...headers },
|
|
44
44
|
transformResponse: [
|
|
45
45
|
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
46
|
-
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data : data.data
|
|
46
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data : data.data?.error),
|
|
47
47
|
],
|
|
48
48
|
})
|
|
49
49
|
.then((res: CreateDealCategorizedFileData) => res)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
2
|
|
|
3
|
-
type SuccessData =
|
|
3
|
+
type SuccessData = never;
|
|
4
4
|
type ErrorData = { success: false; data: { error: string } };
|
|
5
5
|
|
|
6
|
-
type ResultData =
|
|
6
|
+
type ResultData = null;
|
|
7
7
|
type ResultError = ErrorData['data']['error'];
|
|
8
8
|
|
|
9
9
|
export type DeleteDealCategorizedFileHeaders = { 'x-auth-hc': string };
|
|
@@ -27,7 +27,7 @@ export function deleteDealCategorizedFileRequest({
|
|
|
27
27
|
headers: { Accept: 'application/json', ...headers },
|
|
28
28
|
transformResponse: [
|
|
29
29
|
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
30
|
-
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data :
|
|
30
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => (data && !data.success ? data.data?.error : null),
|
|
31
31
|
],
|
|
32
32
|
})
|
|
33
33
|
.then((res: DeleteDealCategorizedFileData) => res)
|
|
@@ -10,6 +10,10 @@ export * from './availableFunds/deleteAvailableFunds';
|
|
|
10
10
|
export * from './call/findCalls';
|
|
11
11
|
export * from './call/findFirstSuccessOutgoingCalls';
|
|
12
12
|
|
|
13
|
+
export * from './callCenter/finishOperatorWork';
|
|
14
|
+
export * from './callCenter/getOperatorStatus';
|
|
15
|
+
export * from './callCenter/startOperatorWork';
|
|
16
|
+
|
|
13
17
|
export * from './deal/createDealCategorizedFile';
|
|
14
18
|
export * from './deal/deleteDealCategorizedFile';
|
|
15
19
|
export * from './deal/findDealCategorizedFiles';
|
|
@@ -26,6 +30,7 @@ export * from './serviceRequest/completeServiceRequestModeration';
|
|
|
26
30
|
export * from './serviceRequest/createServiceRequest';
|
|
27
31
|
export * from './serviceRequest/createServiceRequestCategorizedFile';
|
|
28
32
|
export * from './serviceRequest/deleteServiceRequestCategorizedFile';
|
|
33
|
+
export * from './serviceRequest/deleteServiceRequestReportForSeller';
|
|
29
34
|
export * from './serviceRequest/extendServiceRequestByRealty';
|
|
30
35
|
export * from './serviceRequest/findServiceRequestById';
|
|
31
36
|
export * from './serviceRequest/findServiceRequestDuplicates';
|
|
@@ -41,7 +41,7 @@ export function createServiceRequestCategorizedFileRequest({
|
|
|
41
41
|
headers: { Accept: 'application/json', 'Content-Type': 'application/json', ...headers },
|
|
42
42
|
transformResponse: [
|
|
43
43
|
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
44
|
-
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data : data.data
|
|
44
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data : data.data?.error),
|
|
45
45
|
],
|
|
46
46
|
})
|
|
47
47
|
.then((res: CreateServiceRequestCategorizedFileData) => res)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
2
|
|
|
3
|
-
type SuccessData =
|
|
3
|
+
type SuccessData = never;
|
|
4
4
|
type ErrorData = { success: false; data: { error: string } };
|
|
5
5
|
|
|
6
|
-
type ResultData =
|
|
6
|
+
type ResultData = null;
|
|
7
7
|
type ResultError = ErrorData['data']['error'];
|
|
8
8
|
|
|
9
9
|
export type DeleteServiceRequestCategorizedFileHeaders = { 'x-auth-hc': string };
|
|
@@ -27,7 +27,7 @@ export function deleteServiceRequestCategorizedFileRequest({
|
|
|
27
27
|
headers: { Accept: 'application/json', ...headers },
|
|
28
28
|
transformResponse: [
|
|
29
29
|
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
30
|
-
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data :
|
|
30
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => (data && !data.success ? data.data?.error : null),
|
|
31
31
|
],
|
|
32
32
|
})
|
|
33
33
|
.then((res: DeleteServiceRequestCategorizedFileData) => res)
|