@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.
Files changed (47) hide show
  1. package/README.md +220 -0
  2. package/dist/ApiClient.js +730 -0
  3. package/dist/api/AuthenticationApi.js +159 -0
  4. package/dist/api/ChecksApi.js +120 -0
  5. package/dist/api/DivisionsApi.js +257 -0
  6. package/dist/api/OAuthApi.js +153 -0
  7. package/dist/api/ProfilesApi.js +301 -0
  8. package/dist/api/ScreeningsApi.js +213 -0
  9. package/dist/api/WebhooksApi.js +210 -0
  10. package/dist/index.js +314 -0
  11. package/dist/model/CustomTokenObtainPair.js +127 -0
  12. package/dist/model/DivisionReadOnly.js +266 -0
  13. package/dist/model/DivisionWrite.js +246 -0
  14. package/dist/model/JWTGeneration.js +155 -0
  15. package/dist/model/JWTResponse.js +184 -0
  16. package/dist/model/OAuthApplication.js +221 -0
  17. package/dist/model/OAuthApplicationResponse.js +252 -0
  18. package/dist/model/PaginatedDivisionReadOnlyList.js +168 -0
  19. package/dist/model/PaginatedV2ProfileListItemList.js +168 -0
  20. package/dist/model/PaginatedV2ScreeningListItemList.js +168 -0
  21. package/dist/model/PatchedDivisionWrite.js +209 -0
  22. package/dist/model/PatchedV2ProfilePartialUpdate.js +102 -0
  23. package/dist/model/TokenRefresh.js +124 -0
  24. package/dist/model/V2Candidate.js +1474 -0
  25. package/dist/model/V2CheckField.js +168 -0
  26. package/dist/model/V2CheckInfo.js +316 -0
  27. package/dist/model/V2Document.js +302 -0
  28. package/dist/model/V2DocumentContent.js +126 -0
  29. package/dist/model/V2Money.js +126 -0
  30. package/dist/model/V2ProfileCheck.js +222 -0
  31. package/dist/model/V2ProfileCheckEntry.js +311 -0
  32. package/dist/model/V2ProfileCreate.js +158 -0
  33. package/dist/model/V2ProfileDetail.js +258 -0
  34. package/dist/model/V2ProfileListItem.js +182 -0
  35. package/dist/model/V2ProfileUpdate.js +159 -0
  36. package/dist/model/V2ProfileUpdateCheck.js +254 -0
  37. package/dist/model/V2ScreeningCheck.js +243 -0
  38. package/dist/model/V2ScreeningCheckEntry.js +338 -0
  39. package/dist/model/V2ScreeningCheckListItem.js +260 -0
  40. package/dist/model/V2ScreeningCreate.js +158 -0
  41. package/dist/model/V2ScreeningDetail.js +240 -0
  42. package/dist/model/V2ScreeningDetailProfile.js +101 -0
  43. package/dist/model/V2ScreeningListItem.js +237 -0
  44. package/dist/model/VerifyWebhook.js +114 -0
  45. package/dist/model/Webhook.js +221 -0
  46. package/dist/model/WebhookResponse.js +215 -0
  47. package/package.json +54 -0
