@hapl/api-queries 0.1.128 → 0.1.131

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,39 @@
1
+ # v0.1.131 (Fri Feb 11 2022)
2
+
3
+ #### ⚠️ Pushed to `main`
4
+
5
+ - добавил query фильтр ([@yeshkarluk](https://github.com/yeshkarluk))
6
+
7
+ #### Authors: 1
8
+
9
+ - Ivan Ignatev ([@yeshkarluk](https://github.com/yeshkarluk))
10
+
11
+ ---
12
+
13
+ # v0.1.130 (Fri Feb 11 2022)
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - fix: исправлен неверный метод публикации/депубликации ЗОУ [#62](https://github.com/homeappcorporate/api-queries/pull/62) ([@abd2561024](https://github.com/abd2561024))
18
+
19
+ #### Authors: 1
20
+
21
+ - Andrey Romashin ([@abd2561024](https://github.com/abd2561024))
22
+
23
+ ---
24
+
25
+ # v0.1.129 (Fri Feb 11 2022)
26
+
27
+ #### 🐛 Bug Fix
28
+
29
+ - список коллтасков [#61](https://github.com/homeappcorporate/api-queries/pull/61) ([@yeshkarluk](https://github.com/yeshkarluk))
30
+
31
+ #### Authors: 1
32
+
33
+ - Ivan Ignatev ([@yeshkarluk](https://github.com/yeshkarluk))
34
+
35
+ ---
36
+
1
37
  # v0.1.128 (Thu Feb 10 2022)
2
38
 
3
39
  #### 🐛 Bug Fix
@@ -503,6 +503,49 @@ function createCallTaskRequest(_ref) {
503
503
  });
504
504
  }
505
505
 
506
+ function findCallTasksRequest(_ref) {
507
+ var _ref$baseURL = _ref.baseURL,
508
+ baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
509
+ headers = _ref.headers,
510
+ params = _ref.params;
511
+ return axios.get('/api/calls/task', {
512
+ baseURL: baseURL,
513
+ params: params,
514
+ paramsSerializer: function paramsSerializer(params) {
515
+ return qs.stringify(params, {
516
+ arrayFormat: 'brackets'
517
+ });
518
+ },
519
+ headers: _extends({
520
+ Accept: 'application/json',
521
+ 'Content-Type': 'application/json'
522
+ }, headers),
523
+ transformResponse: [].concat(axios.defaults.transformResponse, [function (data) {
524
+ if (data.success) {
525
+ var ids = [];
526
+ var byId = {};
527
+ data.data.forEach(function (entity) {
528
+ byId[entity.id] = entity;
529
+ ids.push(entity.id);
530
+ });
531
+ return {
532
+ ids: ids,
533
+ byId: byId,
534
+ meta: {
535
+ total: data.pageParams.length
536
+ }
537
+ };
538
+ }
539
+
540
+ return data.data.error || data.data.message;
541
+ }])
542
+ }).then(function (res) {
543
+ return res;
544
+ })["catch"](function (err) {
545
+ throw err;
546
+ });
547
+ }
548
+
506
549
  function approveContractRequest(_ref) {
507
550
  var _ref$baseURL = _ref.baseURL,
508
551
  baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
@@ -1624,7 +1667,7 @@ function publishServiceRequest(_ref) {
1624
1667
  baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
1625
1668
  urlParams = _ref.urlParams,
1626
1669
  headers = _ref.headers;
1627
- return axios.patch("/api/service-request/publish/" + urlParams.id, {}, {
1670
+ return axios.post("/api/service-request/publish/" + urlParams.id, {}, {
1628
1671
  baseURL: baseURL,
1629
1672
  headers: _extends({
1630
1673
  Accept: 'application/json',
@@ -1648,7 +1691,7 @@ function depublishServiceRequest(_ref) {
1648
1691
  urlParams = _ref.urlParams,
1649
1692
  body = _ref.body,
1650
1693
  headers = _ref.headers;
1651
- return axios.patch("/api/service-request/depublish/" + urlParams.id, body, {
1694
+ return axios.post("/api/service-request/depublish/" + urlParams.id, body, {
1652
1695
  baseURL: baseURL,
1653
1696
  headers: _extends({
1654
1697
  Accept: 'application/json',
@@ -2977,6 +3020,14 @@ var Api = function Api(baseURL) {
2977
3020
  headers: headers,
2978
3021
  baseURL: _this.baseURL
2979
3022
  });
3023
+ };
3024
+
3025
+ this.findCallTasks = function (params, headers) {
3026
+ return findCallTasksRequest({
3027
+ params: params,
3028
+ headers: headers,
3029
+ baseURL: _this.baseURL
3030
+ });
2980
3031
  }; // contract
2981
3032
 
2982
3033
 
@@ -3448,6 +3499,7 @@ var index = {
3448
3499
  getOperatorStatusRequest: getOperatorStatusRequest,
3449
3500
  startOperatorWorkRequest: startOperatorWorkRequest,
3450
3501
  createCallTaskRequest: createCallTaskRequest,
3502
+ findCallTasksRequest: findCallTasksRequest,
3451
3503
  approveContractRequest: approveContractRequest,
3452
3504
  declineContractRequest: declineContractRequest,
3453
3505
  findContractsRequest: findContractsRequest,