@hapl/api-queries 0.1.174 → 0.1.175
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 +29 -17
- 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 +29 -17
- package/dist/api-queries.esm.js.map +1 -1
- package/dist/publisher/v1/api/index.d.ts +1 -1
- package/dist/publisher/v1/api/uploadResume/index.d.ts +25 -0
- package/dist/publisher/v1/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/publisher/v1/api/index.ts +1 -1
- package/src/publisher/v1/api/uploadResume/index.ts +58 -0
- package/src/publisher/v1/index.ts +2 -2
- package/dist/publisher/v1/api/sendResume/index.d.ts +0 -23
- package/src/publisher/v1/api/sendResume/index.ts +0 -39
package/dist/api-queries.esm.js
CHANGED
|
@@ -2,6 +2,7 @@ import axios from 'axios';
|
|
|
2
2
|
import qs from 'qs';
|
|
3
3
|
import { nanoid } from 'nanoid';
|
|
4
4
|
import { nanoid as nanoid$1 } from 'nanoid/non-secure';
|
|
5
|
+
import isNil from 'lodash-es/isNil';
|
|
5
6
|
import chunk from 'lodash-es/chunk';
|
|
6
7
|
|
|
7
8
|
function getPasswordRequest(_ref) {
|
|
@@ -6795,27 +6796,37 @@ function getPublishedDaysRequest(_ref) {
|
|
|
6795
6796
|
});
|
|
6796
6797
|
}
|
|
6797
6798
|
|
|
6798
|
-
function
|
|
6799
|
+
function uploadResumeRequest(_ref) {
|
|
6799
6800
|
var _ref$baseURL = _ref.baseURL,
|
|
6800
6801
|
baseURL = _ref$baseURL === void 0 ? 'https://publisher.homeapp.ru' : _ref$baseURL,
|
|
6801
|
-
body = _ref.body
|
|
6802
|
-
|
|
6802
|
+
body = _ref.body,
|
|
6803
|
+
headers = _ref.headers;
|
|
6804
|
+
var formData = new FormData();
|
|
6805
|
+
formData.append('firstname', (body == null ? void 0 : body.firstname) || '');
|
|
6806
|
+
formData.append('lastname', (body == null ? void 0 : body.lastname) || '');
|
|
6807
|
+
formData.append('phone', (body == null ? void 0 : body.phone) || '');
|
|
6808
|
+
formData.append('email', (body == null ? void 0 : body.email) || '');
|
|
6809
|
+
formData.append('source', (body == null ? void 0 : body.source) || '');
|
|
6810
|
+
formData.append('comment', (body == null ? void 0 : body.comment) || '');
|
|
6811
|
+
formData.append('vacancy_name', (body == null ? void 0 : body.vacancy_name) || '');
|
|
6812
|
+
|
|
6813
|
+
if (!isNil(body == null ? void 0 : body.file)) {
|
|
6814
|
+
formData.append('file', body == null ? void 0 : body.file);
|
|
6815
|
+
}
|
|
6816
|
+
|
|
6817
|
+
return axios.post('/resume', formData, {
|
|
6803
6818
|
baseURL: baseURL,
|
|
6804
|
-
headers: {
|
|
6819
|
+
headers: _extends({
|
|
6805
6820
|
Accept: 'application/json',
|
|
6806
6821
|
'Content-Type': 'multipart/form-data'
|
|
6807
|
-
}
|
|
6822
|
+
}, headers),
|
|
6823
|
+
transformResponse: [].concat(axios.defaults.transformResponse, [function (data) {
|
|
6824
|
+
return data.success ? null : data.data.error;
|
|
6825
|
+
}])
|
|
6808
6826
|
}).then(function (res) {
|
|
6809
|
-
return
|
|
6810
|
-
data: res.data.success
|
|
6811
|
-
};
|
|
6827
|
+
return res;
|
|
6812
6828
|
})["catch"](function (err) {
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
var error = new Error(err.message);
|
|
6816
|
-
error.status = (_err$response$status = (_err$response = err.response) == null ? void 0 : _err$response.status) != null ? _err$response$status : 520;
|
|
6817
|
-
error.data = (_ref2 = (_err$response$data$me = (_err$response2 = err.response) == null ? void 0 : _err$response2.data.message) != null ? _err$response$data$me : (_err$response3 = err.response) == null ? void 0 : (_err$response3$data$d = _err$response3.data.data) == null ? void 0 : _err$response3$data$d.error) != null ? _ref2 : 'Unknown Error';
|
|
6818
|
-
throw error;
|
|
6829
|
+
throw err;
|
|
6819
6830
|
});
|
|
6820
6831
|
}
|
|
6821
6832
|
|
|
@@ -6968,9 +6979,10 @@ var Api$2 = function Api(baseURL) {
|
|
|
6968
6979
|
});
|
|
6969
6980
|
};
|
|
6970
6981
|
|
|
6971
|
-
this.
|
|
6972
|
-
return
|
|
6982
|
+
this.uploadResume = function (body, headers) {
|
|
6983
|
+
return uploadResumeRequest({
|
|
6973
6984
|
body: body,
|
|
6985
|
+
headers: headers,
|
|
6974
6986
|
baseURL: _this.baseURL
|
|
6975
6987
|
});
|
|
6976
6988
|
};
|
|
@@ -6987,7 +6999,7 @@ var index$2 = {
|
|
|
6987
6999
|
findStatisticRowRequest: findStatisticRowRequest,
|
|
6988
7000
|
getFirstPublishedAtRequest: getFirstPublishedAtRequest,
|
|
6989
7001
|
getPublishedDaysRequest: getPublishedDaysRequest,
|
|
6990
|
-
|
|
7002
|
+
uploadResumeRequest: uploadResumeRequest,
|
|
6991
7003
|
get ActualEventsRowSource () { return ActualEventsRowSource; },
|
|
6992
7004
|
get PlannedEventsRowSite () { return PlannedEventsRowSite; },
|
|
6993
7005
|
ActualEventsRowDictionary: ActualEventsRowDictionary
|