@pescheckit/pescheck-client-js 0.0.5
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/README.md +220 -0
- package/dist/ApiClient.js +730 -0
- package/dist/api/AuthenticationApi.js +159 -0
- package/dist/api/ChecksApi.js +120 -0
- package/dist/api/DivisionsApi.js +257 -0
- package/dist/api/OAuthApi.js +153 -0
- package/dist/api/ProfilesApi.js +301 -0
- package/dist/api/ScreeningsApi.js +213 -0
- package/dist/api/WebhooksApi.js +210 -0
- package/dist/index.js +314 -0
- package/dist/model/CustomTokenObtainPair.js +127 -0
- package/dist/model/DivisionReadOnly.js +266 -0
- package/dist/model/DivisionWrite.js +246 -0
- package/dist/model/JWTGeneration.js +155 -0
- package/dist/model/JWTResponse.js +184 -0
- package/dist/model/OAuthApplication.js +221 -0
- package/dist/model/OAuthApplicationResponse.js +252 -0
- package/dist/model/PaginatedDivisionReadOnlyList.js +168 -0
- package/dist/model/PaginatedV2ProfileListItemList.js +168 -0
- package/dist/model/PaginatedV2ScreeningListItemList.js +168 -0
- package/dist/model/PatchedDivisionWrite.js +209 -0
- package/dist/model/PatchedV2ProfilePartialUpdate.js +102 -0
- package/dist/model/TokenRefresh.js +124 -0
- package/dist/model/V2Candidate.js +1474 -0
- package/dist/model/V2CheckField.js +168 -0
- package/dist/model/V2CheckInfo.js +316 -0
- package/dist/model/V2Document.js +302 -0
- package/dist/model/V2DocumentContent.js +126 -0
- package/dist/model/V2Money.js +126 -0
- package/dist/model/V2ProfileCheck.js +222 -0
- package/dist/model/V2ProfileCheckEntry.js +311 -0
- package/dist/model/V2ProfileCreate.js +158 -0
- package/dist/model/V2ProfileDetail.js +258 -0
- package/dist/model/V2ProfileListItem.js +182 -0
- package/dist/model/V2ProfileUpdate.js +159 -0
- package/dist/model/V2ProfileUpdateCheck.js +254 -0
- package/dist/model/V2ScreeningCheck.js +243 -0
- package/dist/model/V2ScreeningCheckEntry.js +338 -0
- package/dist/model/V2ScreeningCheckListItem.js +260 -0
- package/dist/model/V2ScreeningCreate.js +158 -0
- package/dist/model/V2ScreeningDetail.js +240 -0
- package/dist/model/V2ScreeningDetailProfile.js +101 -0
- package/dist/model/V2ScreeningListItem.js +237 -0
- package/dist/model/VerifyWebhook.js +114 -0
- package/dist/model/Webhook.js +221 -0
- package/dist/model/WebhookResponse.js +215 -0
- package/package.json +54 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _V2Candidate = _interopRequireDefault(require("./V2Candidate"));
|
|
9
|
+
var _V2ScreeningCheck = _interopRequireDefault(require("./V2ScreeningCheck"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
20
|
+
* Pescheck API
|
|
21
|
+
* Official client library for the Pescheck API (v2), generated from the OpenAPI specification. Authenticate with OAuth2 client credentials and use the checks, profiles, screenings, webhooks and divisions endpoints. See https://github.com/pescheckit/pescheck-clients for installation and usage.
|
|
22
|
+
*
|
|
23
|
+
* The version of the OpenAPI document: 2.0.0
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
27
|
+
* https://openapi-generator.tech
|
|
28
|
+
* Do not edit the class manually.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The V2ScreeningCreate model module.
|
|
33
|
+
* @module model/V2ScreeningCreate
|
|
34
|
+
* @version 0.0.5
|
|
35
|
+
*/
|
|
36
|
+
var V2ScreeningCreate = /*#__PURE__*/function () {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new <code>V2ScreeningCreate</code>.
|
|
39
|
+
* @alias module:model/V2ScreeningCreate
|
|
40
|
+
* @param profileId {String}
|
|
41
|
+
* @param candidate {module:model/V2Candidate}
|
|
42
|
+
*/
|
|
43
|
+
function V2ScreeningCreate(profileId, candidate) {
|
|
44
|
+
_classCallCheck(this, V2ScreeningCreate);
|
|
45
|
+
V2ScreeningCreate.initialize(this, profileId, candidate);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Initializes the fields of this object.
|
|
50
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
51
|
+
* Only for internal use.
|
|
52
|
+
*/
|
|
53
|
+
return _createClass(V2ScreeningCreate, null, [{
|
|
54
|
+
key: "initialize",
|
|
55
|
+
value: function initialize(obj, profileId, candidate) {
|
|
56
|
+
obj['profile_id'] = profileId;
|
|
57
|
+
obj['candidate'] = candidate;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Constructs a <code>V2ScreeningCreate</code> from a plain JavaScript object, optionally creating a new instance.
|
|
62
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
63
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
64
|
+
* @param {module:model/V2ScreeningCreate} obj Optional instance to populate.
|
|
65
|
+
* @return {module:model/V2ScreeningCreate} The populated <code>V2ScreeningCreate</code> instance.
|
|
66
|
+
*/
|
|
67
|
+
}, {
|
|
68
|
+
key: "constructFromObject",
|
|
69
|
+
value: function constructFromObject(data, obj) {
|
|
70
|
+
if (data) {
|
|
71
|
+
obj = obj || new V2ScreeningCreate();
|
|
72
|
+
if (data.hasOwnProperty('profile_id')) {
|
|
73
|
+
obj['profile_id'] = _ApiClient["default"].convertToType(data['profile_id'], 'String');
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('candidate')) {
|
|
76
|
+
obj['candidate'] = _V2Candidate["default"].constructFromObject(data['candidate']);
|
|
77
|
+
}
|
|
78
|
+
if (data.hasOwnProperty('checks')) {
|
|
79
|
+
obj['checks'] = _ApiClient["default"].convertToType(data['checks'], [_V2ScreeningCheck["default"]]);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return obj;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Validates the JSON data with respect to <code>V2ScreeningCreate</code>.
|
|
87
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
88
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>V2ScreeningCreate</code>.
|
|
89
|
+
*/
|
|
90
|
+
}, {
|
|
91
|
+
key: "validateJSON",
|
|
92
|
+
value: function validateJSON(data) {
|
|
93
|
+
// check to make sure all required properties are present in the JSON string
|
|
94
|
+
var _iterator = _createForOfIteratorHelper(V2ScreeningCreate.RequiredProperties),
|
|
95
|
+
_step;
|
|
96
|
+
try {
|
|
97
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
98
|
+
var property = _step.value;
|
|
99
|
+
if (!data.hasOwnProperty(property)) {
|
|
100
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
// ensure the json data is a string
|
|
104
|
+
} catch (err) {
|
|
105
|
+
_iterator.e(err);
|
|
106
|
+
} finally {
|
|
107
|
+
_iterator.f();
|
|
108
|
+
}
|
|
109
|
+
if (data['profile_id'] && !(typeof data['profile_id'] === 'string' || data['profile_id'] instanceof String)) {
|
|
110
|
+
throw new Error("Expected the field `profile_id` to be a primitive type in the JSON string but got " + data['profile_id']);
|
|
111
|
+
}
|
|
112
|
+
// validate the optional field `candidate`
|
|
113
|
+
if (data['candidate']) {
|
|
114
|
+
// data not null
|
|
115
|
+
_V2Candidate["default"].validateJSON(data['candidate']);
|
|
116
|
+
}
|
|
117
|
+
if (data['checks']) {
|
|
118
|
+
// data not null
|
|
119
|
+
// ensure the json data is an array
|
|
120
|
+
if (!Array.isArray(data['checks'])) {
|
|
121
|
+
throw new Error("Expected the field `checks` to be an array in the JSON data but got " + data['checks']);
|
|
122
|
+
}
|
|
123
|
+
// validate the optional field `checks` (array)
|
|
124
|
+
var _iterator2 = _createForOfIteratorHelper(data['checks']),
|
|
125
|
+
_step2;
|
|
126
|
+
try {
|
|
127
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
128
|
+
var item = _step2.value;
|
|
129
|
+
_V2ScreeningCheck["default"].validateJSON(item);
|
|
130
|
+
}
|
|
131
|
+
} catch (err) {
|
|
132
|
+
_iterator2.e(err);
|
|
133
|
+
} finally {
|
|
134
|
+
_iterator2.f();
|
|
135
|
+
}
|
|
136
|
+
;
|
|
137
|
+
}
|
|
138
|
+
return true;
|
|
139
|
+
}
|
|
140
|
+
}]);
|
|
141
|
+
}();
|
|
142
|
+
V2ScreeningCreate.RequiredProperties = ["profile_id", "candidate"];
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @member {String} profile_id
|
|
146
|
+
*/
|
|
147
|
+
V2ScreeningCreate.prototype['profile_id'] = undefined;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @member {module:model/V2Candidate} candidate
|
|
151
|
+
*/
|
|
152
|
+
V2ScreeningCreate.prototype['candidate'] = undefined;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* @member {Array.<module:model/V2ScreeningCheck>} checks
|
|
156
|
+
*/
|
|
157
|
+
V2ScreeningCreate.prototype['checks'] = undefined;
|
|
158
|
+
var _default = exports["default"] = V2ScreeningCreate;
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _V2Candidate = _interopRequireDefault(require("./V2Candidate"));
|
|
9
|
+
var _V2ScreeningCheckEntry = _interopRequireDefault(require("./V2ScreeningCheckEntry"));
|
|
10
|
+
var _V2ScreeningDetailProfile = _interopRequireDefault(require("./V2ScreeningDetailProfile"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
13
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
14
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
15
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
16
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
17
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
18
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
21
|
+
* Pescheck API
|
|
22
|
+
* Official client library for the Pescheck API (v2), generated from the OpenAPI specification. Authenticate with OAuth2 client credentials and use the checks, profiles, screenings, webhooks and divisions endpoints. See https://github.com/pescheckit/pescheck-clients for installation and usage.
|
|
23
|
+
*
|
|
24
|
+
* The version of the OpenAPI document: 2.0.0
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
28
|
+
* https://openapi-generator.tech
|
|
29
|
+
* Do not edit the class manually.
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* The V2ScreeningDetail model module.
|
|
34
|
+
* @module model/V2ScreeningDetail
|
|
35
|
+
* @version 0.0.5
|
|
36
|
+
*/
|
|
37
|
+
var V2ScreeningDetail = /*#__PURE__*/function () {
|
|
38
|
+
/**
|
|
39
|
+
* Constructs a new <code>V2ScreeningDetail</code>.
|
|
40
|
+
* @alias module:model/V2ScreeningDetail
|
|
41
|
+
* @param id {String}
|
|
42
|
+
* @param status {String}
|
|
43
|
+
* @param profile {module:model/V2ScreeningDetailProfile}
|
|
44
|
+
* @param candidate {module:model/V2Candidate}
|
|
45
|
+
* @param checks {Array.<module:model/V2ScreeningCheckEntry>}
|
|
46
|
+
* @param candidateWizardUrl {String} Public wizard URL for the candidate. Null when no check needs candidate input.
|
|
47
|
+
* @param dashboardUrl {String} Dashboard URL for this screening.
|
|
48
|
+
* @param createdAt {Date}
|
|
49
|
+
* @param updatedAt {Date}
|
|
50
|
+
*/
|
|
51
|
+
function V2ScreeningDetail(id, status, profile, candidate, checks, candidateWizardUrl, dashboardUrl, createdAt, updatedAt) {
|
|
52
|
+
_classCallCheck(this, V2ScreeningDetail);
|
|
53
|
+
V2ScreeningDetail.initialize(this, id, status, profile, candidate, checks, candidateWizardUrl, dashboardUrl, createdAt, updatedAt);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Initializes the fields of this object.
|
|
58
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
59
|
+
* Only for internal use.
|
|
60
|
+
*/
|
|
61
|
+
return _createClass(V2ScreeningDetail, null, [{
|
|
62
|
+
key: "initialize",
|
|
63
|
+
value: function initialize(obj, id, status, profile, candidate, checks, candidateWizardUrl, dashboardUrl, createdAt, updatedAt) {
|
|
64
|
+
obj['id'] = id;
|
|
65
|
+
obj['status'] = status;
|
|
66
|
+
obj['profile'] = profile;
|
|
67
|
+
obj['candidate'] = candidate;
|
|
68
|
+
obj['checks'] = checks;
|
|
69
|
+
obj['candidate_wizard_url'] = candidateWizardUrl;
|
|
70
|
+
obj['dashboard_url'] = dashboardUrl;
|
|
71
|
+
obj['created_at'] = createdAt;
|
|
72
|
+
obj['updated_at'] = updatedAt;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Constructs a <code>V2ScreeningDetail</code> from a plain JavaScript object, optionally creating a new instance.
|
|
77
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
78
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
79
|
+
* @param {module:model/V2ScreeningDetail} obj Optional instance to populate.
|
|
80
|
+
* @return {module:model/V2ScreeningDetail} The populated <code>V2ScreeningDetail</code> instance.
|
|
81
|
+
*/
|
|
82
|
+
}, {
|
|
83
|
+
key: "constructFromObject",
|
|
84
|
+
value: function constructFromObject(data, obj) {
|
|
85
|
+
if (data) {
|
|
86
|
+
obj = obj || new V2ScreeningDetail();
|
|
87
|
+
if (data.hasOwnProperty('id')) {
|
|
88
|
+
obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
|
|
89
|
+
}
|
|
90
|
+
if (data.hasOwnProperty('status')) {
|
|
91
|
+
obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
|
|
92
|
+
}
|
|
93
|
+
if (data.hasOwnProperty('profile')) {
|
|
94
|
+
obj['profile'] = _V2ScreeningDetailProfile["default"].constructFromObject(data['profile']);
|
|
95
|
+
}
|
|
96
|
+
if (data.hasOwnProperty('candidate')) {
|
|
97
|
+
obj['candidate'] = _ApiClient["default"].convertToType(data['candidate'], _V2Candidate["default"]);
|
|
98
|
+
}
|
|
99
|
+
if (data.hasOwnProperty('checks')) {
|
|
100
|
+
obj['checks'] = _ApiClient["default"].convertToType(data['checks'], [_V2ScreeningCheckEntry["default"]]);
|
|
101
|
+
}
|
|
102
|
+
if (data.hasOwnProperty('candidate_wizard_url')) {
|
|
103
|
+
obj['candidate_wizard_url'] = _ApiClient["default"].convertToType(data['candidate_wizard_url'], 'String');
|
|
104
|
+
}
|
|
105
|
+
if (data.hasOwnProperty('dashboard_url')) {
|
|
106
|
+
obj['dashboard_url'] = _ApiClient["default"].convertToType(data['dashboard_url'], 'String');
|
|
107
|
+
}
|
|
108
|
+
if (data.hasOwnProperty('created_at')) {
|
|
109
|
+
obj['created_at'] = _ApiClient["default"].convertToType(data['created_at'], 'Date');
|
|
110
|
+
}
|
|
111
|
+
if (data.hasOwnProperty('updated_at')) {
|
|
112
|
+
obj['updated_at'] = _ApiClient["default"].convertToType(data['updated_at'], 'Date');
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return obj;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Validates the JSON data with respect to <code>V2ScreeningDetail</code>.
|
|
120
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
121
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>V2ScreeningDetail</code>.
|
|
122
|
+
*/
|
|
123
|
+
}, {
|
|
124
|
+
key: "validateJSON",
|
|
125
|
+
value: function validateJSON(data) {
|
|
126
|
+
// check to make sure all required properties are present in the JSON string
|
|
127
|
+
var _iterator = _createForOfIteratorHelper(V2ScreeningDetail.RequiredProperties),
|
|
128
|
+
_step;
|
|
129
|
+
try {
|
|
130
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
131
|
+
var property = _step.value;
|
|
132
|
+
if (!data.hasOwnProperty(property)) {
|
|
133
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
// ensure the json data is a string
|
|
137
|
+
} catch (err) {
|
|
138
|
+
_iterator.e(err);
|
|
139
|
+
} finally {
|
|
140
|
+
_iterator.f();
|
|
141
|
+
}
|
|
142
|
+
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
143
|
+
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
144
|
+
}
|
|
145
|
+
// ensure the json data is a string
|
|
146
|
+
if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
|
|
147
|
+
throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
|
|
148
|
+
}
|
|
149
|
+
// validate the optional field `profile`
|
|
150
|
+
if (data['profile']) {
|
|
151
|
+
// data not null
|
|
152
|
+
_V2ScreeningDetailProfile["default"].validateJSON(data['profile']);
|
|
153
|
+
}
|
|
154
|
+
// validate the optional field `candidate`
|
|
155
|
+
if (data['candidate']) {
|
|
156
|
+
// data not null
|
|
157
|
+
_V2Candidate["default"].validateJSON(data['candidate']);
|
|
158
|
+
}
|
|
159
|
+
if (data['checks']) {
|
|
160
|
+
// data not null
|
|
161
|
+
// ensure the json data is an array
|
|
162
|
+
if (!Array.isArray(data['checks'])) {
|
|
163
|
+
throw new Error("Expected the field `checks` to be an array in the JSON data but got " + data['checks']);
|
|
164
|
+
}
|
|
165
|
+
// validate the optional field `checks` (array)
|
|
166
|
+
var _iterator2 = _createForOfIteratorHelper(data['checks']),
|
|
167
|
+
_step2;
|
|
168
|
+
try {
|
|
169
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
170
|
+
var item = _step2.value;
|
|
171
|
+
_V2ScreeningCheckEntry["default"].validateJSON(item);
|
|
172
|
+
}
|
|
173
|
+
} catch (err) {
|
|
174
|
+
_iterator2.e(err);
|
|
175
|
+
} finally {
|
|
176
|
+
_iterator2.f();
|
|
177
|
+
}
|
|
178
|
+
;
|
|
179
|
+
}
|
|
180
|
+
// ensure the json data is a string
|
|
181
|
+
if (data['candidate_wizard_url'] && !(typeof data['candidate_wizard_url'] === 'string' || data['candidate_wizard_url'] instanceof String)) {
|
|
182
|
+
throw new Error("Expected the field `candidate_wizard_url` to be a primitive type in the JSON string but got " + data['candidate_wizard_url']);
|
|
183
|
+
}
|
|
184
|
+
// ensure the json data is a string
|
|
185
|
+
if (data['dashboard_url'] && !(typeof data['dashboard_url'] === 'string' || data['dashboard_url'] instanceof String)) {
|
|
186
|
+
throw new Error("Expected the field `dashboard_url` to be a primitive type in the JSON string but got " + data['dashboard_url']);
|
|
187
|
+
}
|
|
188
|
+
return true;
|
|
189
|
+
}
|
|
190
|
+
}]);
|
|
191
|
+
}();
|
|
192
|
+
V2ScreeningDetail.RequiredProperties = ["id", "status", "profile", "candidate", "checks", "candidate_wizard_url", "dashboard_url", "created_at", "updated_at"];
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @member {String} id
|
|
196
|
+
*/
|
|
197
|
+
V2ScreeningDetail.prototype['id'] = undefined;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* @member {String} status
|
|
201
|
+
*/
|
|
202
|
+
V2ScreeningDetail.prototype['status'] = undefined;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* @member {module:model/V2ScreeningDetailProfile} profile
|
|
206
|
+
*/
|
|
207
|
+
V2ScreeningDetail.prototype['profile'] = undefined;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @member {module:model/V2Candidate} candidate
|
|
211
|
+
*/
|
|
212
|
+
V2ScreeningDetail.prototype['candidate'] = undefined;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* @member {Array.<module:model/V2ScreeningCheckEntry>} checks
|
|
216
|
+
*/
|
|
217
|
+
V2ScreeningDetail.prototype['checks'] = undefined;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Public wizard URL for the candidate. Null when no check needs candidate input.
|
|
221
|
+
* @member {String} candidate_wizard_url
|
|
222
|
+
*/
|
|
223
|
+
V2ScreeningDetail.prototype['candidate_wizard_url'] = undefined;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Dashboard URL for this screening.
|
|
227
|
+
* @member {String} dashboard_url
|
|
228
|
+
*/
|
|
229
|
+
V2ScreeningDetail.prototype['dashboard_url'] = undefined;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* @member {Date} created_at
|
|
233
|
+
*/
|
|
234
|
+
V2ScreeningDetail.prototype['created_at'] = undefined;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* @member {Date} updated_at
|
|
238
|
+
*/
|
|
239
|
+
V2ScreeningDetail.prototype['updated_at'] = undefined;
|
|
240
|
+
var _default = exports["default"] = V2ScreeningDetail;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
15
|
+
* Pescheck API
|
|
16
|
+
* Official client library for the Pescheck API (v2), generated from the OpenAPI specification. Authenticate with OAuth2 client credentials and use the checks, profiles, screenings, webhooks and divisions endpoints. See https://github.com/pescheckit/pescheck-clients for installation and usage.
|
|
17
|
+
*
|
|
18
|
+
* The version of the OpenAPI document: 2.0.0
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22
|
+
* https://openapi-generator.tech
|
|
23
|
+
* Do not edit the class manually.
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* The V2ScreeningDetailProfile model module.
|
|
28
|
+
* @module model/V2ScreeningDetailProfile
|
|
29
|
+
* @version 0.0.5
|
|
30
|
+
*/
|
|
31
|
+
var V2ScreeningDetailProfile = /*#__PURE__*/function () {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new <code>V2ScreeningDetailProfile</code>.
|
|
34
|
+
* @alias module:model/V2ScreeningDetailProfile
|
|
35
|
+
*/
|
|
36
|
+
function V2ScreeningDetailProfile() {
|
|
37
|
+
_classCallCheck(this, V2ScreeningDetailProfile);
|
|
38
|
+
V2ScreeningDetailProfile.initialize(this);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Initializes the fields of this object.
|
|
43
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
44
|
+
* Only for internal use.
|
|
45
|
+
*/
|
|
46
|
+
return _createClass(V2ScreeningDetailProfile, null, [{
|
|
47
|
+
key: "initialize",
|
|
48
|
+
value: function initialize(obj) {}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Constructs a <code>V2ScreeningDetailProfile</code> from a plain JavaScript object, optionally creating a new instance.
|
|
52
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
53
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
54
|
+
* @param {module:model/V2ScreeningDetailProfile} obj Optional instance to populate.
|
|
55
|
+
* @return {module:model/V2ScreeningDetailProfile} The populated <code>V2ScreeningDetailProfile</code> instance.
|
|
56
|
+
*/
|
|
57
|
+
}, {
|
|
58
|
+
key: "constructFromObject",
|
|
59
|
+
value: function constructFromObject(data, obj) {
|
|
60
|
+
if (data) {
|
|
61
|
+
obj = obj || new V2ScreeningDetailProfile();
|
|
62
|
+
if (data.hasOwnProperty('id')) {
|
|
63
|
+
obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
|
|
64
|
+
}
|
|
65
|
+
if (data.hasOwnProperty('name')) {
|
|
66
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return obj;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Validates the JSON data with respect to <code>V2ScreeningDetailProfile</code>.
|
|
74
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
75
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>V2ScreeningDetailProfile</code>.
|
|
76
|
+
*/
|
|
77
|
+
}, {
|
|
78
|
+
key: "validateJSON",
|
|
79
|
+
value: function validateJSON(data) {
|
|
80
|
+
// ensure the json data is a string
|
|
81
|
+
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
82
|
+
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
83
|
+
}
|
|
84
|
+
// ensure the json data is a string
|
|
85
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
86
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
87
|
+
}
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
}]);
|
|
91
|
+
}();
|
|
92
|
+
/**
|
|
93
|
+
* @member {String} id
|
|
94
|
+
*/
|
|
95
|
+
V2ScreeningDetailProfile.prototype['id'] = undefined;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @member {String} name
|
|
99
|
+
*/
|
|
100
|
+
V2ScreeningDetailProfile.prototype['name'] = undefined;
|
|
101
|
+
var _default = exports["default"] = V2ScreeningDetailProfile;
|