@hapl/api-queries 0.1.124--canary.56.f1b182a.0 → 0.1.124
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 +12 -0
- package/dist/api-queries.cjs.development.js +28 -101
- package/dist/api-queries.cjs.development.js.map +1 -1
- package/dist/api-queries.cjs.production.min.js +1 -1
- package/dist/api-queries.cjs.production.min.js.map +1 -1
- package/dist/api-queries.esm.js +30 -103
- package/dist/api-queries.esm.js.map +1 -1
- package/dist/clients/v1/api/buyer/findBuyers/index.d.ts +35 -0
- package/dist/clients/v1/api/index.d.ts +1 -2
- package/dist/clients/v1/dictionaries/index.d.ts +0 -1
- package/dist/clients/v1/index.d.ts +1 -2
- package/dist/clients/v1/types/index.d.ts +0 -1
- package/package.json +1 -1
- package/src/clients/v1/api/buyer/findBuyers/index.ts +63 -0
- package/src/clients/v1/api/index.ts +1 -3
- package/src/clients/v1/dictionaries/index.ts +0 -1
- package/src/clients/v1/index.ts +4 -10
- package/src/clients/v1/types/index.ts +0 -1
- package/dist/clients/v1/api/bill/findBills/index.d.ts +0 -43
- package/dist/clients/v1/api/contract/findContracts/index.d.ts +0 -35
- package/dist/clients/v1/dictionaries/Bill.d.ts +0 -8
- package/dist/clients/v1/types/Bill.d.ts +0 -34
- package/src/clients/v1/api/bill/findBills/index.ts +0 -75
- package/src/clients/v1/api/contract/findContracts/index.ts +0 -53
- package/src/clients/v1/dictionaries/Bill.ts +0 -9
- package/src/clients/v1/types/Bill.ts +0 -37
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# v0.1.124 (Tue Feb 08 2022)
|
|
2
|
+
|
|
3
|
+
#### ⚠️ Pushed to `main`
|
|
4
|
+
|
|
5
|
+
- список баеров ([@yeshkarluk](https://github.com/yeshkarluk))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Ivan Ignatev ([@yeshkarluk](https://github.com/yeshkarluk))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
1
13
|
# v0.1.123 (Mon Feb 07 2022)
|
|
2
14
|
|
|
3
15
|
#### ⚠️ Pushed to `main`
|
|
@@ -6,7 +6,6 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|
|
6
6
|
|
|
7
7
|
var axios = _interopDefault(require('axios'));
|
|
8
8
|
var qs = _interopDefault(require('qs'));
|
|
9
|
-
var nanoid = require('nanoid');
|
|
10
9
|
var nonSecure = require('nanoid/non-secure');
|
|
11
10
|
var chunk = _interopDefault(require('lodash/chunk'));
|
|
12
11
|
|
|
@@ -195,12 +194,12 @@ function deleteAvailableFundsRequest(_ref) {
|
|
|
195
194
|
});
|
|
196
195
|
}
|
|
197
196
|
|
|
198
|
-
function
|
|
197
|
+
function countBuyersRequest(_ref) {
|
|
199
198
|
var _ref$baseURL = _ref.baseURL,
|
|
200
199
|
baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
|
|
201
200
|
headers = _ref.headers,
|
|
202
201
|
params = _ref.params;
|
|
203
|
-
return axios.get('/api/
|
|
202
|
+
return axios.get('/api/buyer/count', {
|
|
204
203
|
baseURL: baseURL,
|
|
205
204
|
params: params,
|
|
206
205
|
paramsSerializer: function paramsSerializer(params) {
|
|
@@ -212,24 +211,11 @@ function findBillsRequest(_ref) {
|
|
|
212
211
|
Accept: 'application/json'
|
|
213
212
|
}, headers),
|
|
214
213
|
transformResponse: [].concat(axios.defaults.transformResponse, [function (data) {
|
|
215
|
-
if (
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
data.data.forEach(function (entity) {
|
|
219
|
-
var _id = nanoid.nanoid();
|
|
214
|
+
if (data.success) {
|
|
215
|
+
return data.data;
|
|
216
|
+
}
|
|
220
217
|
|
|
221
|
-
|
|
222
|
-
_id: _id
|
|
223
|
-
});
|
|
224
|
-
ids.push(_id);
|
|
225
|
-
});
|
|
226
|
-
return {
|
|
227
|
-
ids: ids,
|
|
228
|
-
byId: byId,
|
|
229
|
-
meta: {
|
|
230
|
-
total: data.pageParams.length
|
|
231
|
-
}
|
|
232
|
-
};
|
|
218
|
+
return data.data.error;
|
|
233
219
|
}])
|
|
234
220
|
}).then(function (res) {
|
|
235
221
|
return res;
|
|
@@ -238,12 +224,12 @@ function findBillsRequest(_ref) {
|
|
|
238
224
|
});
|
|
239
225
|
}
|
|
240
226
|
|
|
241
|
-
function
|
|
227
|
+
function findBuyersRequest(_ref) {
|
|
242
228
|
var _ref$baseURL = _ref.baseURL,
|
|
243
229
|
baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
|
|
244
230
|
headers = _ref.headers,
|
|
245
231
|
params = _ref.params;
|
|
246
|
-
return axios.get('/api/buyer
|
|
232
|
+
return axios.get('/api/buyer', {
|
|
247
233
|
baseURL: baseURL,
|
|
248
234
|
params: params,
|
|
249
235
|
paramsSerializer: function paramsSerializer(params) {
|
|
@@ -256,7 +242,19 @@ function countBuyersRequest(_ref) {
|
|
|
256
242
|
}, headers),
|
|
257
243
|
transformResponse: [].concat(axios.defaults.transformResponse, [function (data) {
|
|
258
244
|
if (data.success) {
|
|
259
|
-
|
|
245
|
+
var ids = [];
|
|
246
|
+
var byId = {};
|
|
247
|
+
data.data.forEach(function (entity) {
|
|
248
|
+
byId[entity.id] = entity;
|
|
249
|
+
ids.push(entity.id);
|
|
250
|
+
});
|
|
251
|
+
return {
|
|
252
|
+
ids: ids,
|
|
253
|
+
byId: byId,
|
|
254
|
+
meta: {
|
|
255
|
+
total: data.pageParams.length
|
|
256
|
+
}
|
|
257
|
+
};
|
|
260
258
|
}
|
|
261
259
|
|
|
262
260
|
return data.data.error;
|
|
@@ -488,45 +486,6 @@ function declineContractRequest(_ref) {
|
|
|
488
486
|
});
|
|
489
487
|
}
|
|
490
488
|
|
|
491
|
-
function findContractsRequest(_ref) {
|
|
492
|
-
var _ref$baseURL = _ref.baseURL,
|
|
493
|
-
baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
|
|
494
|
-
headers = _ref.headers,
|
|
495
|
-
params = _ref.params;
|
|
496
|
-
return axios.get('/api/contract', {
|
|
497
|
-
baseURL: baseURL,
|
|
498
|
-
params: params,
|
|
499
|
-
paramsSerializer: function paramsSerializer(params) {
|
|
500
|
-
return qs.stringify(params, {
|
|
501
|
-
arrayFormat: 'brackets'
|
|
502
|
-
});
|
|
503
|
-
},
|
|
504
|
-
headers: _extends({
|
|
505
|
-
Accept: 'application/json'
|
|
506
|
-
}, headers),
|
|
507
|
-
transformResponse: [].concat(axios.defaults.transformResponse, [function (data) {
|
|
508
|
-
if (!data.success) return data.data.error || data.data.message;
|
|
509
|
-
var ids = [];
|
|
510
|
-
var byId = {};
|
|
511
|
-
data.data.forEach(function (entity) {
|
|
512
|
-
byId[entity.id] = entity;
|
|
513
|
-
ids.push(entity.id);
|
|
514
|
-
});
|
|
515
|
-
return {
|
|
516
|
-
ids: ids,
|
|
517
|
-
byId: byId,
|
|
518
|
-
meta: {
|
|
519
|
-
total: data.pageParams.length
|
|
520
|
-
}
|
|
521
|
-
};
|
|
522
|
-
}])
|
|
523
|
-
}).then(function (res) {
|
|
524
|
-
return res;
|
|
525
|
-
})["catch"](function (err) {
|
|
526
|
-
throw err;
|
|
527
|
-
});
|
|
528
|
-
}
|
|
529
|
-
|
|
530
489
|
function terminateContractRequest(_ref) {
|
|
531
490
|
var _ref$baseURL = _ref.baseURL,
|
|
532
491
|
baseURL = _ref$baseURL === void 0 ? 'https://clients.homeapp.ru' : _ref$baseURL,
|
|
@@ -1889,20 +1848,6 @@ var AvailableFundsPayerType;
|
|
|
1889
1848
|
AvailableFundsPayerType["Expert"] = "expert";
|
|
1890
1849
|
})(AvailableFundsPayerType || (AvailableFundsPayerType = {}));
|
|
1891
1850
|
|
|
1892
|
-
var BillServiceType;
|
|
1893
|
-
|
|
1894
|
-
(function (BillServiceType) {
|
|
1895
|
-
BillServiceType["PartPayment"] = "part_payment";
|
|
1896
|
-
BillServiceType["FullPayment"] = "full_payment";
|
|
1897
|
-
BillServiceType["BuyServicePayment"] = "buy_service_payment";
|
|
1898
|
-
})(BillServiceType || (BillServiceType = {}));
|
|
1899
|
-
|
|
1900
|
-
var BillServiceUnit;
|
|
1901
|
-
|
|
1902
|
-
(function (BillServiceUnit) {
|
|
1903
|
-
BillServiceUnit["Piece"] = "piece";
|
|
1904
|
-
})(BillServiceUnit || (BillServiceUnit = {}));
|
|
1905
|
-
|
|
1906
1851
|
var BuyerStatus;
|
|
1907
1852
|
|
|
1908
1853
|
(function (BuyerStatus) {
|
|
@@ -2591,11 +2536,6 @@ var AvailableFundsDictionary = {
|
|
|
2591
2536
|
PayerType: (_PayerType = {}, _PayerType[AvailableFundsPayerType.Common] = 'Общий', _PayerType[AvailableFundsPayerType.Homeapp] = 'Homeapp', _PayerType[AvailableFundsPayerType.SalesHead] = 'РОП', _PayerType[AvailableFundsPayerType.Expert] = 'Эксперт', _PayerType)
|
|
2592
2537
|
};
|
|
2593
2538
|
|
|
2594
|
-
var _ServiceType;
|
|
2595
|
-
var BillDictionary = {
|
|
2596
|
-
ServiceType: (_ServiceType = {}, _ServiceType[BillServiceType.PartPayment] = 'Частичная оплата обеспечительного платежа по договору', _ServiceType[BillServiceType.FullPayment] = 'Окончательный расчет по договору', _ServiceType[BillServiceType.BuyServicePayment] = 'Оплата по договору оказания услуг', _ServiceType)
|
|
2597
|
-
};
|
|
2598
|
-
|
|
2599
2539
|
var _BuyerStatus;
|
|
2600
2540
|
var BuyerDictionary = {
|
|
2601
2541
|
BuyerStatus: (_BuyerStatus = {}, _BuyerStatus[BuyerStatus.Incoming] = 'Входящее обращение', _BuyerStatus[BuyerStatus.ShowCoordination] = 'Согласование даты показа', _BuyerStatus[BuyerStatus.ShowScheduled] = 'Показ назначен', _BuyerStatus[BuyerStatus.ShowComplete] = 'Показ проведен (ожидание оффера)', _BuyerStatus[BuyerStatus.GotOffer] = 'Оффер получен (согласование)', _BuyerStatus[BuyerStatus.Advance] = 'Аванс', _BuyerStatus[BuyerStatus.Closed] = 'Завершение работы', _BuyerStatus)
|
|
@@ -2775,20 +2715,19 @@ var Api = function Api(baseURL) {
|
|
|
2775
2715
|
headers: headers,
|
|
2776
2716
|
baseURL: _this.baseURL
|
|
2777
2717
|
});
|
|
2778
|
-
}; //
|
|
2718
|
+
}; // buyer
|
|
2779
2719
|
|
|
2780
2720
|
|
|
2781
|
-
this.
|
|
2782
|
-
return
|
|
2721
|
+
this.countBuyers = function (params, headers) {
|
|
2722
|
+
return countBuyersRequest({
|
|
2783
2723
|
params: params,
|
|
2784
2724
|
headers: headers,
|
|
2785
2725
|
baseURL: _this.baseURL
|
|
2786
2726
|
});
|
|
2787
|
-
};
|
|
2788
|
-
|
|
2727
|
+
};
|
|
2789
2728
|
|
|
2790
|
-
this.
|
|
2791
|
-
return
|
|
2729
|
+
this.findBuyers = function (params, headers) {
|
|
2730
|
+
return findBuyersRequest({
|
|
2792
2731
|
params: params,
|
|
2793
2732
|
headers: headers,
|
|
2794
2733
|
baseURL: _this.baseURL
|
|
@@ -2870,14 +2809,6 @@ var Api = function Api(baseURL) {
|
|
|
2870
2809
|
});
|
|
2871
2810
|
};
|
|
2872
2811
|
|
|
2873
|
-
this.findContracts = function (params, headers) {
|
|
2874
|
-
return findContractsRequest({
|
|
2875
|
-
params: params,
|
|
2876
|
-
headers: headers,
|
|
2877
|
-
baseURL: _this.baseURL
|
|
2878
|
-
});
|
|
2879
|
-
};
|
|
2880
|
-
|
|
2881
2812
|
this.terminateContract = function (urlParams, body, headers) {
|
|
2882
2813
|
return terminateContractRequest({
|
|
2883
2814
|
urlParams: urlParams,
|
|
@@ -3292,8 +3223,8 @@ var index = {
|
|
|
3292
3223
|
findAvailableFundsRequest: findAvailableFundsRequest,
|
|
3293
3224
|
updateAvailableFundsRequest: updateAvailableFundsRequest,
|
|
3294
3225
|
deleteAvailableFundsRequest: deleteAvailableFundsRequest,
|
|
3295
|
-
findBillsRequest: findBillsRequest,
|
|
3296
3226
|
countBuyersRequest: countBuyersRequest,
|
|
3227
|
+
findBuyersRequest: findBuyersRequest,
|
|
3297
3228
|
findCallsRequest: findCallsRequest,
|
|
3298
3229
|
findFirstSuccessOutgoingCallsRequest: findFirstSuccessOutgoingCallsRequest,
|
|
3299
3230
|
markupCallRequest: markupCallRequest,
|
|
@@ -3303,7 +3234,6 @@ var index = {
|
|
|
3303
3234
|
createCallTaskRequest: createCallTaskRequest,
|
|
3304
3235
|
approveContractRequest: approveContractRequest,
|
|
3305
3236
|
declineContractRequest: declineContractRequest,
|
|
3306
|
-
findContractsRequest: findContractsRequest,
|
|
3307
3237
|
terminateContractRequest: terminateContractRequest,
|
|
3308
3238
|
createDealCategorizedFileRequest: createDealCategorizedFileRequest,
|
|
3309
3239
|
createDealInvestPrepaymentRequest: createDealInvestPrepaymentRequest,
|
|
@@ -3354,7 +3284,6 @@ var index = {
|
|
|
3354
3284
|
findValuationByServiceRequestIdRequest: findValuationByServiceRequestIdRequest,
|
|
3355
3285
|
AddressBTIParamsDictionary: AddressBTIParamsDictionary,
|
|
3356
3286
|
AvailableFundsDictionary: AvailableFundsDictionary,
|
|
3357
|
-
BillDictionary: BillDictionary,
|
|
3358
3287
|
BuyerDictionary: BuyerDictionary,
|
|
3359
3288
|
CallDictionary: CallDictionary,
|
|
3360
3289
|
CallTaskDictionary: CallTaskDictionary,
|
|
@@ -3380,8 +3309,6 @@ var index = {
|
|
|
3380
3309
|
get AvailableFundsPaymentType () { return AvailableFundsPaymentType; },
|
|
3381
3310
|
get AvailableFundsRealtyType () { return AvailableFundsRealtyType; },
|
|
3382
3311
|
get AvailableFundsPayerType () { return AvailableFundsPayerType; },
|
|
3383
|
-
get BillServiceType () { return BillServiceType; },
|
|
3384
|
-
get BillServiceUnit () { return BillServiceUnit; },
|
|
3385
3312
|
get BuyerStatus () { return BuyerStatus; },
|
|
3386
3313
|
get BuyerRealtyShowStatus () { return BuyerRealtyShowStatus; },
|
|
3387
3314
|
get CallType () { return CallType; },
|