@@ -0,0 +1,338 @@
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 _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; } } }; }
11
+ 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; } }
12
+ 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; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ 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); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ 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); } /**
18
+ * Pescheck API
19
+ * 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.
20
+ *
21
+ * The version of the OpenAPI document: 2.0.0
22
+ *
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The V2ScreeningCheckEntry model module.
31
+ * @module model/V2ScreeningCheckEntry
32
+ * @version 0.0.5
33
+ */
34
+ var V2ScreeningCheckEntry = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>V2ScreeningCheckEntry</code>.
37
+ * @alias module:model/V2ScreeningCheckEntry
38
+ * @param id {String}
39
+ * @param profileCheckId {String}
40
+ * @param checkType {module:model/V2ScreeningCheckEntry.CheckTypeEnum} * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `focumcheck` - focumcheck * `id2check` - id2check * `idcheck` - idcheck * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `permissioncheck` - permissioncheck * `pescheckadversemediacheck` - pescheckadversemediacheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck
41
+ * @param displayName {String}
42
+ * @param status {String}
43
+ * @param config {Object.<String, Object>}
44
+ * @param input {Object.<String, Object>}
45
+ * @param output {Object.<String, Object>}
46
+ * @param candidateWizardUrl {String} Deep link to this check's candidate wizard step. Null when the check has no dedicated candidate step.
47
+ */
48
+ function V2ScreeningCheckEntry(id, profileCheckId, checkType, displayName, status, config, input, output, candidateWizardUrl) {
49
+ _classCallCheck(this, V2ScreeningCheckEntry);
50
+ V2ScreeningCheckEntry.initialize(this, id, profileCheckId, checkType, displayName, status, config, input, output, candidateWizardUrl);
51
+ }
52
+
53
+ /**
54
+ * Initializes the fields of this object.
55
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
56
+ * Only for internal use.
57
+ */
58
+ return _createClass(V2ScreeningCheckEntry, null, [{
59
+ key: "initialize",
60
+ value: function initialize(obj, id, profileCheckId, checkType, displayName, status, config, input, output, candidateWizardUrl) {
61
+ obj['id'] = id;
62
+ obj['profile_check_id'] = profileCheckId;
63
+ obj['check_type'] = checkType;
64
+ obj['display_name'] = displayName;
65
+ obj['status'] = status;
66
+ obj['config'] = config;
67
+ obj['input'] = input;
68
+ obj['output'] = output;
69
+ obj['candidate_wizard_url'] = candidateWizardUrl;
70
+ }
71
+
72
+ /**
73
+ * Constructs a <code>V2ScreeningCheckEntry</code> from a plain JavaScript object, optionally creating a new instance.
74
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
75
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
76
+ * @param {module:model/V2ScreeningCheckEntry} obj Optional instance to populate.
77
+ * @return {module:model/V2ScreeningCheckEntry} The populated <code>V2ScreeningCheckEntry</code> instance.
78
+ */
79
+ }, {
80
+ key: "constructFromObject",
81
+ value: function constructFromObject(data, obj) {
82
+ if (data) {
83
+ obj = obj || new V2ScreeningCheckEntry();
84
+ if (data.hasOwnProperty('id')) {
85
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
86
+ }
87
+ if (data.hasOwnProperty('profile_check_id')) {
88
+ obj['profile_check_id'] = _ApiClient["default"].convertToType(data['profile_check_id'], 'String');
89
+ }
90
+ if (data.hasOwnProperty('check_type')) {
91
+ obj['check_type'] = _ApiClient["default"].convertToType(data['check_type'], 'String');
92
+ }
93
+ if (data.hasOwnProperty('display_name')) {
94
+ obj['display_name'] = _ApiClient["default"].convertToType(data['display_name'], 'String');
95
+ }
96
+ if (data.hasOwnProperty('status')) {
97
+ obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
98
+ }
99
+ if (data.hasOwnProperty('config')) {
100
+ obj['config'] = _ApiClient["default"].convertToType(data['config'], {
101
+ 'String': Object
102
+ });
103
+ }
104
+ if (data.hasOwnProperty('input')) {
105
+ obj['input'] = _ApiClient["default"].convertToType(data['input'], {
106
+ 'String': Object
107
+ });
108
+ }
109
+ if (data.hasOwnProperty('output')) {
110
+ obj['output'] = _ApiClient["default"].convertToType(data['output'], {
111
+ 'String': Object
112
+ });
113
+ }
114
+ if (data.hasOwnProperty('candidate_wizard_url')) {
115
+ obj['candidate_wizard_url'] = _ApiClient["default"].convertToType(data['candidate_wizard_url'], 'String');
116
+ }
117
+ }
118
+ return obj;
119
+ }
120
+
121
+ /**
122
+ * Validates the JSON data with respect to <code>V2ScreeningCheckEntry</code>.
123
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
124
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>V2ScreeningCheckEntry</code>.
125
+ */
126
+ }, {
127
+ key: "validateJSON",
128
+ value: function validateJSON(data) {
129
+ // check to make sure all required properties are present in the JSON string
130
+ var _iterator = _createForOfIteratorHelper(V2ScreeningCheckEntry.RequiredProperties),
131
+ _step;
132
+ try {
133
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
134
+ var property = _step.value;
135
+ if (!data.hasOwnProperty(property)) {
136
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
137
+ }
138
+ }
139
+ // ensure the json data is a string
140
+ } catch (err) {
141
+ _iterator.e(err);
142
+ } finally {
143
+ _iterator.f();
144
+ }
145
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
146
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
147
+ }
148
+ // ensure the json data is a string
149
+ if (data['profile_check_id'] && !(typeof data['profile_check_id'] === 'string' || data['profile_check_id'] instanceof String)) {
150
+ throw new Error("Expected the field `profile_check_id` to be a primitive type in the JSON string but got " + data['profile_check_id']);
151
+ }
152
+ // ensure the json data is a string
153
+ if (data['check_type'] && !(typeof data['check_type'] === 'string' || data['check_type'] instanceof String)) {
154
+ throw new Error("Expected the field `check_type` to be a primitive type in the JSON string but got " + data['check_type']);
155
+ }
156
+ // ensure the json data is a string
157
+ if (data['display_name'] && !(typeof data['display_name'] === 'string' || data['display_name'] instanceof String)) {
158
+ throw new Error("Expected the field `display_name` to be a primitive type in the JSON string but got " + data['display_name']);
159
+ }
160
+ // ensure the json data is a string
161
+ if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
162
+ throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
163
+ }
164
+ // ensure the json data is a string
165
+ if (data['candidate_wizard_url'] && !(typeof data['candidate_wizard_url'] === 'string' || data['candidate_wizard_url'] instanceof String)) {
166
+ throw new Error("Expected the field `candidate_wizard_url` to be a primitive type in the JSON string but got " + data['candidate_wizard_url']);
167
+ }
168
+ return true;
169
+ }
170
+ }]);
171
+ }();
172
+ V2ScreeningCheckEntry.RequiredProperties = ["id", "profile_check_id", "check_type", "display_name", "status", "config", "input", "output", "candidate_wizard_url"];
173
+
174
+ /**
175
+ * @member {String} id
176
+ */
177
+ V2ScreeningCheckEntry.prototype['id'] = undefined;
178
+
179
+ /**
180
+ * @member {String} profile_check_id
181
+ */
182
+ V2ScreeningCheckEntry.prototype['profile_check_id'] = undefined;
183
+
184
+ /**
185
+ * * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `focumcheck` - focumcheck * `id2check` - id2check * `idcheck` - idcheck * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `permissioncheck` - permissioncheck * `pescheckadversemediacheck` - pescheckadversemediacheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck
186
+ * @member {module:model/V2ScreeningCheckEntry.CheckTypeEnum} check_type
187
+ */
188
+ V2ScreeningCheckEntry.prototype['check_type'] = undefined;
189
+
190
+ /**
191
+ * @member {String} display_name
192
+ */
193
+ V2ScreeningCheckEntry.prototype['display_name'] = undefined;
194
+
195
+ /**
196
+ * @member {String} status
197
+ */
198
+ V2ScreeningCheckEntry.prototype['status'] = undefined;
199
+
200
+ /**
201
+ * @member {Object.<String, Object>} config
202
+ */
203
+ V2ScreeningCheckEntry.prototype['config'] = undefined;
204
+
205
+ /**
206
+ * @member {Object.<String, Object>} input
207
+ */
208
+ V2ScreeningCheckEntry.prototype['input'] = undefined;
209
+
210
+ /**
211
+ * @member {Object.<String, Object>} output
212
+ */
213
+ V2ScreeningCheckEntry.prototype['output'] = undefined;
214
+
215
+ /**
216
+ * Deep link to this check's candidate wizard step. Null when the check has no dedicated candidate step.
217
+ * @member {String} candidate_wizard_url
218
+ */
219
+ V2ScreeningCheckEntry.prototype['candidate_wizard_url'] = undefined;
220
+
221
+ /**
222
+ * Allowed values for the <code>check_type</code> property.
223
+ * @enum {String}
224
+ * @readonly
225
+ */
226
+ V2ScreeningCheckEntry['CheckTypeEnum'] = {
227
+ /**
228
+ * value: "addresscheck"
229
+ * @const
230
+ */
231
+ "addresscheck": "addresscheck",
232
+ /**
233
+ * value: "adversemediacheck"
234
+ * @const
235
+ */
236
+ "adversemediacheck": "adversemediacheck",
237
+ /**
238
+ * value: "bigcheck"
239
+ * @const
240
+ */
241
+ "bigcheck": "bigcheck",
242
+ /**
243
+ * value: "criminalrecordscheck"
244
+ * @const
245
+ */
246
+ "criminalrecordscheck": "criminalrecordscheck",
247
+ /**
248
+ * value: "criminalrecordsuploadcheck"
249
+ * @const
250
+ */
251
+ "criminalrecordsuploadcheck": "criminalrecordsuploadcheck",
252
+ /**
253
+ * value: "customintegritycheck"
254
+ * @const
255
+ */
256
+ "customintegritycheck": "customintegritycheck",
257
+ /**
258
+ * value: "cvcheck"
259
+ * @const
260
+ */
261
+ "cvcheck": "cvcheck",
262
+ /**
263
+ * value: "edrcheck"
264
+ * @const
265
+ */
266
+ "edrcheck": "edrcheck",
267
+ /**
268
+ * value: "focumcheck"
269
+ * @const
270
+ */
271
+ "focumcheck": "focumcheck",
272
+ /**
273
+ * value: "id2check"
274
+ * @const
275
+ */
276
+ "id2check": "id2check",
277
+ /**
278
+ * value: "idcheck"
279
+ * @const
280
+ */
281
+ "idcheck": "idcheck",
282
+ /**
283
+ * value: "integritycheck"
284
+ * @const
285
+ */
286
+ "integritycheck": "integritycheck",
287
+ /**
288
+ * value: "openhealthcarecheck"
289
+ * @const
290
+ */
291
+ "openhealthcarecheck": "openhealthcarecheck",
292
+ /**
293
+ * value: "permissioncheck"
294
+ * @const
295
+ */
296
+ "permissioncheck": "permissioncheck",
297
+ /**
298
+ * value: "pescheckadversemediacheck"
299
+ * @const
300
+ */
301
+ "pescheckadversemediacheck": "pescheckadversemediacheck",
302
+ /**
303
+ * value: "qualificationcheck"
304
+ * @const
305
+ */
306
+ "qualificationcheck": "qualificationcheck",
307
+ /**
308
+ * value: "righttoworkcheck"
309
+ * @const
310
+ */
311
+ "righttoworkcheck": "righttoworkcheck",
312
+ /**
313
+ * value: "vogcheck"
314
+ * @const
315
+ */
316
+ "vogcheck": "vogcheck",
317
+ /**
318
+ * value: "watchlist2check"
319
+ * @const
320
+ */
321
+ "watchlist2check": "watchlist2check",
322
+ /**
323
+ * value: "watchlistcheck"
324
+ * @const
325
+ */
326
+ "watchlistcheck": "watchlistcheck",
327
+ /**
328
+ * value: "workreferencecheck"
329
+ * @const
330
+ */
331
+ "workreferencecheck": "workreferencecheck",
332
+ /**
333
+ * value: "worldwidecreditcheck"
334
+ * @const
335
+ */
336
+ "worldwidecreditcheck": "worldwidecreditcheck"
337
+ };
338
+ var _default = exports["default"] = V2ScreeningCheckEntry;
@@ -0,0 +1,260 @@
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 _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; } } }; }
11
+ 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; } }
12
+ 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; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ 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); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ 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); } /**
18
+ * Pescheck API
19
+ * 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.
20
+ *
21
+ * The version of the OpenAPI document: 2.0.0
22
+ *
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The V2ScreeningCheckListItem model module.
31
+ * @module model/V2ScreeningCheckListItem
32
+ * @version 0.0.5
33
+ */
34
+ var V2ScreeningCheckListItem = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>V2ScreeningCheckListItem</code>.
37
+ * Minimal check entry shape for screening list items. No config/input/etc.
38
+ * @alias module:model/V2ScreeningCheckListItem
39
+ * @param id {String}
40
+ * @param checkType {module:model/V2ScreeningCheckListItem.CheckTypeEnum} * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `focumcheck` - focumcheck * `id2check` - id2check * `idcheck` - idcheck * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `permissioncheck` - permissioncheck * `pescheckadversemediacheck` - pescheckadversemediacheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck
41
+ * @param status {String}
42
+ */
43
+ function V2ScreeningCheckListItem(id, checkType, status) {
44
+ _classCallCheck(this, V2ScreeningCheckListItem);
45
+ V2ScreeningCheckListItem.initialize(this, id, checkType, status);
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(V2ScreeningCheckListItem, null, [{
54
+ key: "initialize",
55
+ value: function initialize(obj, id, checkType, status) {
56
+ obj['id'] = id;
57
+ obj['check_type'] = checkType;
58
+ obj['status'] = status;
59
+ }
60
+
61
+ /**
62
+ * Constructs a <code>V2ScreeningCheckListItem</code> from a plain JavaScript object, optionally creating a new instance.
63
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
64
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
65
+ * @param {module:model/V2ScreeningCheckListItem} obj Optional instance to populate.
66
+ * @return {module:model/V2ScreeningCheckListItem} The populated <code>V2ScreeningCheckListItem</code> instance.
67
+ */
68
+ }, {
69
+ key: "constructFromObject",
70
+ value: function constructFromObject(data, obj) {
71
+ if (data) {
72
+ obj = obj || new V2ScreeningCheckListItem();
73
+ if (data.hasOwnProperty('id')) {
74
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
75
+ }
76
+ if (data.hasOwnProperty('check_type')) {
77
+ obj['check_type'] = _ApiClient["default"].convertToType(data['check_type'], 'String');
78
+ }
79
+ if (data.hasOwnProperty('status')) {
80
+ obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
81
+ }
82
+ }
83
+ return obj;
84
+ }
85
+
86
+ /**
87
+ * Validates the JSON data with respect to <code>V2ScreeningCheckListItem</code>.
88
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
89
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>V2ScreeningCheckListItem</code>.
90
+ */
91
+ }, {
92
+ key: "validateJSON",
93
+ value: function validateJSON(data) {
94
+ // check to make sure all required properties are present in the JSON string
95
+ var _iterator = _createForOfIteratorHelper(V2ScreeningCheckListItem.RequiredProperties),
96
+ _step;
97
+ try {
98
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
99
+ var property = _step.value;
100
+ if (!data.hasOwnProperty(property)) {
101
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
102
+ }
103
+ }
104
+ // ensure the json data is a string
105
+ } catch (err) {
106
+ _iterator.e(err);
107
+ } finally {
108
+ _iterator.f();
109
+ }
110
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
111
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
112
+ }
113
+ // ensure the json data is a string
114
+ if (data['check_type'] && !(typeof data['check_type'] === 'string' || data['check_type'] instanceof String)) {
115
+ throw new Error("Expected the field `check_type` to be a primitive type in the JSON string but got " + data['check_type']);
116
+ }
117
+ // ensure the json data is a string
118
+ if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
119
+ throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
120
+ }
121
+ return true;
122
+ }
123
+ }]);
124
+ }();
125
+ V2ScreeningCheckListItem.RequiredProperties = ["id", "check_type", "status"];
126
+
127
+ /**
128
+ * @member {String} id
129
+ */
130
+ V2ScreeningCheckListItem.prototype['id'] = undefined;
131
+
132
+ /**
133
+ * * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `focumcheck` - focumcheck * `id2check` - id2check * `idcheck` - idcheck * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `permissioncheck` - permissioncheck * `pescheckadversemediacheck` - pescheckadversemediacheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck
134
+ * @member {module:model/V2ScreeningCheckListItem.CheckTypeEnum} check_type
135
+ */
136
+ V2ScreeningCheckListItem.prototype['check_type'] = undefined;
137
+
138
+ /**
139
+ * @member {String} status
140
+ */
141
+ V2ScreeningCheckListItem.prototype['status'] = undefined;
142
+
143
+ /**
144
+ * Allowed values for the <code>check_type</code> property.
145
+ * @enum {String}
146
+ * @readonly
147
+ */
148
+ V2ScreeningCheckListItem['CheckTypeEnum'] = {
149
+ /**
150
+ * value: "addresscheck"
151
+ * @const
152
+ */
153
+ "addresscheck": "addresscheck",
154
+ /**
155
+ * value: "adversemediacheck"
156
+ * @const
157
+ */
158
+ "adversemediacheck": "adversemediacheck",
159
+ /**
160
+ * value: "bigcheck"
161
+ * @const
162
+ */
163
+ "bigcheck": "bigcheck",
164
+ /**
165
+ * value: "criminalrecordscheck"
166
+ * @const
167
+ */
168
+ "criminalrecordscheck": "criminalrecordscheck",
169
+ /**
170
+ * value: "criminalrecordsuploadcheck"
171
+ * @const
172
+ */
173
+ "criminalrecordsuploadcheck": "criminalrecordsuploadcheck",
174
+ /**
175
+ * value: "customintegritycheck"
176
+ * @const
177
+ */
178
+ "customintegritycheck": "customintegritycheck",
179
+ /**
180
+ * value: "cvcheck"
181
+ * @const
182
+ */
183
+ "cvcheck": "cvcheck",
184
+ /**
185
+ * value: "edrcheck"
186
+ * @const
187
+ */
188
+ "edrcheck": "edrcheck",
189
+ /**
190
+ * value: "focumcheck"
191
+ * @const
192
+ */
193
+ "focumcheck": "focumcheck",
194
+ /**
195
+ * value: "id2check"
196
+ * @const
197
+ */
198
+ "id2check": "id2check",
199
+ /**
200
+ * value: "idcheck"
201
+ * @const
202
+ */
203
+ "idcheck": "idcheck",
204
+ /**
205
+ * value: "integritycheck"
206
+ * @const
207
+ */
208
+ "integritycheck": "integritycheck",
209
+ /**
210
+ * value: "openhealthcarecheck"
211
+ * @const
212
+ */
213
+ "openhealthcarecheck": "openhealthcarecheck",
214
+ /**
215
+ * value: "permissioncheck"
216
+ * @const
217
+ */
218
+ "permissioncheck": "permissioncheck",
219
+ /**
220
+ * value: "pescheckadversemediacheck"
221
+ * @const
222
+ */
223
+ "pescheckadversemediacheck": "pescheckadversemediacheck",
224
+ /**
225
+ * value: "qualificationcheck"
226
+ * @const
227
+ */
228
+ "qualificationcheck": "qualificationcheck",
229
+ /**
230
+ * value: "righttoworkcheck"
231
+ * @const
232
+ */
233
+ "righttoworkcheck": "righttoworkcheck",
234
+ /**
235
+ * value: "vogcheck"
236
+ * @const
237
+ */
238
+ "vogcheck": "vogcheck",
239
+ /**
240
+ * value: "watchlist2check"
241
+ * @const
242
+ */
243
+ "watchlist2check": "watchlist2check",
244
+ /**
245
+ * value: "watchlistcheck"
246
+ * @const
247
+ */
248
+ "watchlistcheck": "watchlistcheck",
249
+ /**
250
+ * value: "workreferencecheck"
251
+ * @const
252
+ */
253
+ "workreferencecheck": "workreferencecheck",
254
+ /**
255
+ * value: "worldwidecreditcheck"
256
+ * @const
257
+ */
258
+ "worldwidecreditcheck": "worldwidecreditcheck"
259
+ };
260
+ var _default = exports["default"] = V2ScreeningCheckListItem;