@hapl/api-queries 0.2.84 → 0.2.85--canary.210.68122ac.0

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.
@@ -20726,6 +20726,51 @@ function findDadataSuggestionsRequest(_ref) {
20726
20726
  });
20727
20727
  }
20728
20728
 
20729
+ function findServiceRequestExpensesRequest(_ref) {
20730
+ var params = _ref.params,
20731
+ headers = _ref.headers;
20732
+ return axios.get('/expense_api', {
20733
+ baseURL: 'https://analytics.homeapp.team',
20734
+ params: params,
20735
+ paramsSerializer: function paramsSerializer(params) {
20736
+ return qs.stringify(params, {
20737
+ arrayFormat: 'brackets'
20738
+ });
20739
+ },
20740
+ headers: _extends({
20741
+ Accept: 'application/json'
20742
+ }, headers),
20743
+ transformResponse: [].concat(axios.defaults.transformResponse, [function (data) {
20744
+ if (data.success) {
20745
+ var ids = [];
20746
+ var byId = {};
20747
+ data.data.forEach(function (entity) {
20748
+ var _id = nonSecure.nanoid();
20749
+
20750
+ byId[_id] = _extends({}, entity, {
20751
+ _id: _id
20752
+ });
20753
+ ids.push(_id);
20754
+ });
20755
+ return {
20756
+ ids: ids,
20757
+ byId: byId,
20758
+ meta: {
20759
+ total: data.pageParams.length,
20760
+ totals: data.meta.totals
20761
+ }
20762
+ };
20763
+ }
20764
+
20765
+ return data.data.error || data.data.message;
20766
+ }])
20767
+ }).then(function (res) {
20768
+ return res;
20769
+ })["catch"](function (err) {
20770
+ throw err;
20771
+ });
20772
+ }
20773
+
20729
20774
  // документация https://yandex.ru/dev/geosuggest/doc/ru/
20730
20775
  function findYandexSuggestionsRequest(_ref) {
20731
20776
  var params = _ref.params;
@@ -20753,6 +20798,25 @@ function yandexGeocodeRequest(_ref) {
20753
20798
  });
20754
20799
  }
20755
20800
 
20801
+ var ServiceRequestExpenseType;
20802
+
20803
+ (function (ServiceRequestExpenseType) {
20804
+ ServiceRequestExpenseType["Advertisement"] = "advertisement";
20805
+ ServiceRequestExpenseType["Photo"] = "photo";
20806
+ ServiceRequestExpenseType["Text"] = "text";
20807
+ ServiceRequestExpenseType["PlanDrawing"] = "plan_drawing";
20808
+ ServiceRequestExpenseType["OwnerDb"] = "owner_db";
20809
+ ServiceRequestExpenseType["Telephony"] = "telephony";
20810
+ ServiceRequestExpenseType["LeadCommission"] = "lead_commission";
20811
+ ServiceRequestExpenseType["SupervisorBonus"] = "supervisor_bonus";
20812
+ ServiceRequestExpenseType["LawyerHelp"] = "lawyer_help";
20813
+ })(ServiceRequestExpenseType || (ServiceRequestExpenseType = {}));
20814
+
20815
+ var _Type$e;
20816
+ var ServiceRequestExpenseDictionary = {
20817
+ Type: (_Type$e = {}, _Type$e[ServiceRequestExpenseType.Advertisement] = 'Реклама на объект', _Type$e[ServiceRequestExpenseType.Photo] = 'Фото', _Type$e[ServiceRequestExpenseType.Text] = 'Текст, редактура', _Type$e[ServiceRequestExpenseType.PlanDrawing] = 'Отрисовка планировки', _Type$e[ServiceRequestExpenseType.OwnerDb] = 'Использование базы собcтвенников', _Type$e[ServiceRequestExpenseType.Telephony] = 'Использование телефонии', _Type$e[ServiceRequestExpenseType.LeadCommission] = 'Комиссия за рекламный лид', _Type$e[ServiceRequestExpenseType.SupervisorBonus] = 'Бонус РОПа', _Type$e[ServiceRequestExpenseType.LawyerHelp] = 'Выезд юриста на сделку', _Type$e)
20818
+ };
20819
+
20756
20820
  var Api$5 = function Api() {
20757
20821
  this.findDadataSuggestions = function (body, headers) {
20758
20822
  return findDadataSuggestionsRequest({
@@ -20761,6 +20825,13 @@ var Api$5 = function Api() {
20761
20825
  });
20762
20826
  };
20763
20827
 
20828
+ this.findServiceRequestExpenses = function (params, headers) {
20829
+ return findServiceRequestExpensesRequest({
20830
+ params: params,
20831
+ headers: headers
20832
+ });
20833
+ };
20834
+
20764
20835
  this.findYandexSuggestions = function (params) {
20765
20836
  return findYandexSuggestionsRequest({
20766
20837
  params: params
@@ -20778,8 +20849,11 @@ var index$5 = {
20778
20849
  __proto__: null,
20779
20850
  Api: Api$5,
20780
20851
  findDadataSuggestionsRequest: findDadataSuggestionsRequest,
20852
+ findServiceRequestExpensesRequest: findServiceRequestExpensesRequest,
20781
20853
  findYandexSuggestionsRequest: findYandexSuggestionsRequest,
20782
- yandexGeocodeRequest: yandexGeocodeRequest
20854
+ yandexGeocodeRequest: yandexGeocodeRequest,
20855
+ ServiceRequestExpenseDictionary: ServiceRequestExpenseDictionary,
20856
+ get ServiceRequestExpenseType () { return ServiceRequestExpenseType; }
20783
20857
  };
20784
20858
 
20785
20859
  exports.Clients = index;