@hapl/api-queries 0.1.97 → 0.1.99--canary.34.a47aea3.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/api-queries.cjs.development.js +139 -38
  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 +139 -38
  7. package/dist/api-queries.esm.js.map +1 -1
  8. package/dist/clients/v1/api/index.d.ts +2 -0
  9. package/dist/clients/v1/api/serviceRequest/createServiceRequest/index.d.ts +2 -2
  10. package/dist/clients/v1/api/serviceRequest/findServiceRequestShortInfo/index.d.ts +58 -0
  11. package/dist/clients/v1/api/task/findTasks/index.d.ts +42 -0
  12. package/dist/clients/v1/dictionaries/{ServiceRequestTask.d.ts → Task.d.ts} +2 -2
  13. package/dist/clients/v1/dictionaries/index.d.ts +1 -1
  14. package/dist/clients/v1/index.d.ts +2 -0
  15. package/dist/clients/v1/types/ServiceRequest.d.ts +6 -4
  16. package/dist/clients/v1/types/ServiceRequestShortInfo.d.ts +33 -0
  17. package/dist/clients/v1/types/{ServiceRequestTask.d.ts → Task.d.ts} +22 -16
  18. package/dist/clients/v1/types/index.d.ts +2 -1
  19. package/package.json +1 -1
  20. package/src/clients/v1/api/index.ts +3 -0
  21. package/src/clients/v1/api/serviceRequest/createServiceRequest/index.ts +2 -2
  22. package/src/clients/v1/api/serviceRequest/findServiceRequestShortInfo/index.ts +79 -0
  23. package/src/clients/v1/api/task/findTasks/index.ts +57 -0
  24. package/src/clients/v1/dictionaries/Task.ts +20 -0
  25. package/src/clients/v1/dictionaries/index.ts +1 -1
  26. package/src/clients/v1/index.ts +15 -1
  27. package/src/clients/v1/types/ServiceRequest.ts +5 -3
  28. package/src/clients/v1/types/ServiceRequestShortInfo.ts +28 -0
  29. package/src/clients/v1/types/{ServiceRequestTask.ts → Task.ts} +18 -17
  30. package/src/clients/v1/types/index.ts +2 -1
  31. package/src/clients/v1/dictionaries/ServiceRequestTask.ts +0 -20
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v0.1.98 (Tue Dec 07 2021)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Добавлена ручка на получение списка задач [#33](https://github.com/homeappcorporate/api-queries/pull/33) ([@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.97 (Thu Dec 02 2021)
2
14
 
3
15
  #### 🐛 Bug Fix
@@ -841,6 +841,47 @@ function findServiceRequestsRequest(_ref) {
841
841
  });
842
842
  }
843
843
 
844
+ function findServiceRequestShortInfoRequest(_ref) {
845
+ var _ref$baseURL = _ref.baseURL,
846
+ baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
847
+ headers = _ref.headers,
848
+ params = _ref.params;
849
+ return axios.get("/api/service-request/short", {
850
+ baseURL: baseURL,
851
+ params: params,
852
+ paramsSerializer: function paramsSerializer(params) {
853
+ return qs.stringify(params, {
854
+ arrayFormat: 'brackets'
855
+ });
856
+ },
857
+ headers: _extends({
858
+ Accept: 'application/json'
859
+ }, headers),
860
+ transformResponse: [].concat(axios.defaults.transformResponse, [function (data) {
861
+ var _data$data, _data$data2;
862
+
863
+ if (!data.success) return (_data$data = data.data) == null ? void 0 : _data$data.error;
864
+ var ids = [];
865
+ var byId = {};
866
+ ((_data$data2 = data.data) != null ? _data$data2 : []).forEach(function (entity) {
867
+ byId[entity.id] = entity;
868
+ ids.push(entity.id);
869
+ });
870
+ return {
871
+ ids: ids,
872
+ byId: byId,
873
+ meta: {
874
+ total: data.pageParams.length
875
+ }
876
+ };
877
+ }])
878
+ }).then(function (res) {
879
+ return res;
880
+ })["catch"](function (err) {
881
+ throw err;
882
+ });
883
+ }
884
+
844
885
  function findServiceRequestShortInfoByIdRequest(_ref) {
845
886
  var _ref$baseURL = _ref.baseURL,
846
887
  baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
@@ -1131,6 +1172,45 @@ function assignSubordinateUsersRequest(_ref) {
1131
1172
  });
1132
1173
  }
1133
1174
 
