@hapl/api-queries 0.1.180--canary.108.2a5dac2.0 → 0.1.180

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 CHANGED
@@ -1,3 +1,15 @@
1
+ # v0.1.180 (Tue Aug 09 2022)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - FE-1363: добавлена ручка списка аналитики изменения цены [#107](https://github.com/homeappcorporate/api-queries/pull/107) ([@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.179 (Tue Jul 26 2022)
2
14
 
3
15
  #### 🐛 Bug Fix
@@ -2351,6 +2351,46 @@ function findServiceRequestCategorizedFileCreatedDateRequest(_ref) {
2351
2351
  });
2352
2352
  }
2353
2353
 
2354
+ function findPriceHistoryAnalyticsByIdRequest(_ref) {
2355
+ var _ref$baseURL = _ref.baseURL,
2356
+ baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
2357
+ urlParams = _ref.urlParams,
2358
+ headers = _ref.headers;
2359
+ return axios.get("api/analytics/price-history/" + urlParams.serviceRequestId, {
2360
+ baseURL: baseURL,
2361
+ headers: _extends({
2362
+ Accept: 'application/json'
2363
+ }, headers),
2364
+ transformResponse: [].concat(axios.defaults.transformResponse, [function (data) {
2365
+ if (!data.success) {
2366
+ return data.data.error || data.data.message;
2367
+ }
2368
+
2369
+ var ids = [];
2370
+ var byId = {};
2371
+ data.data.forEach(function (entity) {
2372
+ var _id = nonSecure.nanoid();
2373
+
2374
+ byId[_id] = _extends({}, entity, {
2375
+ _id: _id
2376
+ });
2377
+ ids.push(_id);
2378
+ });
2379
+ return {
2380
+ ids: ids,
2381
+ byId: byId,
2382
+ meta: {
2383
+ total: ids.length
2384
+ }
2385
+ };
2386
+ }])
2387
+ }).then(function (res) {
2388
+ return res;
2389
+ })["catch"](function (err) {
2390
+ throw err;
2391
+ });
2392
+ }
2393
+
2354
2394
  function returnDeferredServiceRequestRequest(_ref) {
2355
2395
  var _ref$baseURL = _ref.baseURL,
2356
2396
  baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
@@ -2588,8 +2628,7 @@ function findUserByIdRequest(_ref) {
2588
2628
  var _ref$baseURL = _ref.baseURL,
2589
2629
  baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
2590
2630
  urlParams = _ref.urlParams,
2591
- _ref$headers = _ref.headers,
2592
- headers = _ref$headers === void 0 ? {} : _ref$headers;
2631
+ headers = _ref.headers;
2593
2632
  return axios.get('/api/user/' + urlParams.id, {
2594
2633
  baseURL: baseURL,
2595
2634
  headers: _extends({
@@ -4720,6 +4759,14 @@ var Api = function Api(baseURL) {
4720
4759
  });
4721
4760
  };
4722
4761
 
4762
+ this.findPriceHistoryAnalyticsById = function (urlParams, headers) {
4763
+ return findPriceHistoryAnalyticsByIdRequest({
4764
+ urlParams: urlParams,
4765
+ headers: headers,
4766
+ baseURL: _this.baseURL
4767
+ });
4768
+ };
4769
+
4723
4770
  this.findServiceRequestSellerReports = function (urlParams, params, headers) {
4724
4771
  return findServiceRequestSellerReportsRequest({
4725
4772
  urlParams: urlParams,
@@ -5018,6 +5065,7 @@ var index = {
5018
5065
  findServiceRequestStatisticsByIdRequest: findServiceRequestStatisticsByIdRequest,
5019
5066
  findServiceRequestCategorizedFilesRequest: findServiceRequestCategorizedFilesRequest,
5020
5067
  findServiceRequestCategorizedFileCreatedDateRequest: findServiceRequestCategorizedFileCreatedDateRequest,
5068
+ findPriceHistoryAnalyticsByIdRequest: findPriceHistoryAnalyticsByIdRequest,
5021
5069
  returnDeferredServiceRequestRequest: returnDeferredServiceRequestRequest,
5022
5070
  sendServiceRequestToModerationRequest: sendServiceRequestToModerationRequest,
5023
5071
  startServiceRequestModerationRequest: startServiceRequestModerationRequest,