@hapl/api-queries 0.2.14 → 0.2.15--canary.134.247c9c3.0
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 +0 -24
- package/dist/api-queries.cjs.development.js +6283 -4255
- 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 +6283 -4255
- package/dist/api-queries.esm.js.map +1 -1
- package/dist/clients/v1/api/bill/createBill/index.d.ts +0 -2
- package/dist/clients/v1/api/buyer/closeBuyer/index.d.ts +37 -0
- package/dist/clients/v1/api/buyer/findBuyerById/index.d.ts +33 -0
- package/dist/clients/v1/api/buyer/findBuyerStatuses/index.d.ts +36 -0
- package/dist/clients/v1/api/buyer/findBuyerUniquePhones/index.d.ts +23 -0
- package/dist/clients/v1/api/buyer/findBuyers/index.d.ts +15 -2
- package/dist/clients/v1/api/buyer/resetBuyerStatusTimer/index.d.ts +29 -0
- package/dist/clients/v1/api/buyer/shareBuyer/index.d.ts +33 -0
- package/dist/clients/v1/api/buyer/updateBuyer/index.d.ts +38 -0
- package/dist/clients/v1/api/call/createCallComment/index.d.ts +33 -0
- package/dist/clients/v1/api/call/findCallById/index.d.ts +29 -0
- package/dist/clients/v1/api/callTask/callCallTask.d.ts +29 -0
- package/dist/clients/v1/api/callTask/closeCallTask.d.ts +35 -0
- package/dist/clients/v1/api/callTask/findCallQualityAssessors.d.ts +35 -0
- package/dist/clients/v1/api/callTask/findCallTaskById.d.ts +29 -0
- package/dist/clients/v1/api/callTask/findCallTasks.d.ts +9 -3
- package/dist/clients/v1/api/callTask/updateCallTask.d.ts +24 -0
- package/dist/clients/v1/api/comment/findComments/index.d.ts +41 -0
- package/dist/clients/v1/api/deal/findDealExpertStatistics/index.d.ts +39 -0
- package/dist/clients/v1/api/index.d.ts +39 -7
- package/dist/clients/v1/api/messenger/findMessengerInviteLinks/index.d.ts +31 -0
- package/dist/clients/v1/api/motivationCalculator/createMotivationCalculatorRequest/index.d.ts +37 -0
- package/dist/clients/v1/api/motivationGlossary/findMotivationGlossary/index.d.ts +29 -0
- package/dist/clients/v1/api/motivationStatus/findMotivationStatus/index.d.ts +35 -0
- package/dist/clients/v1/api/payslip/findPayslipById.d.ts +29 -0
- package/dist/clients/v1/api/payslip/findPayslips.d.ts +56 -0
- package/dist/clients/v1/api/payslip/updatePayslip.d.ts +35 -0
- package/dist/clients/v1/api/realty/findRealtyPriceHistory/index.d.ts +39 -0
- package/dist/clients/v1/api/serviceRequest/buyer/findBuyerRejectionReasonStatistic/index.d.ts +36 -0
- package/dist/clients/v1/api/serviceRequest/buyer/findBuyerStatusStatistic/index.d.ts +40 -0
- package/dist/clients/v1/api/serviceRequest/chat/findChatsByServiceRequestId/index.d.ts +28 -0
- package/dist/clients/v1/api/serviceRequest/chat/message/findChatMessageByServiceRequestId/index.d.ts +43 -0
- package/dist/clients/v1/api/serviceRequest/createServiceRequestSellerReport/index.d.ts +31 -0
- package/dist/clients/v1/api/serviceRequest/findServiceRequestCategoryById/index.d.ts +44 -0
- package/dist/clients/v1/api/serviceRequest/restoreServiceRequest/index.d.ts +28 -0
- package/dist/clients/v1/api/slack/createCianRating/index.d.ts +29 -0
- package/dist/clients/v1/api/task/findTasks/index.d.ts +4 -0
- package/dist/clients/v1/api/user/findUsers/index.d.ts +2 -0
- package/dist/clients/v1/dictionaries/Bill.d.ts +1 -1
- package/dist/clients/v1/dictionaries/CallTask.d.ts +4 -0
- package/dist/clients/v1/index.d.ts +32 -0
- package/dist/clients/v1/types/Bill.d.ts +1 -3
- package/dist/clients/v1/types/Buyer.d.ts +6 -0
- package/dist/clients/v1/types/BuyerStatusHistory.d.ts +11 -0
- package/dist/clients/v1/types/Call.d.ts +2 -2
- package/dist/clients/v1/types/CallTask.d.ts +5 -0
- package/dist/clients/v1/types/Comment.d.ts +11 -0
- package/dist/clients/v1/types/Message.d.ts +20 -0
- package/dist/clients/v1/types/Motivation.d.ts +58 -0
- package/dist/clients/v1/types/Payslip.d.ts +61 -0
- package/dist/clients/v1/types/PriceHistory.d.ts +9 -0
- package/dist/clients/v1/types/index.d.ts +7 -1
- package/package.json +1 -1
- package/src/clients/v1/api/bill/createBill/index.ts +0 -2
- package/src/clients/v1/api/buyer/closeBuyer/index.ts +47 -0
- package/src/clients/v1/api/buyer/findBuyerById/index.ts +48 -0
- package/src/clients/v1/api/buyer/findBuyerStatuses/index.ts +61 -0
- package/src/clients/v1/api/buyer/findBuyerUniquePhones/index.ts +51 -0
- package/src/clients/v1/api/buyer/findBuyers/index.ts +17 -2
- package/src/clients/v1/api/buyer/resetBuyerStatusTimer/index.ts +42 -0
- package/src/clients/v1/api/buyer/shareBuyer/index.ts +40 -0
- package/src/clients/v1/api/buyer/updateBuyer/index.ts +48 -0
- package/src/clients/v1/api/call/createCallComment/index.ts +41 -0
- package/src/clients/v1/api/call/findCallById/index.ts +39 -0
- package/src/clients/v1/api/callTask/callCallTask.ts +46 -0
- package/src/clients/v1/api/callTask/closeCallTask.ts +45 -0
- package/src/clients/v1/api/callTask/findCallQualityAssessors.ts +59 -0
- package/src/clients/v1/api/callTask/findCallTaskById.ts +39 -0
- package/src/clients/v1/api/callTask/findCallTasks.ts +6 -3
- package/src/clients/v1/api/callTask/updateCallTask.ts +49 -0
- package/src/clients/v1/api/comment/findComments/index.ts +54 -0
- package/src/clients/v1/api/deal/findDealExpertStatistics/index.ts +43 -0
- package/src/clients/v1/api/index.ts +42 -7
- package/src/clients/v1/api/messenger/findMessengerInviteLinks/index.ts +40 -0
- package/src/clients/v1/api/motivationCalculator/createMotivationCalculatorRequest/index.ts +48 -0
- package/src/clients/v1/api/motivationGlossary/findMotivationGlossary/index.ts +38 -0
- package/src/clients/v1/api/motivationStatus/findMotivationStatus/index.ts +47 -0
- package/src/clients/v1/api/payslip/findPayslipById.ts +39 -0
- package/src/clients/v1/api/payslip/findPayslips.ts +53 -0
- package/src/clients/v1/api/payslip/updatePayslip.ts +45 -0
- package/src/clients/v1/api/realty/findRealtyPriceHistory/index.ts +43 -0
- package/src/clients/v1/api/serviceRequest/buyer/findBuyerRejectionReasonStatistic/index.ts +44 -0
- package/src/clients/v1/api/serviceRequest/buyer/findBuyerStatusStatistic/index.ts +48 -0
- package/src/clients/v1/api/serviceRequest/chat/findChatsByServiceRequestId/index.ts +37 -0
- package/src/clients/v1/api/serviceRequest/chat/message/findChatMessageByServiceRequestId/index.ts +59 -0
- package/src/clients/v1/api/serviceRequest/createServiceRequestSellerReport/index.ts +42 -0
- package/src/clients/v1/api/serviceRequest/findServiceRequestCategoryById/index.ts +48 -0
- package/src/clients/v1/api/serviceRequest/restoreServiceRequest/index.ts +41 -0
- package/src/clients/v1/api/slack/createCianRating/index.ts +34 -0
- package/src/clients/v1/api/task/findTasks/index.ts +1 -0
- package/src/clients/v1/api/user/findUsers/index.ts +2 -0
- package/src/clients/v1/dictionaries/Bill.ts +1 -1
- package/src/clients/v1/dictionaries/CallTask.ts +4 -0
- package/src/clients/v1/index.ts +257 -5
- package/src/clients/v1/types/Bill.ts +1 -3
- package/src/clients/v1/types/Buyer.ts +7 -0
- package/src/clients/v1/types/BuyerStatusHistory.ts +12 -0
- package/src/clients/v1/types/Call.ts +2 -2
- package/src/clients/v1/types/CallTask.ts +5 -0
- package/src/clients/v1/types/Comment.ts +10 -0
- package/src/clients/v1/types/Message.ts +20 -0
- package/src/clients/v1/types/Motivation.ts +64 -0
- package/src/clients/v1/types/Payslip.ts +62 -0
- package/src/clients/v1/types/PriceHistory.ts +7 -0
- package/src/clients/v1/types/index.ts +7 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
|
+
import { ServiceRequestSellerReport } from '../../../types';
|
|
3
|
+
|
|
4
|
+
type SuccessData = { success: true; data: ServiceRequestSellerReport };
|
|
5
|
+
type ErrorData = { success: false; data: { error: string } };
|
|
6
|
+
|
|
7
|
+
type ResultData = SuccessData['data'];
|
|
8
|
+
type ResultError = ErrorData['data']['error'];
|
|
9
|
+
|
|
10
|
+
export type CreateServiceRequestSellerReportHeaders = { 'x-auth-hc': string };
|
|
11
|
+
export type CreateServiceRequestSellerReportUrlParams = { id: number };
|
|
12
|
+
export type CreateServiceRequestSellerReportBody = Partial<ServiceRequestSellerReport>;
|
|
13
|
+
|
|
14
|
+
export type CreateServiceRequestSellerReportData = AxiosResponse<ResultData>;
|
|
15
|
+
export type CreateServiceRequestSellerReportError = AxiosError<ResultError>;
|
|
16
|
+
export type CreateServiceRequestSellerReportConfig = {
|
|
17
|
+
baseURL?: string;
|
|
18
|
+
headers: CreateServiceRequestSellerReportHeaders;
|
|
19
|
+
body: CreateServiceRequestSellerReportBody;
|
|
20
|
+
urlParams: CreateServiceRequestSellerReportUrlParams;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export function createServiceRequestSellerReportRequest({
|
|
24
|
+
baseURL = 'https://clients.homeapp.ru',
|
|
25
|
+
body,
|
|
26
|
+
headers,
|
|
27
|
+
urlParams,
|
|
28
|
+
}: CreateServiceRequestSellerReportConfig) {
|
|
29
|
+
return axios
|
|
30
|
+
.post(`/api/service-request/${urlParams.id}/report-for-seller`, body, {
|
|
31
|
+
baseURL,
|
|
32
|
+
headers: { Accept: 'application/json', 'Content-Type': 'application/json', ...headers },
|
|
33
|
+
transformResponse: [
|
|
34
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
35
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data : data.data.error),
|
|
36
|
+
],
|
|
37
|
+
})
|
|
38
|
+
.then((res: CreateServiceRequestSellerReportData) => res)
|
|
39
|
+
.catch((err: CreateServiceRequestSellerReportError) => {
|
|
40
|
+
throw err;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
|
+
import qs from 'qs';
|
|
3
|
+
import { ServiceRequestCategory } from '../../../types';
|
|
4
|
+
|
|
5
|
+
type SuccessData = { success: true; data: { category: ServiceRequestCategory; movedAt: string }[] };
|
|
6
|
+
type ErrorData = { success: false; data: Record<'error' | 'message', string> };
|
|
7
|
+
|
|
8
|
+
type ResultData = SuccessData['data'];
|
|
9
|
+
type ResultError = ErrorData['data']['error'];
|
|
10
|
+
|
|
11
|
+
export type FindServiceRequestCategoryByIdHeaders = { 'x-auth-hc': string };
|
|
12
|
+
export type FindServiceRequestCategoryByIdUrlParams = { id: number };
|
|
13
|
+
export type FindServiceRequestCategoryByIdParams = {
|
|
14
|
+
filter?: { category?: ServiceRequestCategory };
|
|
15
|
+
limits?: { page?: number; count: number | 'all' };
|
|
16
|
+
sorting?: { direction: 'asc' | 'desc'; type: 'createdAt' };
|
|
17
|
+
};
|
|
18
|
+
export type FindServiceRequestCategoryByIdData = AxiosResponse<ResultData>;
|
|
19
|
+
export type FindServiceRequestCategoryByIdError = AxiosError<ResultError>;
|
|
20
|
+
export type FindServiceRequestCategoryByIdConfig = {
|
|
21
|
+
baseURL?: string;
|
|
22
|
+
params?: FindServiceRequestCategoryByIdParams;
|
|
23
|
+
urlParams: FindServiceRequestCategoryByIdUrlParams;
|
|
24
|
+
headers: FindServiceRequestCategoryByIdHeaders;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export function findServiceRequestCategoryByIdRequest({
|
|
28
|
+
baseURL = 'https://clients.homeapp.ru',
|
|
29
|
+
headers,
|
|
30
|
+
urlParams,
|
|
31
|
+
params,
|
|
32
|
+
}: FindServiceRequestCategoryByIdConfig) {
|
|
33
|
+
return axios
|
|
34
|
+
.get(`/api/service-request-category/${urlParams.id}/grouped`, {
|
|
35
|
+
baseURL,
|
|
36
|
+
params,
|
|
37
|
+
paramsSerializer: params => qs.stringify(params, { arrayFormat: 'brackets' }),
|
|
38
|
+
headers: { Accept: 'application/json', ...headers },
|
|
39
|
+
transformResponse: [
|
|
40
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
41
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data : data.data.error),
|
|
42
|
+
],
|
|
43
|
+
})
|
|
44
|
+
.then((res: FindServiceRequestCategoryByIdData) => res)
|
|
45
|
+
.catch((err: FindServiceRequestCategoryByIdError) => {
|
|
46
|
+
throw err;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
|
+
|
|
3
|
+
type SuccessData = { success: true; data: undefined };
|
|
4
|
+
type ErrorData = { success: false; data: { error: string } };
|
|
5
|
+
|
|
6
|
+
type ResultData = SuccessData['data'];
|
|
7
|
+
type ResultError = ErrorData['data']['error'];
|
|
8
|
+
|
|
9
|
+
export type RestoreServiceRequestUrlParams = { id: number };
|
|
10
|
+
export type RestoreServiceRequestHeaders = { 'x-auth-hc': string };
|
|
11
|
+
export type RestoreServiceRequestData = AxiosResponse<ResultData>;
|
|
12
|
+
export type RestoreServiceRequestError = AxiosError<ResultError>;
|
|
13
|
+
export type RestoreServiceRequestConfig = {
|
|
14
|
+
baseURL?: string;
|
|
15
|
+
urlParams: RestoreServiceRequestUrlParams;
|
|
16
|
+
headers: RestoreServiceRequestHeaders;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export function restoreServiceRequest({
|
|
20
|
+
baseURL = 'https://clients.homeapp.ru',
|
|
21
|
+
urlParams,
|
|
22
|
+
headers,
|
|
23
|
+
}: RestoreServiceRequestConfig) {
|
|
24
|
+
return axios
|
|
25
|
+
.put(
|
|
26
|
+
`/api/service-request/restore/${urlParams.id}`,
|
|
27
|
+
{},
|
|
28
|
+
{
|
|
29
|
+
baseURL,
|
|
30
|
+
headers: { Accept: 'application/json', 'Content-Type': 'application/json', ...headers },
|
|
31
|
+
transformResponse: [
|
|
32
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
33
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data : data.data.error),
|
|
34
|
+
],
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
.then((res: RestoreServiceRequestData) => res)
|
|
38
|
+
.catch((err: RestoreServiceRequestError) => {
|
|
39
|
+
throw err;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
|
+
|
|
3
|
+
type SuccessData = { success: true; data: undefined };
|
|
4
|
+
type ErrorData = { success: false; data: { error: string } };
|
|
5
|
+
|
|
6
|
+
type ResultData = SuccessData['data'];
|
|
7
|
+
type ResultError = ErrorData['data']['error'];
|
|
8
|
+
|
|
9
|
+
export type CreateCianRatingHeaders = { 'x-auth-hc': string };
|
|
10
|
+
export type CreateCianRatingBody = { id: number; urls: string[] };
|
|
11
|
+
|
|
12
|
+
export type CreateCianRatingData = AxiosResponse<ResultData>;
|
|
13
|
+
export type CreateCianRatingError = AxiosError<ResultError>;
|
|
14
|
+
export type CreateCianRatingConfig = { baseURL?: string; headers: CreateCianRatingHeaders; body: CreateCianRatingBody };
|
|
15
|
+
|
|
16
|
+
export function createCianRatingRequest({
|
|
17
|
+
baseURL = 'https://clients.homeapp.ru',
|
|
18
|
+
body,
|
|
19
|
+
headers,
|
|
20
|
+
}: CreateCianRatingConfig) {
|
|
21
|
+
return axios
|
|
22
|
+
.post('/api/slack/cian-rating', body, {
|
|
23
|
+
baseURL,
|
|
24
|
+
headers: { Accept: 'application/json', 'Content-Type': 'application/json', ...headers },
|
|
25
|
+
transformResponse: [
|
|
26
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
27
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? undefined : data.data.error),
|
|
28
|
+
],
|
|
29
|
+
})
|
|
30
|
+
.then((res: CreateCianRatingData) => res)
|
|
31
|
+
.catch((err: CreateCianRatingError) => {
|
|
32
|
+
throw err;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -2,7 +2,7 @@ import { BillServiceType, BillServiceUnit } from '../types';
|
|
|
2
2
|
|
|
3
3
|
export const BillDictionary = {
|
|
4
4
|
ServiceType: {
|
|
5
|
-
[BillServiceType.
|
|
5
|
+
[BillServiceType.PartPayment]: 'Частичная оплата обеспечительного платежа',
|
|
6
6
|
[BillServiceType.FullPayment]: 'Окончательный расчет',
|
|
7
7
|
[BillServiceType.BuyServicePayment]: 'Оплата оказания услуг',
|
|
8
8
|
},
|
|
@@ -44,6 +44,10 @@ export const CallTaskDictionary = {
|
|
|
44
44
|
[CallTaskReason.Complaint]: 'Жалоба',
|
|
45
45
|
[CallTaskReason.Commercial]: 'Коммерческое предложение',
|
|
46
46
|
[CallTaskReason.Test]: 'Тест',
|
|
47
|
+
[CallTaskReason.HasOwnRealtor]: 'Есть свой реэлтор',
|
|
48
|
+
[CallTaskReason.Rent]: 'Аренда',
|
|
49
|
+
[CallTaskReason.NewComplex]: 'Новостройка',
|
|
50
|
+
[CallTaskReason.QualityAssurance]: 'Отдел качества',
|
|
47
51
|
[CallTaskReason.Other]: 'Другое',
|
|
48
52
|
},
|
|
49
53
|
ColdReason: {
|
package/src/clients/v1/index.ts
CHANGED
|
@@ -58,6 +58,10 @@ export class Api {
|
|
|
58
58
|
return api.callbackBuyerRequest({ urlParams, headers, baseURL: await this.baseURL });
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
+
closeBuyer = async (urlParams: api.CloseBuyerUrlParams, body: api.CloseBuyerBody, headers: api.CloseBuyerHeaders) => {
|
|
62
|
+
return api.closeBuyerRequest({ urlParams, body, headers, baseURL: await this.baseURL });
|
|
63
|
+
};
|
|
64
|
+
|
|
61
65
|
countBuyers = async (params: api.CountBuyersParams, headers: api.CountBuyersHeaders) => {
|
|
62
66
|
return api.countBuyersRequest({ params, headers, baseURL: await this.baseURL });
|
|
63
67
|
};
|
|
@@ -70,12 +74,63 @@ export class Api {
|
|
|
70
74
|
return api.findBuyerClosingReasonRequest({ headers, baseURL: await this.baseURL });
|
|
71
75
|
};
|
|
72
76
|
|
|
77
|
+
findBuyerStatuses = async (
|
|
78
|
+
urlParams: api.FindBuyerStatusesUrlParams,
|
|
79
|
+
params: api.FindBuyerStatusesParams,
|
|
80
|
+
headers: api.FindBuyerStatusesHeaders
|
|
81
|
+
) => {
|
|
82
|
+
return api.findBuyerStatusesRequest({ headers, params, urlParams, baseURL: await this.baseURL });
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
findBuyerUniquePhones = async (headers: api.FindBuyerUniquePhonesHeaders) => {
|
|
86
|
+
return api.findBuyerUniquePhonesRequest({ headers, baseURL: await this.baseURL });
|
|
87
|
+
};
|
|
88
|
+
|
|
73
89
|
findBuyers = async (params: api.FindBuyersParams, headers: api.FindBuyersHeaders) => {
|
|
74
90
|
return api.findBuyersRequest({ params, headers, baseURL: await this.baseURL });
|
|
75
91
|
};
|
|
76
92
|
|
|
93
|
+
findBuyerById = async (
|
|
94
|
+
urlParams: api.FindBuyerByIdUrlParams,
|
|
95
|
+
params: api.FindBuyerByIdParams,
|
|
96
|
+
headers: api.FindBuyerByIdHeaders
|
|
97
|
+
) => {
|
|
98
|
+
return api.findBuyerByIdRequest({ urlParams, params, headers, baseURL: await this.baseURL });
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
resetBuyerStatusTimer = async (
|
|
102
|
+
urlParams: api.ResetBuyerStatusTimerUrlParams,
|
|
103
|
+
headers: api.ResetBuyerStatusTimerHeaders
|
|
104
|
+
) => {
|
|
105
|
+
return api.resetBuyerStatusTimerRequest({ urlParams, headers, baseURL: await this.baseURL });
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
shareBuyer = async (urlParams: api.ShareBuyerUrlParams, body: api.ShareBuyerBody, headers: api.ShareBuyerHeaders) => {
|
|
109
|
+
return api.shareBuyerRequest({ urlParams, body, headers, baseURL: await this.baseURL });
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
updateBuyer = async (
|
|
113
|
+
urlParams: api.UpdateBuyerUrlParams,
|
|
114
|
+
body: api.UpdateBuyerBody,
|
|
115
|
+
headers: api.UpdateBuyerHeaders
|
|
116
|
+
) => {
|
|
117
|
+
return api.updateBuyerRequest({ urlParams, body, headers, baseURL: await this.baseURL });
|
|
118
|
+
};
|
|
119
|
+
|
|
77
120
|
// call
|
|
78
121
|
|
|
122
|
+
createCallComment = async (
|
|
123
|
+
urlParams: api.CreateCallCommentUrlParams,
|
|
124
|
+
body: api.CreateCallCommentBody,
|
|
125
|
+
headers: api.CreateCallCommentHeaders
|
|
126
|
+
) => {
|
|
127
|
+
return api.createCallCommentRequest({ urlParams, body, headers, baseURL: await this.baseURL });
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
findCallById = async (urlParams: api.FindCallByIdUrlParams, headers: api.FindCallByIdHeaders) => {
|
|
131
|
+
return api.findCallByIdRequest({ urlParams, headers, baseURL: await this.baseURL });
|
|
132
|
+
};
|
|
133
|
+
|
|
79
134
|
findCalls = async (params: api.FindCallsParams, headers: api.FindCallsHeaders) => {
|
|
80
135
|
return api.findCallsRequest({ params, headers, baseURL: await this.baseURL });
|
|
81
136
|
};
|
|
@@ -115,14 +170,51 @@ export class Api {
|
|
|
115
170
|
|
|
116
171
|
// call task
|
|
117
172
|
|
|
173
|
+
callCallTask = async (urlParams: api.CallCallTaskUrlParams, headers?: api.CreateCallTaskHeaders) => {
|
|
174
|
+
return api.callCallTaskRequest({ urlParams, headers, baseURL: await this.baseURL });
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
closeCallTask = async (
|
|
178
|
+
urlParams: api.CallCallTaskUrlParams,
|
|
179
|
+
body: api.CloseCallTaskBody,
|
|
180
|
+
headers?: api.CreateCallTaskHeaders
|
|
181
|
+
) => {
|
|
182
|
+
return api.closeCallTaskRequest({ urlParams, body, headers, baseURL: await this.baseURL });
|
|
183
|
+
};
|
|
184
|
+
|
|
118
185
|
createCallTask = async (body: api.CreateCallTaskBody, headers?: api.CreateCallTaskHeaders) => {
|
|
119
186
|
return api.createCallTaskRequest({ body, headers, baseURL: await this.baseURL });
|
|
120
187
|
};
|
|
121
188
|
|
|
189
|
+
findCallQualityAssessors = async (
|
|
190
|
+
params: api.FindCallQualityAssessorsParams,
|
|
191
|
+
headers: api.FindCallQualityAssessorsHeaders
|
|
192
|
+
) => {
|
|
193
|
+
return api.findCallQualityAssessorsRequest({ params, headers, baseURL: await this.baseURL });
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
findCallTaskById = async (urlParams: api.FindCallByIdUrlParams, headers: api.FindCallTaskByIdHeaders) => {
|
|
197
|
+
return api.findCallTaskByIdRequest({ urlParams, headers, baseURL: await this.baseURL });
|
|
198
|
+
};
|
|
199
|
+
|
|
122
200
|
findCallTasks = async (params: api.FindCallTasksParams, headers: api.FindCallTasksHeaders) => {
|
|
123
201
|
return api.findCallTasksRequest({ params, headers, baseURL: await this.baseURL });
|
|
124
202
|
};
|
|
125
203
|
|
|
204
|
+
updateCallTask = async (
|
|
205
|
+
urlParams: api.UpdateCallTaskUrlParams,
|
|
206
|
+
body: api.UpdateCallTaskBody,
|
|
207
|
+
headers: api.FindCallTasksHeaders
|
|
208
|
+
) => {
|
|
209
|
+
return api.updateCallTaskRequest({ urlParams, body, headers, baseURL: await this.baseURL });
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
// comment
|
|
213
|
+
|
|
214
|
+
findComments = async (params: api.FindCommentsParams, headers: api.FindCommentsHeaders) => {
|
|
215
|
+
return api.findCommentsRequest({ params, headers, baseURL: await this.baseURL });
|
|
216
|
+
};
|
|
217
|
+
|
|
126
218
|
// contract
|
|
127
219
|
|
|
128
220
|
approveContract = async (
|
|
@@ -258,6 +350,14 @@ export class Api {
|
|
|
258
350
|
return api.findDealCategorizedFilesRequest({ urlParams, params, headers, baseURL: await this.baseURL });
|
|
259
351
|
};
|
|
260
352
|
|
|
353
|
+
findDealExpertStatistics = async (
|
|
354
|
+
urlParams: api.FindDealExpertStatisticsUrlParams,
|
|
355
|
+
params: api.FindDealExpertStatisticsParams,
|
|
356
|
+
headers: api.FindDealExpertStatisticsHeaders
|
|
357
|
+
) => {
|
|
358
|
+
return api.findDealExpertStatisticsRequest({ urlParams, params, headers, baseURL: await this.baseURL });
|
|
359
|
+
};
|
|
360
|
+
|
|
261
361
|
findDeals = async (params: api.FindDealsParams, headers: api.FindDealsHeaders) => {
|
|
262
362
|
return api.findDealsRequest({ params, headers, baseURL: await this.baseURL });
|
|
263
363
|
};
|
|
@@ -459,6 +559,55 @@ export class Api {
|
|
|
459
559
|
return api.updateInternalCrossSaleRequest({ urlParams, body, headers, baseURL: await this.baseURL });
|
|
460
560
|
};
|
|
461
561
|
|
|
562
|
+
// motivation status
|
|
563
|
+
|
|
564
|
+
findMessengerInviteLinks = async (
|
|
565
|
+
urlParams: api.FindMessengerInviteLinksUrlParams,
|
|
566
|
+
headers: api.FindMessengerInviteLinksHeaders
|
|
567
|
+
) => {
|
|
568
|
+
return api.findMessengerInviteLinksRequest({ urlParams, headers, baseURL: await this.baseURL });
|
|
569
|
+
};
|
|
570
|
+
|
|
571
|
+
createMotivationCalculatorRequest = async (
|
|
572
|
+
body: api.CreateMotivationCalculatorRequestBody,
|
|
573
|
+
headers: api.CreateMotivationCalculatorRequestHeaders
|
|
574
|
+
) => {
|
|
575
|
+
return api.createMotivationCalculatorRequest({ body, headers, baseURL: await this.baseURL });
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
// motivation glossary
|
|
579
|
+
|
|
580
|
+
findMotivationGlossary = async (headers: api.FindMotivationGlossaryHeaders) => {
|
|
581
|
+
return api.findMotivationGlossaryRequest({ headers, baseURL: await this.baseURL });
|
|
582
|
+
};
|
|
583
|
+
|
|
584
|
+
// motivation status
|
|
585
|
+
|
|
586
|
+
findMotivationStatus = async (
|
|
587
|
+
urlParams: api.FindMotivationStatusUrlParams,
|
|
588
|
+
headers: api.FindMotivationStatusHeaders
|
|
589
|
+
) => {
|
|
590
|
+
return api.findMotivationStatusRequest({ urlParams, headers, baseURL: await this.baseURL });
|
|
591
|
+
};
|
|
592
|
+
|
|
593
|
+
// payslip
|
|
594
|
+
|
|
595
|
+
findPayslips = async (params: api.FindPayslipsParams, headers: api.FindPayslipsHeaders) => {
|
|
596
|
+
return api.findPayslipsRequest({ params, headers, baseURL: await this.baseURL });
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
findPayslipById = async (urlParams: api.FindPayslipByIdUrlParams, headers: api.FindPayslipByIdHeaders) => {
|
|
600
|
+
return api.findPayslipByIdRequest({ urlParams, headers, baseURL: await this.baseURL });
|
|
601
|
+
};
|
|
602
|
+
|
|
603
|
+
updatePayslip = async (
|
|
604
|
+
urlParams: api.UpdatePayslipUrlParams,
|
|
605
|
+
body: api.UpdatePayslipBody,
|
|
606
|
+
headers: api.UpdatePayslipHeaders
|
|
607
|
+
) => {
|
|
608
|
+
return api.updatePayslipRequest({ urlParams, body, headers, baseURL: await this.baseURL });
|
|
609
|
+
};
|
|
610
|
+
|
|
462
611
|
// phoneBookContact
|
|
463
612
|
|
|
464
613
|
createPhoneBookContact = async (body: api.CreatePhoneBookContactBody, headers: api.CreatePhoneBookContactHeaders) => {
|
|
@@ -513,6 +662,10 @@ export class Api {
|
|
|
513
662
|
|
|
514
663
|
// realty
|
|
515
664
|
|
|
665
|
+
findRealtyPriceHistory = async (params: api.FindRealtyPriceHistoryParams) => {
|
|
666
|
+
return api.findRealtyPriceHistoryRequest({ params, baseURL: await this.baseURL });
|
|
667
|
+
};
|
|
668
|
+
|
|
516
669
|
findSimilarRealtyIdsById = async (urlParams: api.FindSimilarRealtyIdsByIdUrlParams) => {
|
|
517
670
|
return api.findSimilarRealtyIdsById({ urlParams, baseURL: await this.baseURL });
|
|
518
671
|
};
|
|
@@ -531,6 +684,27 @@ export class Api {
|
|
|
531
684
|
return api.approveCloseServiceRequestRequest({ urlParams, body, headers, baseURL: await this.baseURL });
|
|
532
685
|
};
|
|
533
686
|
|
|
687
|
+
findBuyerRejectionReasonStatistic = async (
|
|
688
|
+
urlParams: api.FindBuyerRejectionReasonStatisticUrlParams,
|
|
689
|
+
params: api.FindBuyerRejectionReasonStatisticParams,
|
|
690
|
+
headers: api.FindBuyerRejectionReasonStatisticHeaders
|
|
691
|
+
) => {
|
|
692
|
+
return api.findBuyerRejectionReasonStatisticRequest({
|
|
693
|
+
urlParams,
|
|
694
|
+
params,
|
|
695
|
+
headers,
|
|
696
|
+
baseURL: await this.baseURL,
|
|
697
|
+
});
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
findBuyerStatusStatistic = async (
|
|
701
|
+
urlParams: api.FindBuyerStatusStatisticUrlParams,
|
|
702
|
+
params: api.FindBuyerStatusStatisticParams,
|
|
703
|
+
headers: api.FindBuyerStatusStatisticHeaders
|
|
704
|
+
) => {
|
|
705
|
+
return api.findBuyerStatusStatisticRequest({ urlParams, params, headers, baseURL: await this.baseURL });
|
|
706
|
+
};
|
|
707
|
+
|
|
534
708
|
callbackServiceRequest = async (
|
|
535
709
|
urlParams: api.CallbackServiceRequestUrlParams,
|
|
536
710
|
headers: api.CallbackServiceRequestHeaders
|
|
@@ -538,6 +712,21 @@ export class Api {
|
|
|
538
712
|
return api.callbackServiceRequest({ urlParams, headers, baseURL: await this.baseURL });
|
|
539
713
|
};
|
|
540
714
|
|
|
715
|
+
findChatsByServiceRequestId = async (
|
|
716
|
+
urlParams: api.FindChatsByServiceRequestIdUrlParams,
|
|
717
|
+
headers: api.FindChatsByServiceRequestIdHeaders
|
|
718
|
+
) => {
|
|
719
|
+
return api.findChatsByServiceRequestIdRequest({ urlParams, headers, baseURL: await this.baseURL });
|
|
720
|
+
};
|
|
721
|
+
|
|
722
|
+
findChatMessagesByServiceRequestId = async (
|
|
723
|
+
urlParams: api.FindChatMessagesByServiceRequestIdUrlParams,
|
|
724
|
+
params: api.FindChatMessagesByServiceRequestIdParams,
|
|
725
|
+
headers: api.FindChatMessagesByServiceRequestIdHeaders
|
|
726
|
+
) => {
|
|
727
|
+
return api.findChatMessagesByServiceRequestIdRequest({ urlParams, params, headers, baseURL: await this.baseURL });
|
|
728
|
+
};
|
|
729
|
+
|
|
541
730
|
closeServiceRequest = async (
|
|
542
731
|
urlParams: api.CloseServiceRequestUrlParams,
|
|
543
732
|
body: api.CloseServiceRequestBody,
|
|
@@ -583,7 +772,25 @@ export class Api {
|
|
|
583
772
|
body: api.CreateServiceRequestCategorizedFileBody,
|
|
584
773
|
headers: api.CreateServiceRequestCategorizedFileHeaders
|
|
585
774
|
) => {
|
|
586
|
-
return api.createServiceRequestCategorizedFileRequest({
|
|
775
|
+
return api.createServiceRequestCategorizedFileRequest({
|
|
776
|
+
urlParams,
|
|
777
|
+
body,
|
|
778
|
+
headers,
|
|
779
|
+
baseURL: await this.baseURL,
|
|
780
|
+
});
|
|
781
|
+
};
|
|
782
|
+
|
|
783
|
+
createServiceRequestSellerReport = async (
|
|
784
|
+
urlParams: api.CreateServiceRequestSellerReportUrlParams,
|
|
785
|
+
body: api.CreateServiceRequestSellerReportBody,
|
|
786
|
+
headers: api.CreateServiceRequestSellerReportHeaders
|
|
787
|
+
) => {
|
|
788
|
+
return api.createServiceRequestSellerReportRequest({
|
|
789
|
+
urlParams,
|
|
790
|
+
body,
|
|
791
|
+
headers,
|
|
792
|
+
baseURL: await this.baseURL,
|
|
793
|
+
});
|
|
587
794
|
};
|
|
588
795
|
|
|
589
796
|
deferServiceRequest = async (body: api.DeferServiceRequestBody, headers: api.DeferServiceRequestHeaders) => {
|
|
@@ -677,7 +884,25 @@ export class Api {
|
|
|
677
884
|
params: api.FindServiceRequestCategorizedFilesParams,
|
|
678
885
|
headers: api.FindServiceRequestCategorizedFilesHeaders
|
|
679
886
|
) => {
|
|
680
|
-
return api.findServiceRequestCategorizedFilesRequest({
|
|
887
|
+
return api.findServiceRequestCategorizedFilesRequest({
|
|
888
|
+
urlParams,
|
|
889
|
+
params,
|
|
890
|
+
headers,
|
|
891
|
+
baseURL: await this.baseURL,
|
|
892
|
+
});
|
|
893
|
+
};
|
|
894
|
+
|
|
895
|
+
findServiceRequestCategoryById = async (
|
|
896
|
+
urlParams: api.FindServiceRequestCategoryByIdUrlParams,
|
|
897
|
+
headers: api.FindServiceRequestCategoryByIdHeaders,
|
|
898
|
+
params?: api.FindServiceRequestCategoryByIdParams
|
|
899
|
+
) => {
|
|
900
|
+
return api.findServiceRequestCategoryByIdRequest({
|
|
901
|
+
urlParams,
|
|
902
|
+
params,
|
|
903
|
+
headers,
|
|
904
|
+
baseURL: await this.baseURL,
|
|
905
|
+
});
|
|
681
906
|
};
|
|
682
907
|
|
|
683
908
|
findServiceRequestCategorizedFileCreatedDate = async (
|
|
@@ -703,7 +928,12 @@ export class Api {
|
|
|
703
928
|
params: api.FindServiceRequestSellerReportsParams,
|
|
704
929
|
headers: api.FindServiceRequestSellerReportsHeaders
|
|
705
930
|
) => {
|
|
706
|
-
return api.findServiceRequestSellerReportsRequest({
|
|
931
|
+
return api.findServiceRequestSellerReportsRequest({
|
|
932
|
+
urlParams,
|
|
933
|
+
params,
|
|
934
|
+
headers,
|
|
935
|
+
baseURL: await this.baseURL,
|
|
936
|
+
});
|
|
707
937
|
};
|
|
708
938
|
|
|
709
939
|
publishServiceRequest = async (
|
|
@@ -713,6 +943,13 @@ export class Api {
|
|
|
713
943
|
return api.publishServiceRequest({ urlParams, headers, baseURL: await this.baseURL });
|
|
714
944
|
};
|
|
715
945
|
|
|
946
|
+
restoreServiceRequest = async (
|
|
947
|
+
urlParams: api.RestoreServiceRequestUrlParams,
|
|
948
|
+
headers: api.RestoreServiceRequestHeaders
|
|
949
|
+
) => {
|
|
950
|
+
return api.restoreServiceRequest({ urlParams, headers, baseURL: await this.baseURL });
|
|
951
|
+
};
|
|
952
|
+
|
|
716
953
|
returnDeferredServiceRequest = async (
|
|
717
954
|
body: api.ReturnDeferredServiceRequestBody,
|
|
718
955
|
headers: api.ReturnDeferredServiceRequestHeaders
|
|
@@ -738,7 +975,11 @@ export class Api {
|
|
|
738
975
|
urlParams: api.StartServiceRequestModerationForOldRealtyUrlParams,
|
|
739
976
|
headers: api.StartServiceRequestModerationForOldRealtyHeaders
|
|
740
977
|
) => {
|
|
741
|
-
return api.startServiceRequestModerationForOldRealtyRequest({
|
|
978
|
+
return api.startServiceRequestModerationForOldRealtyRequest({
|
|
979
|
+
urlParams,
|
|
980
|
+
headers,
|
|
981
|
+
baseURL: await this.baseURL,
|
|
982
|
+
});
|
|
742
983
|
};
|
|
743
984
|
|
|
744
985
|
transferServiceRequest = async (
|
|
@@ -757,6 +998,12 @@ export class Api {
|
|
|
757
998
|
return api.updateServiceRequestRequest({ urlParams, body, headers, baseURL: await this.baseURL });
|
|
758
999
|
};
|
|
759
1000
|
|
|
1001
|
+
// slack
|
|
1002
|
+
|
|
1003
|
+
createCianRating = async (body: api.CreateCianRatingBody, headers: api.CreateCianRatingHeaders) => {
|
|
1004
|
+
return api.createCianRatingRequest({ body, headers, baseURL: await this.baseURL });
|
|
1005
|
+
};
|
|
1006
|
+
|
|
760
1007
|
// sold
|
|
761
1008
|
|
|
762
1009
|
findSoldStatistic = async (headers?: api.FindSoldStatisticHeaders) => {
|
|
@@ -849,7 +1096,12 @@ export class Api {
|
|
|
849
1096
|
params?: api.FindValuationByServiceRequestIdParams,
|
|
850
1097
|
headers?: api.FindValuationByServiceRequestIdHeaders
|
|
851
1098
|
) => {
|
|
852
|
-
return api.findValuationByServiceRequestIdRequest({
|
|
1099
|
+
return api.findValuationByServiceRequestIdRequest({
|
|
1100
|
+
urlParams,
|
|
1101
|
+
params,
|
|
1102
|
+
headers,
|
|
1103
|
+
baseURL: await this.baseURL,
|
|
1104
|
+
});
|
|
853
1105
|
};
|
|
854
1106
|
|
|
855
1107
|
findValuationNewsByServiceRequestId = async (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export enum BillServiceType {
|
|
2
|
-
|
|
2
|
+
PartPayment = 'part_payment',
|
|
3
3
|
FullPayment = 'full_payment',
|
|
4
4
|
BuyServicePayment = 'buy_service_payment',
|
|
5
5
|
}
|
|
@@ -33,7 +33,5 @@ export type Bill = {
|
|
|
33
33
|
unit: BillServiceUnit;
|
|
34
34
|
}>;
|
|
35
35
|
|
|
36
|
-
acceptanceAgreementDate?: string;
|
|
37
|
-
acceptanceAgreementNumber?: string;
|
|
38
36
|
dealId?: number;
|
|
39
37
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ServiceRequest } from './ServiceRequest';
|
|
2
2
|
import { User } from './User';
|
|
3
|
+
import { Call } from './Call';
|
|
3
4
|
|
|
4
5
|
export enum BuyerStatus {
|
|
5
6
|
Incoming = 'incoming',
|
|
@@ -51,4 +52,10 @@ export type Buyer = {
|
|
|
51
52
|
source?: string;
|
|
52
53
|
statusDeadlineAt?: string;
|
|
53
54
|
updatedAt?: string;
|
|
55
|
+
calls: Call[];
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export type BuyerPhone = {
|
|
59
|
+
name: string;
|
|
60
|
+
phone: string;
|
|
54
61
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BuyerStatus, BuyerRealtyShowStatus } from './Buyer';
|
|
2
|
+
|
|
3
|
+
export type BuyerStatusHistory = {
|
|
4
|
+
id: number;
|
|
5
|
+
status: BuyerStatus;
|
|
6
|
+
changedAt: string;
|
|
7
|
+
deadlineAt: string;
|
|
8
|
+
realtyShowData: {
|
|
9
|
+
status: BuyerRealtyShowStatus;
|
|
10
|
+
scheduledAt: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -13,12 +13,12 @@ export enum CallDefaultTelephony {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export type Call = {
|
|
16
|
-
callTask
|
|
16
|
+
callTask?: Partial<CallTask> & { id: number };
|
|
17
17
|
createdAt: string;
|
|
18
18
|
duration: number;
|
|
19
19
|
extId: string;
|
|
20
20
|
from: { id: number; number: string };
|
|
21
|
-
hasComments
|
|
21
|
+
hasComments?: boolean;
|
|
22
22
|
id: number;
|
|
23
23
|
inProgress: boolean;
|
|
24
24
|
redirectCount: number;
|
|
@@ -21,7 +21,12 @@ export enum CallTaskStatus {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export enum CallTaskReason {
|
|
24
|
+
HasOwnRealtor = 'has_own_realtor',
|
|
25
|
+
Rent = 'rent',
|
|
26
|
+
NewComplex = 'new_complex',
|
|
27
|
+
Error = 'error',
|
|
24
28
|
WrongGeo = 'wrong_geo',
|
|
29
|
+
QualityAssurance = 'quality_assurance',
|
|
25
30
|
Double = 'double',
|
|
26
31
|
Agent = 'agent',
|
|
27
32
|
BuyingOrSellingPart = 'buying_or_selling_part',
|