@hapl/api-queries 0.1.190 → 0.1.191

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,16 @@
1
+ # v0.1.191 (Fri Oct 07 2022)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - FE-1416: добавлена ручка на список мероприятий [#118](https://github.com/homeappcorporate/api-queries/pull/118) ([@alexandropavlov](https://github.com/alexandropavlov) [@abd2561024](https://github.com/abd2561024))
6
+
7
+ #### Authors: 2
8
+
9
+ - Alexander Pavlov ([@alexandropavlov](https://github.com/alexandropavlov))
10
+ - Andrey Romashin ([@abd2561024](https://github.com/abd2561024))
11
+
12
+ ---
13
+
1
14
  # v0.1.190 (Thu Oct 06 2022)
2
15
 
3
16
  #### 🐛 Bug Fix
@@ -1364,6 +1364,48 @@ function findEventByIdRequest(_ref) {
1364
1364
  });
1365
1365
  }
1366
1366
 
1367
+ function findEventsRequest(_ref) {
1368
+ var _ref$baseURL = _ref.baseURL,
1369
+ baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
1370
+ headers = _ref.headers,
1371
+ params = _ref.params;
1372
+ return axios.get('/api/site/event', {
1373
+ baseURL: baseURL,
1374
+ params: params,
1375
+ paramsSerializer: function paramsSerializer(params) {
1376
+ return qs.stringify(params, {
1377
+ arrayFormat: 'brackets'
1378
+ });
1379
+ },
1380
+ headers: _extends({
1381
+ Accept: 'application/json'
1382
+ }, headers),
1383
+ transformResponse: [].concat(axios.defaults.transformResponse, [function (data) {
1384
+ if (data.success) {
1385
+ var ids = [];
1386
+ var byId = {};
1387
+ data.data.forEach(function (entity) {
1388
+ byId[entity.id] = entity;
1389
+ ids.push(entity.id);
1390
+ });
1391
+ return {
1392
+ ids: ids,
1393
+ byId: byId,
1394
+ meta: {
1395
+ total: data.pageParams.length
1396
+ }
1397
+ };
1398
+ }
1399
+
1400
+ return data.data.error;
1401
+ }])
1402
+ }).then(function (res) {
1403
+ return res;
1404
+ })["catch"](function (err) {
1405
+ throw err;
1406
+ });
1407
+ }
1408
+
1367
1409
  function createExpertCaseRequest(_ref) {
1368
1410
  var _ref$baseURL = _ref.baseURL,
1369
1411
  baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
@@ -4655,6 +4697,14 @@ var Api = function Api(baseURL) {
4655
4697
  headers: headers,
4656
4698
  baseURL: _this.baseURL
4657
4699
  });
4700
+ };
4701
+
4702
+ this.findEvents = function (params, headers) {
4703
+ return findEventsRequest({
4704
+ params: params,
4705
+ headers: headers,
4706
+ baseURL: _this.baseURL
4707
+ });
4658
4708
  }; // expert
4659
4709
 
4660
4710
 
@@ -5314,6 +5364,7 @@ var index = {
5314
5364
  terminateDealRequest: terminateDealRequest,
5315
5365
  updateDealRequest: updateDealRequest,
5316
5366
  findEventByIdRequest: findEventByIdRequest,
5367
+ findEventsRequest: findEventsRequest,
5317
5368
  createExpertCaseRequest: createExpertCaseRequest,
5318
5369
  createExpertReviewRequest: createExpertReviewRequest,
5319
5370
  findExpertByIdRequest: findExpertByIdRequest,