@hapl/api-queries 0.1.114 → 0.1.115
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 +12 -0
- package/dist/api-queries.cjs.development.js +111 -21
- 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 +111 -21
- package/dist/api-queries.esm.js.map +1 -1
- package/dist/clients/v1/api/experts/findExperts/index.d.ts +22 -17
- package/dist/clients/v1/api/index.d.ts +2 -0
- package/dist/clients/v1/api/serviceRequest/findServiceRequestSellerReport/index.d.ts +42 -0
- package/dist/clients/v1/api/sold/findSoldStatistic/index.d.ts +25 -0
- package/dist/clients/v1/index.d.ts +2 -0
- package/dist/clients/v1/types/ServiceRequestSellerReport.d.ts +20 -0
- package/dist/clients/v1/types/SoldStatistic.d.ts +9 -0
- package/dist/clients/v1/types/User.d.ts +1 -0
- package/dist/clients/v1/types/index.d.ts +2 -0
- package/dist/clients/v2/api/realty/findRealtyById/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/clients/v1/api/experts/findExperts/index.ts +33 -29
- package/src/clients/v1/api/index.ts +3 -0
- package/src/clients/v1/api/serviceRequest/findServiceRequestSellerReport/index.ts +62 -0
- package/src/clients/v1/api/sold/findSoldStatistic/index.ts +35 -0
- package/src/clients/v1/index.ts +14 -0
- package/src/clients/v1/types/ServiceRequestSellerReport.ts +20 -0
- package/src/clients/v1/types/SoldStatistic.ts +10 -0
- package/src/clients/v1/types/User.ts +1 -0
- package/src/clients/v1/types/index.ts +2 -0
- package/src/clients/v2/api/realty/findRealtyById/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# v0.1.115 (Wed Feb 02 2022)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- добавлены ручки запроса статистики продаж в ЛК [#50](https://github.com/homeappcorporate/api-queries/pull/50) ([@abd2561024](https://github.com/abd2561024))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Andrey Romashin ([@abd2561024](https://github.com/abd2561024))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
1
13
|
# v0.1.114 (Wed Feb 02 2022)
|
|
2
14
|
|
|
3
15
|
#### 🐛 Bug Fix
|
|
@@ -597,31 +597,34 @@ function findExpertsRequest(_ref) {
|
|
|
597
597
|
return axios.get('/api/experts', {
|
|
598
598
|
baseURL: baseURL,
|
|
599
599
|
params: params,
|
|
600
|
+
paramsSerializer: function paramsSerializer(params) {
|
|
601
|
+
return qs.stringify(params, {
|
|
602
|
+
arrayFormat: 'brackets'
|
|
603
|
+
});
|
|
604
|
+
},
|
|
600
605
|
headers: {
|
|
601
606
|
Accept: 'application/json'
|
|
602
|
-
}
|
|
607
|
+
},
|
|
608
|
+
transformResponse: [].concat(axios.defaults.transformResponse, [function (data) {
|
|
609
|
+
if (!data.success) return data.data.error;
|
|
610
|
+
var ids = [];
|
|
611
|
+
var byId = {};
|
|
612
|
+
data.data.forEach(function (entity) {
|
|
613
|
+
byId[entity.id] = entity;
|
|
614
|
+
ids.push(entity.id);
|
|
615
|
+
});
|
|
616
|
+
return {
|
|
617
|
+
ids: ids,
|
|
618
|
+
byId: byId,
|
|
619
|
+
meta: {
|
|
620
|
+
total: data.pageParams.length
|
|
621
|
+
}
|
|
622
|
+
};
|
|
623
|
+
}])
|
|
603
624
|
}).then(function (res) {
|
|
604
|
-
|
|
605
|
-
data: {
|
|
606
|
-
byId: {},
|
|
607
|
-
ids: []
|
|
608
|
-
},
|
|
609
|
-
meta: {
|
|
610
|
-
total: res.data.pageParams.length
|
|
611
|
-
}
|
|
612
|
-
};
|
|
613
|
-
res.data.data.forEach(function (entity) {
|
|
614
|
-
data.data.byId[entity.id] = entity;
|
|
615
|
-
data.data.ids.push(entity.id);
|
|
616
|
-
});
|
|
617
|
-
return data;
|
|
625
|
+
return res;
|
|
618
626
|
})["catch"](function (err) {
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
var error = new Error(err.message);
|
|
622
|
-
error.status = (_err$response$status = (_err$response = err.response) == null ? void 0 : _err$response.status) != null ? _err$response$status : 520;
|
|
623
|
-
error.data = (_err$response$data$da = (_err$response2 = err.response) == null ? void 0 : _err$response2.data.data.error) != null ? _err$response$data$da : 'Unknown Error';
|
|
624
|
-
throw error;
|
|
627
|
+
throw err;
|
|
625
628
|
});
|
|
626
629
|
}
|
|
627
630
|
|
|
@@ -1168,6 +1171,46 @@ function findServiceRequestsRequest(_ref) {
|
|
|
1168
1171
|
});
|
|
1169
1172
|
}
|
|
1170
1173
|
|
|
1174
|
+
function findServiceRequestSellerReportRequest(_ref) {
|
|
1175
|
+
var _ref$baseURL = _ref.baseURL,
|
|
1176
|
+
baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
|
|
1177
|
+
urlParams = _ref.urlParams,
|
|
1178
|
+
headers = _ref.headers,
|
|
1179
|
+
params = _ref.params;
|
|
1180
|
+
return axios.get("/api/service-request/" + urlParams.id + "/report-for-seller", {
|
|
1181
|
+
baseURL: baseURL,
|
|
1182
|
+
params: params,
|
|
1183
|
+
paramsSerializer: function paramsSerializer(params) {
|
|
1184
|
+
return qs.stringify(params, {
|
|
1185
|
+
arrayFormat: 'brackets'
|
|
1186
|
+
});
|
|
1187
|
+
},
|
|
1188
|
+
headers: _extends({
|
|
1189
|
+
Accept: 'application/json'
|
|
1190
|
+
}, headers),
|
|
1191
|
+
transformResponse: [].concat(axios.defaults.transformResponse, [function (data) {
|
|
1192
|
+
if (!data.success) return data.data.error;
|
|
1193
|
+
var ids = [];
|
|
1194
|
+
var byId = {};
|
|
1195
|
+
data.data.forEach(function (entity) {
|
|
1196
|
+
byId[entity.id] = entity;
|
|
1197
|
+
ids.push(entity.id);
|
|
1198
|
+
});
|
|
1199
|
+
return {
|
|
1200
|
+
ids: ids,
|
|
1201
|
+
byId: byId,
|
|
1202
|
+
meta: {
|
|
1203
|
+
total: data.pageParams.length
|
|
1204
|
+
}
|
|
1205
|
+
};
|
|
1206
|
+
}])
|
|
1207
|
+
}).then(function (res) {
|
|
1208
|
+
return res;
|
|
1209
|
+
})["catch"](function (err) {
|
|
1210
|
+
throw err;
|
|
1211
|
+
});
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1171
1214
|
function findServiceRequestShortInfoRequest(_ref) {
|
|
1172
1215
|
var _ref$baseURL = _ref.baseURL,
|
|
1173
1216
|
baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
|
|
@@ -1399,6 +1442,25 @@ function startServiceRequestModerationForOldRealtyRequest(_ref) {
|
|
|
1399
1442
|
});
|
|
1400
1443
|
}
|
|
1401
1444
|
|
|
1445
|
+
function findSoldStatisticRequest(_ref) {
|
|
1446
|
+
var _ref$baseURL = _ref.baseURL,
|
|
1447
|
+
baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
|
|
1448
|
+
headers = _ref.headers;
|
|
1449
|
+
return axios.get('/api/sold/statistic', {
|
|
1450
|
+
baseURL: baseURL,
|
|
1451
|
+
headers: _extends({
|
|
1452
|
+
Accept: 'application/json'
|
|
1453
|
+
}, headers),
|
|
1454
|
+
transformResponse: [].concat(axios.defaults.transformResponse, [function (data) {
|
|
1455
|
+
return data.success ? data.data : data.data.error;
|
|
1456
|
+
}])
|
|
1457
|
+
}).then(function (res) {
|
|
1458
|
+
return res;
|
|
1459
|
+
})["catch"](function (err) {
|
|
1460
|
+
throw err;
|
|
1461
|
+
});
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1402
1464
|
function createUserRequest(_ref) {
|
|
1403
1465
|
var _ref$baseURL = _ref.baseURL,
|
|
1404
1466
|
baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
|
|
@@ -2192,6 +2254,14 @@ var ShapeType;
|
|
|
2192
2254
|
ShapeType["Microdistrict"] = "microdistrict";
|
|
2193
2255
|
})(ShapeType || (ShapeType = {}));
|
|
2194
2256
|
|
|
2257
|
+
var SoldStatisticTypes;
|
|
2258
|
+
|
|
2259
|
+
(function (SoldStatisticTypes) {
|
|
2260
|
+
SoldStatisticTypes["House"] = "house";
|
|
2261
|
+
SoldStatisticTypes["FlatNew"] = "flat_new";
|
|
2262
|
+
SoldStatisticTypes["FlatSecondary"] = "flat_secondary";
|
|
2263
|
+
})(SoldStatisticTypes || (SoldStatisticTypes = {}));
|
|
2264
|
+
|
|
2195
2265
|
var TaskStatus;
|
|
2196
2266
|
|
|
2197
2267
|
(function (TaskStatus) {
|
|
@@ -2922,6 +2992,23 @@ var Api = function Api(baseURL) {
|
|
|
2922
2992
|
headers: headers,
|
|
2923
2993
|
baseURL: _this.baseURL
|
|
2924
2994
|
});
|
|
2995
|
+
};
|
|
2996
|
+
|
|
2997
|
+
this.findServiceRequestSellerReport = function (urlParams, params, headers) {
|
|
2998
|
+
return findServiceRequestSellerReportRequest({
|
|
2999
|
+
urlParams: urlParams,
|
|
3000
|
+
params: params,
|
|
3001
|
+
headers: headers,
|
|
3002
|
+
baseURL: _this.baseURL
|
|
3003
|
+
});
|
|
3004
|
+
}; // sold
|
|
3005
|
+
|
|
3006
|
+
|
|
3007
|
+
this.findSoldStatistic = function (headers) {
|
|
3008
|
+
return findSoldStatisticRequest({
|
|
3009
|
+
headers: headers,
|
|
3010
|
+
baseURL: _this.baseURL
|
|
3011
|
+
});
|
|
2925
3012
|
}; // task
|
|
2926
3013
|
|
|
2927
3014
|
|
|
@@ -3034,6 +3121,7 @@ var index = {
|
|
|
3034
3121
|
findServiceRequestByIdRequest: findServiceRequestByIdRequest,
|
|
3035
3122
|
findServiceRequestDuplicatesRequest: findServiceRequestDuplicatesRequest,
|
|
3036
3123
|
findServiceRequestsRequest: findServiceRequestsRequest,
|
|
3124
|
+
findServiceRequestSellerReportRequest: findServiceRequestSellerReportRequest,
|
|
3037
3125
|
findServiceRequestShortInfoRequest: findServiceRequestShortInfoRequest,
|
|
3038
3126
|
findServiceRequestShortInfoByIdRequest: findServiceRequestShortInfoByIdRequest,
|
|
3039
3127
|
findServiceRequestShortInfoByDealIdRequest: findServiceRequestShortInfoByDealIdRequest,
|
|
@@ -3043,6 +3131,7 @@ var index = {
|
|
|
3043
3131
|
sendServiceRequestToModerationRequest: sendServiceRequestToModerationRequest,
|
|
3044
3132
|
startServiceRequestModerationRequest: startServiceRequestModerationRequest,
|
|
3045
3133
|
startServiceRequestModerationForOldRealtyRequest: startServiceRequestModerationForOldRealtyRequest,
|
|
3134
|
+
findSoldStatisticRequest: findSoldStatisticRequest,
|
|
3046
3135
|
createUserRequest: createUserRequest,
|
|
3047
3136
|
findUsersRequest: findUsersRequest,
|
|
3048
3137
|
findUserByIdRequest: findUserByIdRequest,
|
|
@@ -3121,6 +3210,7 @@ var index = {
|
|
|
3121
3210
|
get ServiceRequestActivityType () { return ServiceRequestActivityType; },
|
|
3122
3211
|
get ServiceRequestCategorizedFileCategory () { return ServiceRequestCategorizedFileCategory; },
|
|
3123
3212
|
get ShapeType () { return ShapeType; },
|
|
3213
|
+
get SoldStatisticTypes () { return SoldStatisticTypes; },
|
|
3124
3214
|
get TaskStatus () { return TaskStatus; },
|
|
3125
3215
|
get TaskImportance () { return TaskImportance; },
|
|
3126
3216
|
get TaskNotificationType () { return TaskNotificationType; },
|