@hapl/api-queries 0.2.13 → 0.2.14--canary.134.eee23e4.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 -12
- package/dist/api-queries.cjs.development.js +3352 -1636
- 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 +3352 -1636
- package/dist/api-queries.esm.js.map +1 -1
- 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 +34 -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/findMotivationStatus/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/createServiceRequestSellerReport/index.d.ts +31 -0
- package/dist/clients/v1/api/serviceRequest/findServiceRequestCategoryById/index.d.ts +44 -0
- package/dist/clients/v1/dictionaries/CallTask.d.ts +4 -0
- package/dist/clients/v1/index.d.ts +27 -0
- 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/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 +6 -1
- package/package.json +1 -1
- 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 +37 -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/findMotivationStatus/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/createServiceRequestSellerReport/index.ts +42 -0
- package/src/clients/v1/api/serviceRequest/findServiceRequestCategoryById/index.ts +48 -0
- package/src/clients/v1/dictionaries/CallTask.ts +4 -0
- package/src/clients/v1/index.ts +223 -5
- 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/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 +6 -1
|
@@ -12,10 +12,19 @@ export declare class Api {
|
|
|
12
12
|
createBill: (body: api.CreateBillBody, headers: api.CreateBillHeaders) => Promise<api.CreateBillData>;
|
|
13
13
|
findBills: (params: api.FindBillsParams, headers: api.FindBillsHeaders) => Promise<api.FindBillsData>;
|
|
14
14
|
callbackBuyer: (urlParams: api.CallbackBuyerUrlParams, headers: api.CallbackBuyerHeaders) => Promise<api.CallbackBuyerData>;
|
|
15
|
+
closeBuyer: (urlParams: api.CloseBuyerUrlParams, body: api.CloseBuyerBody, headers: api.CloseBuyerHeaders) => Promise<api.CloseBuyerData>;
|
|
15
16
|
countBuyers: (params: api.CountBuyersParams, headers: api.CountBuyersHeaders) => Promise<api.CountBuyersData>;
|
|
16
17
|
createBuyer: (body: api.CreateBuyerBody, headers?: api.CallbackBuyerHeaders | undefined) => Promise<api.CreateBuyerData>;
|
|
17
18
|
findBuyerClosingReason: (headers: api.FindBuyerClosingReasonHeaders) => Promise<api.FindBuyerClosingReasonData>;
|
|
19
|
+
findBuyerStatuses: (urlParams: api.FindBuyerStatusesUrlParams, params: api.FindBuyerStatusesParams, headers: api.FindBuyerStatusesHeaders) => Promise<api.FindBuyerStatusesData>;
|
|
20
|
+
findBuyerUniquePhones: (headers: api.FindBuyerUniquePhonesHeaders) => Promise<api.FindBuyerUniquePhonesData>;
|
|
18
21
|
findBuyers: (params: api.FindBuyersParams, headers: api.FindBuyersHeaders) => Promise<api.FindBuyersData>;
|
|
22
|
+
findBuyerById: (urlParams: api.FindBuyerByIdUrlParams, params: api.FindBuyerByIdParams, headers: api.FindBuyerByIdHeaders) => Promise<api.FindBuyerByIdData>;
|
|
23
|
+
resetBuyerStatusTimer: (urlParams: api.ResetBuyerStatusTimerUrlParams, headers: api.ResetBuyerStatusTimerHeaders) => Promise<api.ResetBuyerStatusTimerData>;
|
|
24
|
+
shareBuyer: (urlParams: api.ShareBuyerUrlParams, body: api.ShareBuyerBody, headers: api.ShareBuyerHeaders) => Promise<api.ShareBuyerData>;
|
|
25
|
+
updateBuyer: (urlParams: api.UpdateBuyerUrlParams, body: api.UpdateBuyerBody, headers: api.UpdateBuyerHeaders) => Promise<api.UpdateBuyerData>;
|
|
26
|
+
createCallComment: (urlParams: api.CreateCallCommentUrlParams, body: api.CreateCallCommentBody, headers: api.CreateCallCommentHeaders) => Promise<api.CreateCallCommentData>;
|
|
27
|
+
findCallById: (urlParams: api.FindCallByIdUrlParams, headers: api.FindCallByIdHeaders) => Promise<api.FindCallByIdData>;
|
|
19
28
|
findCalls: (params: api.FindCallsParams, headers: api.FindCallsHeaders) => Promise<api.FindCallsData>;
|
|
20
29
|
findFirstSuccessOutgoingCalls: (params: api.FindFirstSuccessOutgoingCallsParams, headers: api.FindFirstSuccessOutgoingCallsHeaders) => Promise<api.FindFirstSuccessOutgoingCallsData>;
|
|
21
30
|
markupCall: (body: api.MarkupCallBody, headers: api.MarkupCallHeaders) => Promise<api.MarkupCallData>;
|
|
@@ -24,8 +33,14 @@ export declare class Api {
|
|
|
24
33
|
finishOperatorWork: (headers: api.FinishOperatorWorkHeaders) => Promise<api.FinishOperatorWorkData>;
|
|
25
34
|
startOperatorWork: (headers: api.StartOperatorWorkHeaders) => Promise<api.StartOperatorWorkData>;
|
|
26
35
|
getOperatorStatus: (headers: api.GetOperatorStatusHeaders) => Promise<api.GetOperatorStatusData>;
|
|
36
|
+
callCallTask: (urlParams: api.CallCallTaskUrlParams, headers?: api.CreateCallTaskHeaders | undefined) => Promise<api.CallCallTaskData>;
|
|
37
|
+
closeCallTask: (urlParams: api.CallCallTaskUrlParams, body: api.CloseCallTaskBody, headers?: api.CreateCallTaskHeaders | undefined) => Promise<api.CloseCallTaskData>;
|
|
27
38
|
createCallTask: (body: api.CreateCallTaskBody, headers?: api.CreateCallTaskHeaders | undefined) => Promise<api.CreateCallTaskData>;
|
|
39
|
+
findCallQualityAssessors: (params: api.FindCallQualityAssessorsParams, headers: api.FindCallQualityAssessorsHeaders) => Promise<api.FindCallQualityAssessorsData>;
|
|
40
|
+
findCallTaskById: (urlParams: api.FindCallByIdUrlParams, headers: api.FindCallTaskByIdHeaders) => Promise<api.FindCallTaskByIdData>;
|
|
28
41
|
findCallTasks: (params: api.FindCallTasksParams, headers: api.FindCallTasksHeaders) => Promise<api.FindCallTasksData>;
|
|
42
|
+
updateCallTask: (urlParams: api.UpdateCallTaskUrlParams, body: api.UpdateCallTaskBody, headers: api.FindCallTasksHeaders) => Promise<api.UpdateCallTaskData>;
|
|
43
|
+
findComments: (params: api.FindCommentsParams, headers: api.FindCommentsHeaders) => Promise<api.FindCommentsData>;
|
|
29
44
|
approveContract: (urlParams: api.ApproveContractUrlParams, body: api.ApproveContractBody, headers: api.ApproveContractHeaders) => Promise<api.ApproveContractData>;
|
|
30
45
|
createContract: (body: api.CreateContractBody, headers: api.CreateContractHeaders) => Promise<api.CreateContractData>;
|
|
31
46
|
createContractLegalDocument: (urlParams: api.CreateContractLegalDocumentUrlParams, headers: api.CreateContractLegalDocumentHeaders) => Promise<api.CreateContractLegalDocumentData>;
|
|
@@ -45,6 +60,7 @@ export declare class Api {
|
|
|
45
60
|
createDealCategorizedFile: (urlParams: api.CreateDealCategorizedFileUrlParams, body: api.CreateDealCategorizedFileBody, headers: api.CreateDealCategorizedFileHeaders) => Promise<api.CreateDealCategorizedFileData>;
|
|
46
61
|
createDealInvestPrepayment: (urlParams: api.CreateDealInvestPrepaymentUrlParams, body: api.CreateDealInvestPrepaymentBody, headers: api.CreateDealInvestPrepaymentHeaders) => Promise<api.CreateDealInvestPrepaymentData>;
|
|
47
62
|
findDealCategorizedFiles: (urlParams: api.FindDealCategorizedFilesUrlParams, params: api.FindDealCategorizedFilesParams, headers: api.FindDealCategorizedFilesHeaders) => Promise<api.FindDealCategorizedFilesData>;
|
|
63
|
+
findDealExpertStatistics: (urlParams: api.FindDealExpertStatisticsUrlParams, params: api.FindDealExpertStatisticsParams, headers: api.FindDealExpertStatisticsHeaders) => Promise<api.FindDealExpertStatisticsData>;
|
|
48
64
|
findDeals: (params: api.FindDealsParams, headers: api.FindDealsHeaders) => Promise<api.FindDealsData>;
|
|
49
65
|
deleteDealCategorizedFile: (urlParams: api.DeleteDealCategorizedFileUrlParams, headers: api.DeleteDealCategorizedFileHeaders) => Promise<api.DeleteDealCategorizedFileData>;
|
|
50
66
|
setDealDoneState: (urlParams: api.SetDealDoneStateUrlParams, headers: api.SetDealDoneStateHeaders) => Promise<api.SetDealDoneStateData>;
|
|
@@ -78,6 +94,12 @@ export declare class Api {
|
|
|
78
94
|
findInternalCrossSaleInfo: (params: api.FindInternalCrossSaleInfoParams, headers: api.FindInternalCrossSaleInfoHeaders) => Promise<api.FindInternalCrossSaleInfoData>;
|
|
79
95
|
findInternalCrossSales: (urlParams: api.FindInternalCrossSalesUrlParams, headers: api.FindInternalCrossSalesHeaders) => Promise<api.FindInternalCrossSalesData>;
|
|
80
96
|
updateInternalCrossSale: (urlParams: api.UpdateInternalCrossSaleUrlParams, body: api.UpdateInternalCrossSaleBody, headers: api.UpdateInternalCrossSaleHeaders) => Promise<api.UpdateInternalCrossSaleData>;
|
|
97
|
+
findMessengerInviteLinks: (urlParams: api.FindMessengerInviteLinksUrlParams, headers: api.FindMessengerInviteLinksHeaders) => Promise<api.FindMessengerInviteLinksData>;
|
|
98
|
+
createMotivationCalculatorRequest: (body: api.CreateMotivationCalculatorRequestBody, headers: api.CreateMotivationCalculatorRequestHeaders) => Promise<api.CreateMotivationCalculatorRequestData>;
|
|
99
|
+
findMotivationStatus: (urlParams: api.FindMotivationStatusUrlParams, headers: api.FindMotivationStatusHeaders) => Promise<api.FindMotivationStatusData>;
|
|
100
|
+
findPayslips: (params: api.FindPayslipsParams, headers: api.FindPayslipsHeaders) => Promise<api.FindPayslipsData>;
|
|
101
|
+
findPayslipById: (urlParams: api.FindPayslipByIdUrlParams, headers: api.FindPayslipByIdHeaders) => Promise<api.FindPayslipByIdData>;
|
|
102
|
+
updatePayslip: (urlParams: api.UpdatePayslipUrlParams, body: api.UpdatePayslipBody, headers: api.UpdatePayslipHeaders) => Promise<api.UpdatePayslipData>;
|
|
81
103
|
createPhoneBookContact: (body: api.CreatePhoneBookContactBody, headers: api.CreatePhoneBookContactHeaders) => Promise<api.CreatePhoneBookContactData>;
|
|
82
104
|
findPhoneBookContacts: (params: api.FindPhoneBookContactsParams, headers: api.FindPhoneBookContactsHeaders) => Promise<api.FindPhoneBookContactsData>;
|
|
83
105
|
updatePhoneBookContact: (urlParams: api.UpdatePhoneBookContactUrlParams, body: api.UpdatePhoneBookContactBody, headers: api.UpdatePhoneBookContactHeaders) => Promise<api.UpdatePhoneBookContactData>;
|
|
@@ -86,9 +108,12 @@ export declare class Api {
|
|
|
86
108
|
findPhotoOrders: (params: api.FindPhotoOrdersParams, headers: api.FindPhotoOrdersHeaders) => Promise<api.FindPhotoOrdersData>;
|
|
87
109
|
sendPhotoOrderFeedback: (urlParams: api.SendPhotoOrderFeedbackUrlParams, headers: api.SendPhotoOrderFeedbackHeaders) => Promise<api.SendPhotoOrderFeedbackData>;
|
|
88
110
|
terminatePhotoOrder: (urlParams: api.TerminatePhotoOrderUrlParams, headers: api.TerminatePhotoOrderHeaders) => Promise<api.TerminatePhotoOrderData>;
|
|
111
|
+
findRealtyPriceHistory: (params: api.FindRealtyPriceHistoryParams) => Promise<api.FindRealtyPriceHistoryData>;
|
|
89
112
|
findSimilarRealtyIdsById: (urlParams: api.FindSimilarRealtyIdsByIdUrlParams) => Promise<api.FindSimilarRealtyIdsByIdData>;
|
|
90
113
|
subscribeToRealtyUpdates: (body: api.SubscribeToRealtyUpdatesBody) => Promise<api.SubscribeToRealtyUpdatesData>;
|
|
91
114
|
approveCloseServiceRequest: (urlParams: api.ApproveCloseServiceRequestUrlParams, body: api.ApproveCloseServiceRequestBody, headers: api.ApproveCloseServiceRequestHeaders) => Promise<api.ApproveCloseServiceRequestData>;
|
|
115
|
+
findBuyerRejectionReasonStatistic: (urlParams: api.FindBuyerRejectionReasonStatisticUrlParams, params: api.FindBuyerRejectionReasonStatisticParams, headers: api.FindBuyerRejectionReasonStatisticHeaders) => Promise<api.FindBuyerRejectionReasonStatisticData>;
|
|
116
|
+
findBuyerStatusStatistic: (urlParams: api.FindBuyerStatusStatisticUrlParams, params: api.FindBuyerStatusStatisticParams, headers: api.FindBuyerStatusStatisticHeaders) => Promise<api.FindBuyerStatusStatisticData>;
|
|
92
117
|
callbackServiceRequest: (urlParams: api.CallbackServiceRequestUrlParams, headers: api.CallbackServiceRequestHeaders) => Promise<api.CallbackServiceRequestData>;
|
|
93
118
|
closeServiceRequest: (urlParams: api.CloseServiceRequestUrlParams, body: api.CloseServiceRequestBody, headers: api.CloseServiceRequestHeaders) => Promise<api.CloseServiceRequestData>;
|
|
94
119
|
completeServiceRequestModeration: (urlParams: api.CompleteServiceRequestModerationUrlParams, headers: api.CompleteServiceRequestModerationHeaders) => Promise<api.CompleteServiceRequestModerationData>;
|
|
@@ -97,6 +122,7 @@ export declare class Api {
|
|
|
97
122
|
createServiceRequestByCrossSaleId: (urlParams: api.CreateServiceRequestByCrossSaleIdUrlParams, headers: api.CreateServiceRequestByCrossSaleIdHeaders) => Promise<api.CreateServiceRequestByCrossSaleIdData>;
|
|
98
123
|
createServiceRequestActivity: (body: api.CreateServiceRequestActivityBody, headers: api.CreateServiceRequestActivityHeaders) => Promise<api.CreateServiceRequestActivityData>;
|
|
99
124
|
createServiceRequestCategorizedFile: (urlParams: api.CreateServiceRequestCategorizedFileUrlParams, body: api.CreateServiceRequestCategorizedFileBody, headers: api.CreateServiceRequestCategorizedFileHeaders) => Promise<api.CreateServiceRequestCategorizedFileData>;
|
|
125
|
+
createServiceRequestSellerReport: (urlParams: api.CreateServiceRequestSellerReportUrlParams, body: api.CreateServiceRequestSellerReportBody, headers: api.CreateServiceRequestSellerReportHeaders) => Promise<api.CreateServiceRequestSellerReportData>;
|
|
100
126
|
deferServiceRequest: (body: api.DeferServiceRequestBody, headers: api.DeferServiceRequestHeaders) => Promise<api.DeferServiceRequestData>;
|
|
101
127
|
deleteServiceRequestCategorizedFile: (urlParams: api.DeleteServiceRequestCategorizedFileUrlParams, headers: api.DeleteServiceRequestCategorizedFileHeaders) => Promise<api.DeleteServiceRequestCategorizedFileData>;
|
|
102
128
|
deleteServiceRequestReportForSeller: (urlParams: api.DeleteServiceRequestReportForSellerUrlParams, headers: api.DeleteServiceRequestReportForSellerHeaders) => Promise<api.DeleteServiceRequestReportForSellerData>;
|
|
@@ -111,6 +137,7 @@ export declare class Api {
|
|
|
111
137
|
findServiceRequestShortInfoById: (urlParams: api.FindServiceRequestShortInfoByIdUrlParams, headers: api.FindServiceRequestShortInfoByIdHeaders) => Promise<api.FindServiceRequestShortInfoByIdData>;
|
|
112
138
|
findServiceRequestStatisticsById: (urlParams: api.FindServiceRequestStatisticsByIdUrlParams, headers: api.FindServiceRequestStatisticsByIdHeaders) => Promise<api.FindServiceRequestStatisticsByIdData>;
|
|
113
139
|
findServiceRequestCategorizedFiles: (urlParams: api.FindServiceRequestCategorizedFilesUrlParams, params: api.FindServiceRequestCategorizedFilesParams, headers: api.FindServiceRequestCategorizedFilesHeaders) => Promise<api.FindServiceRequestCategorizedFilesData>;
|
|
140
|
+
findServiceRequestCategoryById: (urlParams: api.FindServiceRequestCategoryByIdUrlParams, headers: api.FindServiceRequestCategoryByIdHeaders, params?: api.FindServiceRequestCategoryByIdParams | undefined) => Promise<api.FindServiceRequestCategoryByIdData>;
|
|
114
141
|
findServiceRequestCategorizedFileCreatedDate: (urlParams: api.FindServiceRequestCategorizedFileCreatedDateUrlParams, headers: api.FindServiceRequestCategorizedFileCreatedDateHeaders) => Promise<api.FindServiceRequestCategorizedFileCreatedDateData>;
|
|
115
142
|
findPriceHistoryAnalyticsById: (urlParams: api.FindPriceHistoryAnalyticsByIdUrlParams, headers: api.FindPriceHistoryAnalyticsByIdHeaders) => Promise<api.FindPriceHistoryAnalyticsByIdData>;
|
|
116
143
|
findServiceRequestSellerReports: (urlParams: api.FindServiceRequestSellerReportsUrlParams, params: api.FindServiceRequestSellerReportsParams, headers: api.FindServiceRequestSellerReportsHeaders) => Promise<api.FindServiceRequestSellerReportsData>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ServiceRequest } from './ServiceRequest';
|
|
2
2
|
import { User } from './User';
|
|
3
|
+
import { Call } from './Call';
|
|
3
4
|
export declare enum BuyerStatus {
|
|
4
5
|
Incoming = "incoming",
|
|
5
6
|
ShowCoordination = "show_coordination",
|
|
@@ -46,4 +47,9 @@ export declare type Buyer = {
|
|
|
46
47
|
source?: string;
|
|
47
48
|
statusDeadlineAt?: string;
|
|
48
49
|
updatedAt?: string;
|
|
50
|
+
calls: Call[];
|
|
51
|
+
};
|
|
52
|
+
export declare type BuyerPhone = {
|
|
53
|
+
name: string;
|
|
54
|
+
phone: string;
|
|
49
55
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BuyerStatus, BuyerRealtyShowStatus } from './Buyer';
|
|
2
|
+
export declare type BuyerStatusHistory = {
|
|
3
|
+
id: number;
|
|
4
|
+
status: BuyerStatus;
|
|
5
|
+
changedAt: string;
|
|
6
|
+
deadlineAt: string;
|
|
7
|
+
realtyShowData: {
|
|
8
|
+
status: BuyerRealtyShowStatus;
|
|
9
|
+
scheduledAt: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -10,7 +10,7 @@ export declare enum CallDefaultTelephony {
|
|
|
10
10
|
Zadarma = "zadarma"
|
|
11
11
|
}
|
|
12
12
|
export declare type Call = {
|
|
13
|
-
callTask
|
|
13
|
+
callTask?: Partial<CallTask> & {
|
|
14
14
|
id: number;
|
|
15
15
|
};
|
|
16
16
|
createdAt: string;
|
|
@@ -20,7 +20,7 @@ export declare type Call = {
|
|
|
20
20
|
id: number;
|
|
21
21
|
number: string;
|
|
22
22
|
};
|
|
23
|
-
hasComments
|
|
23
|
+
hasComments?: boolean;
|
|
24
24
|
id: number;
|
|
25
25
|
inProgress: boolean;
|
|
26
26
|
redirectCount: number;
|
|
@@ -18,7 +18,12 @@ export declare enum CallTaskStatus {
|
|
|
18
18
|
Outgoing = "outgoing"
|
|
19
19
|
}
|
|
20
20
|
export declare enum CallTaskReason {
|
|
21
|
+
HasOwnRealtor = "has_own_realtor",
|
|
22
|
+
Rent = "rent",
|
|
23
|
+
NewComplex = "new_complex",
|
|
24
|
+
Error = "error",
|
|
21
25
|
WrongGeo = "wrong_geo",
|
|
26
|
+
QualityAssurance = "quality_assurance",
|
|
22
27
|
Double = "double",
|
|
23
28
|
Agent = "agent",
|
|
24
29
|
BuyingOrSellingPart = "buying_or_selling_part",
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export declare type MotivationSellMinCommission = {
|
|
2
|
+
categoryName: string;
|
|
3
|
+
minPrice: number;
|
|
4
|
+
minCommissionPercent: number;
|
|
5
|
+
recommendedCommissionPercent: number;
|
|
6
|
+
minCommissionAmount: number;
|
|
7
|
+
};
|
|
8
|
+
export declare type MotivationCommonMinCommission = {
|
|
9
|
+
categoryName: string;
|
|
10
|
+
minPrice: number;
|
|
11
|
+
minCommission: number;
|
|
12
|
+
minCommissionUnit: string;
|
|
13
|
+
legalDiligencePrice: number;
|
|
14
|
+
totalMinCommission: number;
|
|
15
|
+
};
|
|
16
|
+
export declare type MotivationMinCommission = {
|
|
17
|
+
sell: Array<MotivationSellMinCommission>;
|
|
18
|
+
buySecondary: Array<MotivationCommonMinCommission>;
|
|
19
|
+
legalSupport: Array<MotivationCommonMinCommission>;
|
|
20
|
+
};
|
|
21
|
+
export declare type MotivationStep = {
|
|
22
|
+
name: string;
|
|
23
|
+
val: number;
|
|
24
|
+
bonus: number;
|
|
25
|
+
bonusTrainee?: number;
|
|
26
|
+
};
|
|
27
|
+
export declare enum MotivationServiceTypeValues {
|
|
28
|
+
Sell = "sell",
|
|
29
|
+
BuySecondary = "buy_secondary",
|
|
30
|
+
BuyNew = "buy_new",
|
|
31
|
+
LegalSupport = "legal_support"
|
|
32
|
+
}
|
|
33
|
+
export declare type ExpertBonusCalculatingData = {
|
|
34
|
+
stepName: string;
|
|
35
|
+
commissionPart: number;
|
|
36
|
+
bonusPercent: number;
|
|
37
|
+
bonus: number;
|
|
38
|
+
};
|
|
39
|
+
export declare type MotivationCommission = {
|
|
40
|
+
minCommission: number;
|
|
41
|
+
recommendedCommission: number;
|
|
42
|
+
commission: number;
|
|
43
|
+
lowCommissionBonusFine: number;
|
|
44
|
+
additionalHighCommissionBonus: number;
|
|
45
|
+
additionalBonusOver2M: number;
|
|
46
|
+
expertBonusBySteps: number;
|
|
47
|
+
expertBonusPercentBySteps: number;
|
|
48
|
+
expertBonus: number;
|
|
49
|
+
expertBonusPercent: number;
|
|
50
|
+
expertBonusPercentCalculation: ExpertBonusCalculatingData[];
|
|
51
|
+
legalDiligencePrice?: number;
|
|
52
|
+
mentorLowCommissionBonusFine?: number;
|
|
53
|
+
mentorAdditionalHighCommissionBonus?: number;
|
|
54
|
+
mentorBonus?: number;
|
|
55
|
+
mentorBonusPercent?: number;
|
|
56
|
+
mentorBonusBySteps?: number;
|
|
57
|
+
mentorBonusPercentBySteps?: number;
|
|
58
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export declare type PayslipLevel = {
|
|
2
|
+
number: number;
|
|
3
|
+
revenue: number;
|
|
4
|
+
percent?: number;
|
|
5
|
+
baseCommissionSum?: number;
|
|
6
|
+
bonus?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare type Payslip = {
|
|
9
|
+
serviceRequestId: number;
|
|
10
|
+
advanceDate?: string;
|
|
11
|
+
allRelevantDeals?: number[];
|
|
12
|
+
baseBonusAll?: number;
|
|
13
|
+
baseBonusPercentAll?: number;
|
|
14
|
+
baseComission?: number;
|
|
15
|
+
basePercent?: number;
|
|
16
|
+
chargesComissionAboveTargetPercentAll?: number;
|
|
17
|
+
chargesComissionBelowMinimumAll?: number;
|
|
18
|
+
chargesComissionBelowTargetPercentAll?: number;
|
|
19
|
+
closingDate?: string;
|
|
20
|
+
comissionAboveTargetPercent?: number;
|
|
21
|
+
comissionBelowMinimum?: number;
|
|
22
|
+
comissionBelowTargetPercent?: number;
|
|
23
|
+
createdAt?: string;
|
|
24
|
+
curatorId?: number;
|
|
25
|
+
dealDate?: string;
|
|
26
|
+
dealId?: number;
|
|
27
|
+
dealStatus?: string;
|
|
28
|
+
dealType?: string;
|
|
29
|
+
effectiveBonusAll?: number;
|
|
30
|
+
effectiveBonusPercentAll?: number;
|
|
31
|
+
effectivePercent?: number;
|
|
32
|
+
expectedExpertPayoutDate?: string;
|
|
33
|
+
extraPercent?: number;
|
|
34
|
+
finalBonus?: number;
|
|
35
|
+
finalPrice?: number;
|
|
36
|
+
financeAdjustment?: number;
|
|
37
|
+
financeComment?: string;
|
|
38
|
+
formalId?: string;
|
|
39
|
+
grossRevenue4MAll?: number;
|
|
40
|
+
ifAmnesty?: boolean;
|
|
41
|
+
ifBelowMinimum?: boolean;
|
|
42
|
+
ifFinalNotification?: boolean;
|
|
43
|
+
lawyerId?: number;
|
|
44
|
+
legalCharges?: number;
|
|
45
|
+
levels?: Array<PayslipLevel>;
|
|
46
|
+
mentorId?: number;
|
|
47
|
+
minNetComission?: number;
|
|
48
|
+
negativeAdjustmentFact?: number;
|
|
49
|
+
netComission?: number;
|
|
50
|
+
partnerCommission?: number;
|
|
51
|
+
payslipMeta?: {
|
|
52
|
+
createdAt: string;
|
|
53
|
+
updatedAt?: string;
|
|
54
|
+
};
|
|
55
|
+
plannedCommission?: number;
|
|
56
|
+
signedAt?: string;
|
|
57
|
+
supervisorId?: number;
|
|
58
|
+
targetPercentFrom?: number;
|
|
59
|
+
targetPercentTo?: number;
|
|
60
|
+
traineeAdjustmentFact?: number;
|
|
61
|
+
};
|
|
@@ -5,9 +5,11 @@ export * from './AvailableFunds';
|
|
|
5
5
|
export * from './Bill';
|
|
6
6
|
export * from './Buyer';
|
|
7
7
|
export * from './BuyerClosingReason';
|
|
8
|
+
export * from './BuyerStatusHistory';
|
|
8
9
|
export * from './Call';
|
|
9
10
|
export * from './CallProxy';
|
|
10
11
|
export * from './CallTask';
|
|
12
|
+
export * from './Comment';
|
|
11
13
|
export * from './Contact';
|
|
12
14
|
export * from './Contract';
|
|
13
15
|
export * from './ContractDocument';
|
|
@@ -24,16 +26,19 @@ export * from './GalleryImage';
|
|
|
24
26
|
export * from './Image';
|
|
25
27
|
export * from './Income';
|
|
26
28
|
export * from './InternalCrossSale';
|
|
29
|
+
export * from './Motivation';
|
|
30
|
+
export * from './Payslip';
|
|
27
31
|
export * from './PhoneBookContact';
|
|
28
32
|
export * from './PhotoOrder';
|
|
33
|
+
export * from './PriceHistory';
|
|
29
34
|
export * from './PriceHistoryAnalytics';
|
|
30
35
|
export * from './Realty';
|
|
31
36
|
export * from './RealtyOffer';
|
|
32
37
|
export * from './ServiceRequest';
|
|
33
38
|
export * from './ServiceRequestActivity';
|
|
39
|
+
export * from './ServiceRequestCategorizedFile';
|
|
34
40
|
export * from './ServiceRequestSellerReport';
|
|
35
41
|
export * from './ServiceRequestShortInfo';
|
|
36
|
-
export * from './ServiceRequestCategorizedFile';
|
|
37
42
|
export * from './Shape';
|
|
38
43
|
export * from './SoldStatistic';
|
|
39
44
|
export * from './Task';
|
package/package.json
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
|
+
import { Buyer } from '../../../types';
|
|
3
|
+
|
|
4
|
+
type SuccessData = { success: true; data: Buyer };
|
|
5
|
+
type ErrorData = { success: false; data: { error: string } };
|
|
6
|
+
|
|
7
|
+
type ResultData = SuccessData['data'];
|
|
8
|
+
type ResultError = ErrorData['data']['error'];
|
|
9
|
+
|
|
10
|
+
export type CloseBuyerUrlParams = { id: number };
|
|
11
|
+
export type CloseBuyerHeaders = { 'x-auth-hc': string };
|
|
12
|
+
export type CloseBuyerBody = {
|
|
13
|
+
closingQuestionaryAnswers?: Array<{
|
|
14
|
+
questionId: string;
|
|
15
|
+
answerId: string;
|
|
16
|
+
comment?: string;
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
export type CloseBuyerData = AxiosResponse<ResultData>;
|
|
20
|
+
export type CloseBuyerError = AxiosError<ResultError>;
|
|
21
|
+
export type CloseBuyerConfig = {
|
|
22
|
+
baseURL?: string;
|
|
23
|
+
urlParams: CloseBuyerUrlParams;
|
|
24
|
+
headers: CloseBuyerHeaders;
|
|
25
|
+
body: CloseBuyerBody;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export function closeBuyerRequest({
|
|
29
|
+
baseURL = 'https://clients.homeapp.ru',
|
|
30
|
+
urlParams,
|
|
31
|
+
body,
|
|
32
|
+
headers,
|
|
33
|
+
}: CloseBuyerConfig) {
|
|
34
|
+
return axios
|
|
35
|
+
.put(`/api/buyer/${urlParams.id}/close`, body, {
|
|
36
|
+
baseURL,
|
|
37
|
+
headers: { Accept: 'application/json', 'Content-Type': 'application/json', ...headers },
|
|
38
|
+
transformResponse: [
|
|
39
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
40
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data : data.data.error),
|
|
41
|
+
],
|
|
42
|
+
})
|
|
43
|
+
.then((res: CloseBuyerData) => res)
|
|
44
|
+
.catch((err: CloseBuyerError) => {
|
|
45
|
+
throw err;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
|
+
import { Buyer } from '../../../types';
|
|
3
|
+
import qs from 'qs';
|
|
4
|
+
import isNil from 'lodash/isNil';
|
|
5
|
+
|
|
6
|
+
type SuccessData = { success: true; data: Buyer };
|
|
7
|
+
type ErrorData = { success: false; data: { error: string } };
|
|
8
|
+
|
|
9
|
+
type ResultData = SuccessData['data'];
|
|
10
|
+
type ResultError = ErrorData['data']['error'];
|
|
11
|
+
|
|
12
|
+
export type FindBuyerByIdUrlParams = { id: number };
|
|
13
|
+
export type FindBuyerByIdParams = { include?: Array<'sharing.fromExpert'> };
|
|
14
|
+
export type FindBuyerByIdHeaders = { 'x-auth-hc': string };
|
|
15
|
+
export type FindBuyerByIdData = AxiosResponse<ResultData>;
|
|
16
|
+
export type FindBuyerByIdError = AxiosError<ResultError>;
|
|
17
|
+
|
|
18
|
+
export type FindBuyerByIdConfig = {
|
|
19
|
+
baseURL?: string;
|
|
20
|
+
urlParams: FindBuyerByIdUrlParams;
|
|
21
|
+
headers: FindBuyerByIdHeaders;
|
|
22
|
+
params: FindBuyerByIdParams;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export function findBuyerByIdRequest({
|
|
26
|
+
baseURL = 'https://clients.homeapp.ru',
|
|
27
|
+
urlParams,
|
|
28
|
+
headers,
|
|
29
|
+
params,
|
|
30
|
+
}: FindBuyerByIdConfig) {
|
|
31
|
+
const includePostfix = !isNil(params.include)
|
|
32
|
+
? `?${qs.stringify({ include: params.include }, { arrayFormat: 'brackets' })}`
|
|
33
|
+
: '';
|
|
34
|
+
|
|
35
|
+
return axios
|
|
36
|
+
.get(`/api/service-request/${urlParams.id}${includePostfix}`, {
|
|
37
|
+
baseURL,
|
|
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: FindBuyerByIdData) => res)
|
|
45
|
+
.catch((err: FindBuyerByIdError) => {
|
|
46
|
+
throw err;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
|
+
import qs from 'qs';
|
|
3
|
+
import { BuyerStatusHistory } from '../../../types';
|
|
4
|
+
|
|
5
|
+
type SuccessData = { success: true; data: BuyerStatusHistory[]; pageParams: { length: number; page: number } };
|
|
6
|
+
type ErrorData = { success: false; data: { error: string } };
|
|
7
|
+
|
|
8
|
+
type ResultData = { ids: number[]; byId: Record<string, BuyerStatusHistory>; meta: { total: number } };
|
|
9
|
+
type ResultError = string;
|
|
10
|
+
|
|
11
|
+
export type FindBuyerStatusesHeaders = { 'x-auth-hc': string };
|
|
12
|
+
export type FindBuyerStatusesParams = {
|
|
13
|
+
limits?: { page?: number; count?: number | 'all' };
|
|
14
|
+
sorting?: { type: 'changedAt' | 'deadlineAt'; direction: 'asc' | 'desc' };
|
|
15
|
+
};
|
|
16
|
+
export type FindBuyerStatusesData = AxiosResponse<ResultData>;
|
|
17
|
+
export type FindBuyerStatusesError = AxiosError<ResultError>;
|
|
18
|
+
export type FindBuyerStatusesUrlParams = { id: number };
|
|
19
|
+
export type FindBuyerStatusesConfig = {
|
|
20
|
+
baseURL?: string;
|
|
21
|
+
headers: FindBuyerStatusesHeaders;
|
|
22
|
+
urlParams: FindBuyerStatusesUrlParams;
|
|
23
|
+
params: FindBuyerStatusesParams;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export function findBuyerStatusesRequest({
|
|
27
|
+
baseURL = 'https://clients.homeapp.ru',
|
|
28
|
+
urlParams,
|
|
29
|
+
headers,
|
|
30
|
+
params,
|
|
31
|
+
}: FindBuyerStatusesConfig) {
|
|
32
|
+
return axios
|
|
33
|
+
.get(`/api/buyer/${urlParams.id}/status`, {
|
|
34
|
+
baseURL,
|
|
35
|
+
params,
|
|
36
|
+
paramsSerializer: params => qs.stringify(params, { arrayFormat: 'brackets' }),
|
|
37
|
+
headers: { Accept: 'application/json', ...headers },
|
|
38
|
+
transformResponse: [
|
|
39
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
40
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => {
|
|
41
|
+
if (data.success) {
|
|
42
|
+
const ids: ResultData['ids'] = [];
|
|
43
|
+
const byId: ResultData['byId'] = {};
|
|
44
|
+
|
|
45
|
+
data.data.forEach(entity => {
|
|
46
|
+
byId[entity.id] = entity;
|
|
47
|
+
ids.push(entity.id);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
return { ids, byId, meta: { total: data.pageParams.length } };
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return data.data.error;
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
})
|
|
57
|
+
.then((res: FindBuyerStatusesData) => res)
|
|
58
|
+
.catch((err: FindBuyerStatusesError) => {
|
|
59
|
+
throw err;
|
|
60
|
+
});
|
|
61
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
|
+
import { BuyerPhone } from '../../../types';
|
|
3
|
+
import { nanoid } from 'nanoid/non-secure';
|
|
4
|
+
|
|
5
|
+
type SuccessData = { success: true; data: BuyerPhone[] };
|
|
6
|
+
type ErrorData = { success: false; data: { error: string } };
|
|
7
|
+
|
|
8
|
+
type ResultData = { ids: string[]; byId: Record<string, BuyerPhone & { _id: string }>; meta: { total: number } };
|
|
9
|
+
type ResultError = string;
|
|
10
|
+
|
|
11
|
+
export type FindBuyerUniquePhonesHeaders = { 'x-auth-hc': string };
|
|
12
|
+
export type FindBuyerUniquePhonesData = AxiosResponse<ResultData>;
|
|
13
|
+
export type FindBuyerUniquePhonesError = AxiosError<ResultError>;
|
|
14
|
+
export type FindBuyerUniquePhonesConfig = {
|
|
15
|
+
baseURL?: string;
|
|
16
|
+
headers: FindBuyerUniquePhonesHeaders;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export function findBuyerUniquePhonesRequest({
|
|
20
|
+
baseURL = 'https://clients.homeapp.ru',
|
|
21
|
+
headers,
|
|
22
|
+
}: FindBuyerUniquePhonesConfig) {
|
|
23
|
+
return axios
|
|
24
|
+
.get(`/api/buyer/unique-phones`, {
|
|
25
|
+
baseURL,
|
|
26
|
+
headers: { Accept: 'application/json', ...headers },
|
|
27
|
+
transformResponse: [
|
|
28
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
29
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => {
|
|
30
|
+
if (data.success) {
|
|
31
|
+
const ids: ResultData['ids'] = [];
|
|
32
|
+
const byId: ResultData['byId'] = {};
|
|
33
|
+
|
|
34
|
+
data.data.forEach(entity => {
|
|
35
|
+
const _id = nanoid();
|
|
36
|
+
byId[_id] = { ...entity, _id };
|
|
37
|
+
ids.push(_id);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
return { ids, byId, meta: { total: ids.length } };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return data.data.error;
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
})
|
|
47
|
+
.then((res: FindBuyerUniquePhonesData) => res)
|
|
48
|
+
.catch((err: FindBuyerUniquePhonesError) => {
|
|
49
|
+
throw err;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
2
|
import qs from 'qs';
|
|
3
|
-
import { Buyer } from '../../../types';
|
|
3
|
+
import { Buyer, BuyerStatus } from '../../../types';
|
|
4
4
|
|
|
5
5
|
type SuccessData = { success: true; data: Buyer[]; pageParams: { length: number; page: number } };
|
|
6
6
|
type ErrorData = { success: false; data: { error: string } };
|
|
@@ -11,9 +11,24 @@ type ResultError = string;
|
|
|
11
11
|
export type FindBuyersHeaders = { 'x-auth-hc': string };
|
|
12
12
|
export type FindBuyersParams = {
|
|
13
13
|
filter?: {
|
|
14
|
-
'serviceRequest.curator.groupLead.id'?: number | 'null' | 'notnull';
|
|
15
14
|
'serviceRequest.id'?: number;
|
|
15
|
+
'serviceRequest.realty.address.fullAddress'?: string;
|
|
16
|
+
'serviceRequest.curator.groupLead.id'?: number | 'null' | 'notnull';
|
|
16
17
|
query?: string;
|
|
18
|
+
'serviceRequest.curator.id'?: string;
|
|
19
|
+
status?: BuyerStatus | BuyerStatus[];
|
|
20
|
+
id?: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
statusDeadlineAt?:
|
|
23
|
+
| {
|
|
24
|
+
from?: string;
|
|
25
|
+
to?: string;
|
|
26
|
+
}
|
|
27
|
+
| 'notnull';
|
|
28
|
+
createdAt?: {
|
|
29
|
+
from?: string;
|
|
30
|
+
to?: string;
|
|
31
|
+
};
|
|
17
32
|
};
|
|
18
33
|
limits?: {
|
|
19
34
|
page?: number;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import axios, { AxiosResponse, AxiosError, AxiosTransformer } from 'axios';
|
|
2
|
+
import { Buyer } from '../../../types';
|
|
3
|
+
|
|
4
|
+
type SuccessData = { success: true; data: Buyer };
|
|
5
|
+
type ErrorData = { success: false; data: { error: string } };
|
|
6
|
+
|
|
7
|
+
type ResultData = SuccessData['data'];
|
|
8
|
+
type ResultError = ErrorData['data']['error'];
|
|
9
|
+
|
|
10
|
+
export type ResetBuyerStatusTimerUrlParams = { id: number };
|
|
11
|
+
export type ResetBuyerStatusTimerHeaders = { 'x-auth-hc': string };
|
|
12
|
+
export type ResetBuyerStatusTimerData = AxiosResponse<ResultData>;
|
|
13
|
+
export type ResetBuyerStatusTimerError = AxiosError<ResultError>;
|
|
14
|
+
export type ResetBuyerStatusTimerConfig = {
|
|
15
|
+
baseURL?: string;
|
|
16
|
+
urlParams: ResetBuyerStatusTimerUrlParams;
|
|
17
|
+
headers: ResetBuyerStatusTimerHeaders;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export function resetBuyerStatusTimerRequest({
|
|
21
|
+
baseURL = 'https://clients.homeapp.ru',
|
|
22
|
+
urlParams,
|
|
23
|
+
headers,
|
|
24
|
+
}: ResetBuyerStatusTimerConfig) {
|
|
25
|
+
return axios
|
|
26
|
+
.put(
|
|
27
|
+
`/api/buyer/${urlParams.id}/reset-status`,
|
|
28
|
+
{},
|
|
29
|
+
{
|
|
30
|
+
baseURL,
|
|
31
|
+
headers: { Accept: 'application/json', 'Content-Type': 'application/json', ...headers },
|
|
32
|
+
transformResponse: [
|
|
33
|
+
...(axios.defaults.transformResponse as AxiosTransformer[]),
|
|
34
|
+
(data: SuccessData | ErrorData): ResultData | ResultError => (data.success ? data.data : data.data.error),
|
|
35
|
+
],
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
.then((res: ResetBuyerStatusTimerData) => res)
|
|
39
|
+
.catch((err: ResetBuyerStatusTimerError) => {
|
|
40
|
+
throw err;
|
|
41
|
+
});
|
|
42
|
+
}
|