@hapl/api-queries 0.1.114--canary.50.cae722c.0 → 0.1.114

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/api-queries.cjs.development.js +27 -118
  3. package/dist/api-queries.cjs.development.js.map +1 -1
  4. package/dist/api-queries.cjs.production.min.js +1 -1
  5. package/dist/api-queries.cjs.production.min.js.map +1 -1
  6. package/dist/api-queries.esm.js +27 -118
  7. package/dist/api-queries.esm.js.map +1 -1
  8. package/dist/clients/v1/api/experts/findExperts/index.d.ts +17 -22
  9. package/dist/clients/v1/api/index.d.ts +0 -2
  10. package/dist/clients/v1/dictionaries/ServiceRequestActivity.d.ts +5 -6
  11. package/dist/clients/v1/index.d.ts +0 -2
  12. package/dist/clients/v1/types/ServiceRequestActivity.d.ts +5 -6
  13. package/dist/clients/v1/types/User.d.ts +0 -1
  14. package/dist/clients/v1/types/index.d.ts +0 -2
  15. package/dist/clients/v2/api/realty/findRealtyById/index.d.ts +0 -1
  16. package/package.json +1 -1
  17. package/src/clients/v1/api/experts/findExperts/index.ts +29 -33
  18. package/src/clients/v1/api/index.ts +0 -3
  19. package/src/clients/v1/dictionaries/ServiceRequestActivity.ts +7 -8
  20. package/src/clients/v1/index.ts +0 -14
  21. package/src/clients/v1/types/ServiceRequestActivity.ts +5 -6
  22. package/src/clients/v1/types/User.ts +0 -1
  23. package/src/clients/v1/types/index.ts +0 -2
  24. package/src/clients/v2/api/realty/findRealtyById/index.ts +0 -1
  25. package/dist/clients/v1/api/serviceRequest/findServiceRequestSellerReport/index.d.ts +0 -42
  26. package/dist/clients/v1/api/sold/findSoldStatistic/index.d.ts +0 -25
  27. package/dist/clients/v1/types/ServiceRequestSellerReport.d.ts +0 -20
  28. package/dist/clients/v1/types/SoldStatistic.d.ts +0 -9
  29. package/src/clients/v1/api/serviceRequest/findServiceRequestSellerReport/index.ts +0 -62
  30. package/src/clients/v1/api/sold/findSoldStatistic/index.ts +0 -35
  31. package/src/clients/v1/types/ServiceRequestSellerReport.ts +0 -20
  32. package/src/clients/v1/types/SoldStatistic.ts +0 -10
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v0.1.114 (Wed Feb 02 2022)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - FE-1205: Поправлен словарь типов активити [#51](https://github.com/homeappcorporate/api-queries/pull/51) ([@alexandropavlov](https://github.com/alexandropavlov))
6
+
7
+ #### Authors: 1
8
+
9
+ - Alexander Pavlov ([@alexandropavlov](https://github.com/alexandropavlov))
10
+
11
+ ---
12
+
1
13
  # v0.1.113 (Fri Jan 28 2022)
2
14
 
3
15
  #### 🐛 Bug Fix
@@ -597,34 +597,31 @@ 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
- },
605
600
  headers: {
606
601
  Accept: 'application/json'
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
- }])
602
+ }
624
603
  }).then(function (res) {
625
- return res;
604
+ var data = {
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;
626
618
  })["catch"](function (err) {
627
- throw err;
619
+ var _err$response$status, _err$response, _err$response$data$da, _err$response2;
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;
628
625
  });
629
626
  }
630
627
 
@@ -1171,46 +1168,6 @@ function findServiceRequestsRequest(_ref) {
1171
1168
  });
1172
1169
  }
1173
1170
 
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
-
1214
1171
  function findServiceRequestShortInfoRequest(_ref) {
1215
1172
  var _ref$baseURL = _ref.baseURL,
1216
1173
  baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
@@ -1442,25 +1399,6 @@ function startServiceRequestModerationForOldRealtyRequest(_ref) {
1442
1399
  });
1443
1400
  }