1175
+ function findTasksRequest(_ref) {
1176
+ var _ref$baseURL = _ref.baseURL,
1177
+ baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
1178
+ headers = _ref.headers,
1179
+ params = _ref.params;
1180
+ return axios.get('/api/task', {
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
+
1134
1214
  var AddressBTIParamsParking;
1135
1215
 
1136
1216
  (function (AddressBTIParamsParking) {
@@ -1622,6 +1702,8 @@ var ServiceRequestStatus;
1622
1702
  ServiceRequestStatus["DealSigned"] = "deal_signed";
1623
1703
  ServiceRequestStatus["Registered"] = "registered";
1624
1704
  ServiceRequestStatus["DealDone"] = "deal_done";
1705
+ ServiceRequestStatus["NoPrepayment"] = "no_prepayment";
1706
+ ServiceRequestStatus["PrepaymentPlanned"] = "prepayment_planned";
1625
1707
  })(ServiceRequestStatus || (ServiceRequestStatus = {}));
1626
1708
 
1627
1709
  var ServiceRequestType;
@@ -1675,32 +1757,6 @@ var ServiceRequestCategorizedFileCategory;
1675
1757
  ServiceRequestCategorizedFileCategory["Risk"] = "risk";
1676
1758
  })(ServiceRequestCategorizedFileCategory || (ServiceRequestCategorizedFileCategory = {}));
1677
1759
 
1678
- var ServiceRequestTaskImportance;
1679
-
1680
- (function (ServiceRequestTaskImportance) {
1681
- ServiceRequestTaskImportance["Normal"] = "normal";
1682
- ServiceRequestTaskImportance["High"] = "high";
1683
- })(ServiceRequestTaskImportance || (ServiceRequestTaskImportance = {}));
1684
-
1685
- var ServiceRequestTaskNotificationType;
1686
-
1687
- (function (ServiceRequestTaskNotificationType) {
1688
- ServiceRequestTaskNotificationType["Morning"] = "morning";
1689
- ServiceRequestTaskNotificationType["Min15"] = "min15";
1690
- ServiceRequestTaskNotificationType["Hour1"] = "hour1";
1691
- ServiceRequestTaskNotificationType["Hour2"] = "hour2";
1692
- ServiceRequestTaskNotificationType["Nil"] = "nil";
1693
- })(ServiceRequestTaskNotificationType || (ServiceRequestTaskNotificationType = {}));
1694
-
1695
- var ServiceRequestTaskStatus;
1696
-
1697
- (function (ServiceRequestTaskStatus) {
1698
- ServiceRequestTaskStatus["New"] = "new";
1699
- ServiceRequestTaskStatus["InProgress"] = "in_progress";
1700
- ServiceRequestTaskStatus["Resolved"] = "resolved";
1701
- ServiceRequestTaskStatus["Closed"] = "closed";
1702
- })(ServiceRequestTaskStatus || (ServiceRequestTaskStatus = {}));
1703
-
1704
1760
  var ShapeType;
1705
1761
 
1706
1762
  (function (ShapeType) {
@@ -1712,6 +1768,32 @@ var ShapeType;
1712
1768
  ShapeType["Microdistrict"] = "microdistrict";
1713
1769
  })(ShapeType || (ShapeType = {}));
1714
1770
 
1771
+ var TaskStatus;
1772
+
1773
+ (function (TaskStatus) {
1774
+ TaskStatus["New"] = "new";
1775
+ TaskStatus["InProgress"] = "in_progress";
1776
+ TaskStatus["Resolved"] = "resolved";
1777
+ TaskStatus["Closed"] = "closed";
1778
+ })(TaskStatus || (TaskStatus = {}));
1779
+
1780
+ var TaskImportance;
1781
+
1782
+ (function (TaskImportance) {
1783
+ TaskImportance["Normal"] = "normal";
1784
+ TaskImportance["High"] = "high";
1785
+ })(TaskImportance || (TaskImportance = {}));
1786
+
1787
+ var TaskNotificationType;
1788
+
1789
+ (function (TaskNotificationType) {
1790
+ TaskNotificationType["Morning"] = "morning";
1791
+ TaskNotificationType["Min15"] = "min15";
1792
+ TaskNotificationType["Hour1"] = "hour1";
1793
+ TaskNotificationType["Hour2"] = "hour2";
1794
+ TaskNotificationType["Nil"] = "nil";
1795
+ })(TaskNotificationType || (TaskNotificationType = {}));
1796
+
1715
1797
  var UserTelephonyType;
1716
1798
 
1717
1799
  (function (UserTelephonyType) {
@@ -1935,18 +2017,18 @@ var ServiceRequestCategorizedFileDictionary = {
1935
2017
  Category: (_Category$3 = {}, _Category$3[ServiceRequestCategorizedFileCategory.AdvAgreement] = 'Соглашение на рекламу', _Category$3[ServiceRequestCategorizedFileCategory.AdvanceForm] = 'Анкета на аванс', _Category$3[ServiceRequestCategorizedFileCategory.CheckList] = 'Чек-лист со встречи', _Category$3[ServiceRequestCategorizedFileCategory.Contract] = 'Договор оказания услуг', _Category$3[ServiceRequestCategorizedFileCategory.Kc] = 'Файлы от КЦ', _Category$3[ServiceRequestCategorizedFileCategory.Other] = 'Разное (ЗОУ)', _Category$3[ServiceRequestCategorizedFileCategory.OwnershipCheckReport] = 'Отчет проверки собственника', _Category$3[ServiceRequestCategorizedFileCategory.OwnershipJustification] = 'Основание права собственности', _Category$3[ServiceRequestCategorizedFileCategory.PassportClient] = 'Паспорта клиента (свид-ва о рождении)', _Category$3[ServiceRequestCategorizedFileCategory.Egrn] = 'ЕГРН', _Category$3[ServiceRequestCategorizedFileCategory.DeleteReason] = 'Является обоснованием закрытия контракта', _Category$3[ServiceRequestCategorizedFileCategory.OwnershipTransfers] = 'Переходы собственности', _Category$3[ServiceRequestCategorizedFileCategory.Risk] = 'Проверка на риски', _Category$3)
1936
2018
  };
1937
2019
 
1938
- var _Importance, _NotificationType, _Status$2;
1939
- var ServiceRequestTaskDictionary = {
1940
- Importance: (_Importance = {}, _Importance[ServiceRequestTaskImportance.Normal] = 'Обычная', _Importance[ServiceRequestTaskImportance.High] = 'Высокая', _Importance),
1941
- NotificationType: (_NotificationType = {}, _NotificationType[ServiceRequestTaskNotificationType.Morning] = 'Утром', _NotificationType[ServiceRequestTaskNotificationType.Min15] = 'За 15 минут', _NotificationType[ServiceRequestTaskNotificationType.Hour1] = 'За час', _NotificationType[ServiceRequestTaskNotificationType.Hour2] = 'За 2 часа', _NotificationType[ServiceRequestTaskNotificationType.Nil] = 'Не напоминать', _NotificationType),
1942
- Status: (_Status$2 = {}, _Status$2[ServiceRequestTaskStatus.InProgress] = 'В работе', _Status$2[ServiceRequestTaskStatus.Resolved] = 'Выполнена', _Status$2[ServiceRequestTaskStatus.Closed] = 'Закрыта', _Status$2)
1943
- };
1944
-
1945
2020
  var _Type$6;
1946
2021
  var ShapeDictionary = {
1947
2022
  Type: (_Type$6 = {}, _Type$6[ShapeType.AdministrativeDistrict] = 'Административный округ', _Type$6[ShapeType.Block] = 'Квартал', _Type$6[ShapeType.Complex] = 'Новостройка', _Type$6[ShapeType.District] = 'Район', _Type$6[ShapeType.House] = 'Здание', _Type$6[ShapeType.Microdistrict] = 'Микрорайон', _Type$6)
1948
2023
  };
1949
2024
 
2025
+ var _Importance, _NotificationType, _Status$2;
2026
+ var TaskDictionary = {
2027
+ Importance: (_Importance = {}, _Importance[TaskImportance.Normal] = 'Обычная', _Importance[TaskImportance.High] = 'Высокая', _Importance),
2028
+ NotificationType: (_NotificationType = {}, _NotificationType[TaskNotificationType.Morning] = 'Утром', _NotificationType[TaskNotificationType.Min15] = 'За 15 минут', _NotificationType[TaskNotificationType.Hour1] = 'За час', _NotificationType[TaskNotificationType.Hour2] = 'За 2 часа', _NotificationType[TaskNotificationType.Nil] = 'Не напоминать', _NotificationType),
2029
+ Status: (_Status$2 = {}, _Status$2[TaskStatus.InProgress] = 'В работе', _Status$2[TaskStatus.Resolved] = 'Выполнена', _Status$2[TaskStatus.Closed] = 'Закрыта', _Status$2)
2030
+ };
2031
+
1950
2032
  var _TelephonyType, _Direction$1, _Gender, _Level, _Office, _Role, _FiredType, _FiredReason, _AttractionChannel;
1951
2033
  var UserDictionary = {
1952
2034
  TelephonyType: (_TelephonyType = {}, _TelephonyType[UserTelephonyType.Zadarma] = 'Zadarma', _TelephonyType[UserTelephonyType.Vox] = 'Vox', _TelephonyType),
@@ -2216,6 +2298,14 @@ var Api = function Api(baseURL) {
2216
2298
  });
2217
2299
  };
2218
2300
 
2301
+ this.findServiceRequestShortInfo = function (params, headers) {
2302
+ return findServiceRequestShortInfoRequest({
2303
+ params: params,
2304
+ headers: headers,
2305
+ baseURL: _this.baseURL
2306
+ });
2307
+ };
2308
+
2219
2309
  this.findServiceRequestShortInfoById = function (urlParams, headers) {
2220
2310
  return findServiceRequestShortInfoByIdRequest({
2221
2311
  urlParams: urlParams,
@@ -2255,7 +2345,16 @@ var Api = function Api(baseURL) {
2255
2345
  headers: headers,
2256
2346
  baseURL: _this.baseURL
2257
2347
  });
2258
- }; // users
2348
+ }; // task
2349
+
2350
+
2351
+ this.findTasks = function (params, headers) {
2352
+ return findTasksRequest({
2353
+ params: params,
2354
+ headers: headers,
2355
+ baseURL: _this.baseURL
2356
+ });
2357
+ }; // user
2259
2358
 
2260
2359
 
2261
2360
  this.createUser = function (body, headers) {
@@ -2344,6 +2443,7 @@ var index = {
2344
2443
  findServiceRequestByIdRequest: findServiceRequestByIdRequest,
2345
2444
  findServiceRequestDuplicatesRequest: findServiceRequestDuplicatesRequest,
2346
2445
  findServiceRequestsRequest: findServiceRequestsRequest,
2446
+ findServiceRequestShortInfoRequest: findServiceRequestShortInfoRequest,
2347
2447
  findServiceRequestShortInfoByIdRequest: findServiceRequestShortInfoByIdRequest,
2348
2448
  findServiceRequestCategorizedFilesRequest: findServiceRequestCategorizedFilesRequest,
2349
2449
  sendServiceRequestToModerationRequest: sendServiceRequestToModerationRequest,
@@ -2355,6 +2455,7 @@ var index = {
2355
2455
  updateUserRequest: updateUserRequest,
2356
2456
  fireUserRequest: fireUserRequest,
2357
2457
  assignSubordinateUsersRequest: assignSubordinateUsersRequest,
2458
+ findTasksRequest: findTasksRequest,
2358
2459
  AddressBTIParamsDictionary: AddressBTIParamsDictionary,
2359
2460
  AvailableFundsDictionary: AvailableFundsDictionary,
2360
2461
  BuyerDictionary: BuyerDictionary,
@@ -2369,8 +2470,8 @@ var index = {
2369
2470
  RealtyDictionary: RealtyDictionary,
2370
2471
  ServiceRequestDictionary: ServiceRequestDictionary,
2371
2472
  ServiceRequestCategorizedFileDictionary: ServiceRequestCategorizedFileDictionary,
2372
- ServiceRequestTaskDictionary: ServiceRequestTaskDictionary,
2373
2473
  ShapeDictionary: ShapeDictionary,
2474
+ TaskDictionary: TaskDictionary,
2374
2475
  UserDictionary: UserDictionary,
2375
2476
  get AddressBTIParamsParking () { return AddressBTIParamsParking; },
2376
2477
  get AddressBTIParamsWallsMaterial () { return AddressBTIParamsWallsMaterial; },
@@ -2422,10 +2523,10 @@ var index = {
2422
2523
  get ServiceRequestDepublishReason () { return ServiceRequestDepublishReason; },
2423
2524
  get ServiceRequestSource () { return ServiceRequestSource; },
2424
2525
  get ServiceRequestCategorizedFileCategory () { return ServiceRequestCategorizedFileCategory; },
2425
- get ServiceRequestTaskImportance () { return ServiceRequestTaskImportance; },
2426
- get ServiceRequestTaskNotificationType () { return ServiceRequestTaskNotificationType; },
2427
- get ServiceRequestTaskStatus () { return ServiceRequestTaskStatus; },
2428
2526
  get ShapeType () { return ShapeType; },
2527
+ get TaskStatus () { return TaskStatus; },
2528
+ get TaskImportance () { return TaskImportance; },
2529
+ get TaskNotificationType () { return TaskNotificationType; },
2429
2530
  get UserTelephonyType () { return UserTelephonyType; },
2430
2531
  get UserDirection () { return UserDirection; },
2431
2532
  get UserGender () { return UserGender; },