@hapl/api-queries 0.1.89 → 0.1.92
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 +85 -0
- 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 +85 -0
- 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/index.d.ts +3 -0
- package/dist/clients/v1/index.d.ts +42 -39
- 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 +35 -0
- package/src/clients/v1/api/callCenter/getOperatorStatus/index.ts +32 -0
- package/src/clients/v1/api/callCenter/startOperatorWork/index.ts +36 -0
- package/src/clients/v1/api/index.ts +4 -0
- package/src/clients/v1/index.ts +118 -228
- 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 {};
|
|
@@ -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';
|
|
@@ -1,45 +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
|
-
|
|
42
|
-
|
|
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>;
|
|
43
46
|
}
|
|
44
47
|
export * from './api';
|
|
45
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,35 @@
|
|
|
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('/api/call/operator/finish', undefined, {
|
|
20
|
+
baseURL,
|
|
21
|
+
headers: { Accept: 'application/json; version=1', ...headers },
|
|
22
|
+
transformResponse: [
|
|
23
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
24
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => {
|
|
25
|
+
if (data.success) return null;
|
|
26
|
+
|
|
27
|
+
return data.data.error;
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
})
|
|
31
|
+
.then((res: FinishOperatorWorkData) => res)
|
|
32
|
+
.catch((err: FinishOperatorWorkError) => {
|
|
33
|
+
throw err;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -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,36 @@
|
|
|
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('/api/call/operator/prolong', undefined, {
|
|
21
|
+
baseURL,
|
|
22
|
+
headers: { Accept: 'application/json; version=1', ...headers },
|
|
23
|
+
transformResponse: [
|
|
24
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
25
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => {
|
|
26
|
+
if (!data.success) return data.data.error;
|
|
27
|
+
|
|
28
|
+
return data.data;
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
})
|
|
32
|
+
.then((res: StartOperatorWorkData) => res)
|
|
33
|
+
.catch((err: StartOperatorWorkError) => {
|
|
34
|
+
throw err;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -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';
|