1444
1401
 
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
-
1464
1402
  function createUserRequest(_ref) {
1465
1403
  var _ref$baseURL = _ref.baseURL,
1466
1404
  baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
@@ -2207,21 +2145,20 @@ var ServiceRequestActivityType;
2207
2145
  (function (ServiceRequestActivityType) {
2208
2146
  ServiceRequestActivityType["Comment"] = "comment";
2209
2147
  ServiceRequestActivityType["Edit"] = "edit";
2148
+ ServiceRequestActivityType["Transfer"] = "transfer";
2210
2149
  ServiceRequestActivityType["Call"] = "call";
2211
2150
  ServiceRequestActivityType["Task"] = "task";
2212
- ServiceRequestActivityType["Status"] = "status";
2213
- ServiceRequestActivityType["ObjectRequest"] = "object_request";
2214
2151
  ServiceRequestActivityType["Contract"] = "contract";
2215
- ServiceRequestActivityType["Publish"] = "publish";
2216
2152
  ServiceRequestActivityType["PublicationProblem"] = "publication-problem";
2217
- ServiceRequestActivityType["ContractExpired"] = "contract-expired";
2218
2153
  ServiceRequestActivityType["MarkedUp"] = "marked-up";
2219
- ServiceRequestActivityType["ExpertCreated"] = "expert-created";
2154
+ ServiceRequestActivityType["Published"] = "published";
2155
+ ServiceRequestActivityType["Republished"] = "republished";
2156
+ ServiceRequestActivityType["Depublished"] = "depublished";
2220
2157
  ServiceRequestActivityType["PriceChanged"] = "price-changed";
2221
2158
  ServiceRequestActivityType["RequestPriceDown"] = "request-price-down";
2159
+ ServiceRequestActivityType["ContractExpired"] = "contract-expired";
2222
2160
  ServiceRequestActivityType["CallTaskCreated"] = "call-task-created";
2223
2161
  ServiceRequestActivityType["RealtyShowScheduled"] = "realty-show-scheduled";
2224
- ServiceRequestActivityType["RealtyShowRescheduled"] = "realty-show-rescheduled";
2225
2162
  ServiceRequestActivityType["RealtyShowCompleted"] = "realty-show-completed";
2226
2163
  ServiceRequestActivityType["RealtyShowCancelled"] = "realty-show-cancelled";
2227
2164
  })(ServiceRequestActivityType || (ServiceRequestActivityType = {}));
@@ -2255,14 +2192,6 @@ var ShapeType;
2255
2192
  ShapeType["Microdistrict"] = "microdistrict";
2256
2193
  })(ShapeType || (ShapeType = {}));
2257
2194
 
2258
- var SoldStatisticTypes;
2259
-
2260
- (function (SoldStatisticTypes) {
2261
- SoldStatisticTypes["House"] = "house";
2262
- SoldStatisticTypes["FlatNew"] = "flat_new";
2263
- SoldStatisticTypes["FlatSecondary"] = "flat_secondary";
2264
- })(SoldStatisticTypes || (SoldStatisticTypes = {}));
2265
-
2266
2195
  var TaskStatus;
2267
2196
 
