@hapl/api-queries 0.1.162--canary.91.57c6a52.0 → 0.1.162

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.162 (Mon May 23 2022)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - FE-1328: Добавлено поле `isNewFlat` для realty V1 [#90](https://github.com/homeappcorporate/api-queries/pull/90) ([@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.161 (Mon May 23 2022)
2
14
 
3
15
  #### 🐛 Bug Fix
@@ -3220,8 +3220,7 @@ var PhotoOrderRenovation;
3220
3220
  var RealtyType;
3221
3221
 
3222
3222
  (function (RealtyType) {
3223
- RealtyType["FlatSecondary"] = "flat_secondary";
3224
- RealtyType["FlatNew"] = "flat_new";
3223
+ RealtyType["Flat"] = "flat";
3225
3224
  RealtyType["House"] = "house";
3226
3225
  })(RealtyType || (RealtyType = {}));
3227
3226
 
@@ -3720,7 +3719,7 @@ var PhotoOrderDictionary = {
3720
3719
 
3721
3720
  var _Type$7, _RenovationType, _Gas, _HouseType, _LandShape, _LandUsageType, _Relief, _Electricity, _Furniture, _Sewerage, _WindowView;
3722
3721
  var RealtyDictionary = {
3723
- Type: (_Type$7 = {}, _Type$7[RealtyType.FlatSecondary] = 'Вторичка', _Type$7[RealtyType.FlatNew] = 'Новостройка', _Type$7[RealtyType.House] = 'Дом', _Type$7),
3722
+ Type: (_Type$7 = {}, _Type$7[RealtyType.Flat] = 'Квартира', _Type$7[RealtyType.House] = 'Дом', _Type$7),
3724
3723
  RenovationType: (_RenovationType = {}, _RenovationType[RealtyRenovationType.None] = 'Без ремонта', _RenovationType[RealtyRenovationType.Author] = 'Авторский', _RenovationType[RealtyRenovationType.Cosmetic] = 'Косметический', _RenovationType[RealtyRenovationType.Euro] = 'Евро', _RenovationType[RealtyRenovationType.FineFinishing] = 'Чистовая отделка', _RenovationType[RealtyRenovationType.RoughFinishing] = 'Черновая отделка', _RenovationType),
3725
3724
  Gas: (_Gas = {}, _Gas[RealtyGas.None] = 'Нет', _Gas[RealtyGas.Connected] = 'Подключено', _Gas[RealtyGas.Border] = 'По границе', _Gas[RealtyGas.Possible] = 'Возможно', _Gas[RealtyGas.Autonomous] = 'Автономное', _Gas),
3726
3725
  HouseType: (_HouseType = {}, _HouseType[RealtyHouseType.Townhouse] = 'Таунхаус', _HouseType[RealtyHouseType.House] = 'Дом', _HouseType[RealtyHouseType.Cottage] = 'Коттедж', _HouseType[RealtyHouseType.Part] = 'Часть дома', _HouseType[RealtyHouseType.Duplex] = 'Дуплекс', _HouseType),
@@ -6981,51 +6980,6 @@ function findComplexIdsRequest(_ref) {
6981
6980
  });
6982
6981
  }
6983
6982
 
6984
- function uploadImagesRequest(_ref) {
6985
- var _ref$baseURL = _ref.baseURL,
6986
- baseURL = _ref$baseURL === void 0 ? 'https://registry.homeapp.ru' : _ref$baseURL,
6987
- body = _ref.body,
6988
- headers = _ref.headers;
6989
- var formData = new FormData();
6990
-
6991
- if (body.length === 0) {
6992
- throw new Error('Список изображений пуст');
6993
- }
6994
-
6995
- if (body.length > 1) {
6996
- body.forEach(function (file, index) {
6997
- formData.append("file" + index, file);
6998
- });
6999
- } else {
7000
- formData.append('file', body[0]);
7001
- }
7002
-
7003
- return axios.post('/api/image/upload', body, {
7004
- baseURL: baseURL,
7005
- headers: _extends({
7006
- Accept: 'application/json',
7007
- 'Content-Type': 'multipart/form-data'
7008
- }, headers),
7009
- transformResponse: [].concat(axios.defaults.transformResponse, [function (data) {
7010
- if (!data.success) return data.data.error || data.data.message;
7011
- var ids = [];
7012
- var byId = {};
7013
- data.data.forEach(function (entity) {
7014
- byId[entity.id] = entity;
7015
- ids.push(entity.id);
7016
- });
7017
- return {
7018
- ids: ids,
7019
- byId: byId
7020
- };
7021
- }])
7022
- }).then(function (res) {
7023
- return res;
7024
- })["catch"](function (err) {
7025
- throw err;
7026
- });
7027
- }
7028
-
7029
6983
  function findRealtiesRequest$1(_ref) {
7030
6984
  var _ref$baseURL = _ref.baseURL,
7031
6985
  baseURL = _ref$baseURL === void 0 ? 'https://registry.homeapp.ru' : _ref$baseURL,
@@ -7291,7 +7245,15 @@ var ValuationDictionary = {
7291
7245
  var Api$3 = function Api(baseURL) {
7292
7246
  var _this = this;
7293
7247
 
7294
- this.baseURL = baseURL; // address
7248
+ this.baseURL = baseURL; // complex
7249
+
7250
+ this.findComplexIds = function (params) {
7251
+ return findComplexIdsRequest({
7252
+ params: params,
7253
+ baseURL: _this.baseURL
7254
+ });
7255
+ }; // address
7256
+
7295
7257
 
7296
7258
  this.createAddress = function (body, headers) {
7297
7259
  return createAddressRequest$1({
@@ -7307,23 +7269,6 @@ var Api$3 = function Api(baseURL) {
7307
7269
  headers: headers,
7308
7270
  baseURL: _this.baseURL
7309
7271
  });
7310
- }; // complex
7311
-
7312
-
7313
- this.findComplexIds = function (params) {
7314
- return findComplexIdsRequest({
7315
- params: params,
7316
- baseURL: _this.baseURL
7317
- });
7318
- }; // image
7319
-
7320
-
7321
- this.uploadImages = function (body, headers) {
7322
- return uploadImagesRequest({
7323
- body: body,
7324
- headers: headers,
7325
- baseURL: _this.baseURL
7326
- });
7327
7272
  }; // realty
7328
7273
 
7329
7274
 
@@ -7341,7 +7286,7 @@ var Api$3 = function Api(baseURL) {
7341
7286
  headers: headers,
7342
7287
  baseURL: _this.baseURL
7343
7288
  });
7344
- }; // valuation
7289
+ }; // valuate
7345
7290
 
7346
7291
 
7347
7292
  this.calculateValuation = function (body, headers) {
@@ -7360,7 +7305,6 @@ var index$3 = {
7360
7305
  findAddressByIdRequest: findAddressByIdRequest,
7361
7306
  findAddressesByRealtyParamsRequest: findAddressesByRealtyParamsRequest,
7362
7307
  findComplexIdsRequest: findComplexIdsRequest,
7363
- uploadImagesRequest: uploadImagesRequest,
7364
7308
  findRealtiesRequest: findRealtiesRequest$1,
7365
7309
  calculateValuationRequest: calculateValuationRequest,
7366
7310
  AddressBTIParamsDictionary: AddressBTIParamsDictionary$2,