2268
2197
  (function (TaskStatus) {
@@ -2511,7 +2440,7 @@ var ServiceRequestDictionary = {
2511
2440
 
2512
2441
  var _Type$6;
2513
2442
  var ServiceRequestActivityDictionary = {
2514
- Type: (_Type$6 = {}, _Type$6[ServiceRequestActivityType.Comment] = 'Коментарий', _Type$6[ServiceRequestActivityType.Edit] = 'Изменения', _Type$6[ServiceRequestActivityType.Call] = 'Звонок', _Type$6[ServiceRequestActivityType.Task] = 'Задача', _Type$6[ServiceRequestActivityType.Status] = 'Статус', _Type$6[ServiceRequestActivityType.ObjectRequest] = 'Обращение на объект', _Type$6[ServiceRequestActivityType.Contract] = 'Контракт', _Type$6[ServiceRequestActivityType.Publish] = 'Публикация', _Type$6[ServiceRequestActivityType.PublicationProblem] = 'Ошибка при публикации', _Type$6[ServiceRequestActivityType.ContractExpired] = 'Срок контракта истекает', _Type$6[ServiceRequestActivityType.MarkedUp] = 'Разметка', _Type$6[ServiceRequestActivityType.ExpertCreated] = 'Создан эксперт', _Type$6[ServiceRequestActivityType.PriceChanged] = 'Изменена цена', _Type$6[ServiceRequestActivityType.RequestPriceDown] = 'Запрос на снижение цены цены', _Type$6[ServiceRequestActivityType.CallTaskCreated] = 'Обращениие создано', _Type$6[ServiceRequestActivityType.RealtyShowScheduled] = 'Показ объекта запланирован', _Type$6[ServiceRequestActivityType.RealtyShowRescheduled] = 'Показ объекта перенесен', _Type$6[ServiceRequestActivityType.RealtyShowCompleted] = 'Показ объекта выполнен', _Type$6[ServiceRequestActivityType.RealtyShowCancelled] = 'Показ объекта отменен', _Type$6)
2443
+ Type: (_Type$6 = {}, _Type$6[ServiceRequestActivityType.Comment] = 'Комментарий', _Type$6[ServiceRequestActivityType.Edit] = 'Изменения', _Type$6[ServiceRequestActivityType.Transfer] = 'Перевод', _Type$6[ServiceRequestActivityType.Call] = 'Звонок', _Type$6[ServiceRequestActivityType.Task] = 'Задача', _Type$6[ServiceRequestActivityType.Contract] = 'Контракт', _Type$6[ServiceRequestActivityType.PublicationProblem] = 'Ошибка при публикации', _Type$6[ServiceRequestActivityType.MarkedUp] = 'Разметка', _Type$6[ServiceRequestActivityType.Published] = 'Публикация', _Type$6[ServiceRequestActivityType.Republished] = 'Повторная публикация', _Type$6[ServiceRequestActivityType.Depublished] = 'Снятие с публикации', _Type$6[ServiceRequestActivityType.PriceChanged] = 'Изменена цена', _Type$6[ServiceRequestActivityType.RequestPriceDown] = 'Запрос на снижение цены', _Type$6[ServiceRequestActivityType.ContractExpired] = 'Срок контракта истекает', _Type$6[ServiceRequestActivityType.CallTaskCreated] = 'Обращениие создано', _Type$6[ServiceRequestActivityType.RealtyShowScheduled] = 'Показ объекта запланирован', _Type$6[ServiceRequestActivityType.RealtyShowCompleted] = 'Показ объекта выполнен', _Type$6[ServiceRequestActivityType.RealtyShowCancelled] = 'Показ объекта отменен', _Type$6)
2515
2444
  };
2516
2445
 
2517
2446
  var _Category$3;
@@ -2993,23 +2922,6 @@ var Api = function Api(baseURL) {
2993
2922
  headers: headers,
2994
2923
  baseURL: _this.baseURL
2995
2924
  });
2996
- };
2997
-
2998
- this.findServiceRequestSellerReport = function (urlParams, params, headers) {
2999
- return findServiceRequestSellerReportRequest({
3000
- urlParams: urlParams,
3001
- params: params,
3002
- headers: headers,
3003
- baseURL: _this.baseURL
3004
- });
3005
- }; // sold
3006
-
3007
-
3008
- this.findSoldStatistic = function (headers) {
3009
- return findSoldStatisticRequest({
3010
- headers: headers,
3011
- baseURL: _this.baseURL
3012
- });
3013
2925
  }; // task
3014
2926
 
3015
2927
 
@@ -3122,7 +3034,6 @@ var index = {
3122
3034
  findServiceRequestByIdRequest: findServiceRequestByIdRequest,
3123
3035
  findServiceRequestDuplicatesRequest: findServiceRequestDuplicatesRequest,
3124
3036
  findServiceRequestsRequest: findServiceRequestsRequest,
3125
- findServiceRequestSellerReportRequest: findServiceRequestSellerReportRequest,
3126
3037
  findServiceRequestShortInfoRequest: findServiceRequestShortInfoRequest,
3127
3038
  findServiceRequestShortInfoByIdRequest: findServiceRequestShortInfoByIdRequest,
3128
3039
  findServiceRequestShortInfoByDealIdRequest: findServiceRequestShortInfoByDealIdRequest,
@@ -3132,7 +3043,6 @@ var index = {
3132
3043
  sendServiceRequestToModerationRequest: sendServiceRequestToModerationRequest,
3133
3044
  startServiceRequestModerationRequest: startServiceRequestModerationRequest,
3134
3045
  startServiceRequestModerationForOldRealtyRequest: startServiceRequestModerationForOldRealtyRequest,
3135
- findSoldStatisticRequest: findSoldStatisticRequest,
3136
3046
  createUserRequest: createUserRequest,
3137
3047
  findUsersRequest: findUsersRequest,
3138
3048
  findUserByIdRequest: findUserByIdRequest,
@@ -3211,7 +3121,6 @@ var index = {
3211
3121
  get ServiceRequestActivityType () { return ServiceRequestActivityType; },
3212
3122
  get ServiceRequestCategorizedFileCategory () { return ServiceRequestCategorizedFileCategory; },
3213
3123
  get ShapeType () { return ShapeType; },
3214
- get SoldStatisticTypes () { return SoldStatisticTypes; },
3215
3124
  get TaskStatus () { return TaskStatus; },
3216
3125
  get TaskImportance () { return TaskImportance; },
3217
3126
  get TaskNotificationType () { return TaskNotificationType; },