@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,159 @@
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 _V2ProfileUpdateCheck = _interopRequireDefault(require("./V2ProfileUpdateCheck"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ 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); }
11
+ 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; } } }; }
12
+ 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; } }
13
+ 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; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ 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); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ 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); } /**
19
+ * Pescheck API
20
+ * 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.
21
+ *
22
+ * The version of the OpenAPI document: 2.0.0
23
+ *
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * The V2ProfileUpdate model module.
32
+ * @module model/V2ProfileUpdate
33
+ * @version 0.0.5
34
+ */
35
+ var V2ProfileUpdate = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>V2ProfileUpdate</code>.
38
+ * Replaces the profile - name, description and full checks list. Entries matched by profile_check_id are updated in place; entries without one are added; existing checks not referenced in the request are removed.
39
+ * @alias module:model/V2ProfileUpdate
40
+ * @param name {String}
41
+ * @param checks {Array.<module:model/V2ProfileUpdateCheck>}
42
+ */
43
+ function V2ProfileUpdate(name, checks) {
44
+ _classCallCheck(this, V2ProfileUpdate);
45
+ V2ProfileUpdate.initialize(this, name, checks);
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(V2ProfileUpdate, null, [{
54
+ key: "initialize",
55
+ value: function initialize(obj, name, checks) {
56
+ obj['name'] = name;
57
+ obj['description'] = '';
58
+ obj['checks'] = checks;
59
+ }
60
+
61
+ /**
62
+ * Constructs a <code>V2ProfileUpdate</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/V2ProfileUpdate} obj Optional instance to populate.
66
+ * @return {module:model/V2ProfileUpdate} The populated <code>V2ProfileUpdate</code> instance.
67
+ */
68
+ }, {
69
+ key: "constructFromObject",
70
+ value: function constructFromObject(data, obj) {
71
+ if (data) {
72
+ obj = obj || new V2ProfileUpdate();
73
+ if (data.hasOwnProperty('name')) {
74
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
75
+ }
76
+ if (data.hasOwnProperty('description')) {
77
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
78
+ }
79
+ if (data.hasOwnProperty('checks')) {
80
+ obj['checks'] = _ApiClient["default"].convertToType(data['checks'], [_V2ProfileUpdateCheck["default"]]);
81
+ }
82
+ }
83
+ return obj;
84
+ }
85
+
86
+ /**
87
+ * Validates the JSON data with respect to <code>V2ProfileUpdate</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>V2ProfileUpdate</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(V2ProfileUpdate.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['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
111
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
112
+ }
113
+ // ensure the json data is a string
114
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
115
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
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
+ _V2ProfileUpdateCheck["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
+ V2ProfileUpdate.RequiredProperties = ["name", "checks"];
143
+
144
+ /**
145
+ * @member {String} name
146
+ */
147
+ V2ProfileUpdate.prototype['name'] = undefined;
148
+
149
+ /**
150
+ * @member {String} description
151
+ * @default ''
152
+ */
153
+ V2ProfileUpdate.prototype['description'] = '';
154
+
155
+ /**
156
+ * @member {Array.<module:model/V2ProfileUpdateCheck>} checks
157
+ */
158
+ V2ProfileUpdate.prototype['checks'] = undefined;
159
+ var _default = exports["default"] = V2ProfileUpdate;
@@ -0,0 +1,254 @@
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 V2ProfileUpdateCheck model module.
31
+ * @module model/V2ProfileUpdateCheck
32
+ * @version 0.0.5
33
+ */
34
+ var V2ProfileUpdateCheck = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>V2ProfileUpdateCheck</code>.
37
+ * Profile update entry. Same shape as create plus optional profile_check_id for in-place update of an existing check. Absent profile_check_id &#x3D; add new.
38
+ * @alias module:model/V2ProfileUpdateCheck
39
+ * @param checkType {module:model/V2ProfileUpdateCheck.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
40
+ */
41
+ function V2ProfileUpdateCheck(checkType) {
42
+ _classCallCheck(this, V2ProfileUpdateCheck);
43
+ V2ProfileUpdateCheck.initialize(this, checkType);
44
+ }
45
+
46
+ /**
47
+ * Initializes the fields of this object.
48
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
+ * Only for internal use.
50
+ */
51
+ return _createClass(V2ProfileUpdateCheck, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, checkType) {
54
+ obj['check_type'] = checkType;
55
+ }
56
+
57
+ /**
58
+ * Constructs a <code>V2ProfileUpdateCheck</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
61
+ * @param {module:model/V2ProfileUpdateCheck} obj Optional instance to populate.
62
+ * @return {module:model/V2ProfileUpdateCheck} The populated <code>V2ProfileUpdateCheck</code> instance.
63
+ */
64
+ }, {
65
+ key: "constructFromObject",
66
+ value: function constructFromObject(data, obj) {
67
+ if (data) {
68
+ obj = obj || new V2ProfileUpdateCheck();
69
+ if (data.hasOwnProperty('check_type')) {
70
+ obj['check_type'] = _ApiClient["default"].convertToType(data['check_type'], 'String');
71
+ }
72
+ if (data.hasOwnProperty('config')) {
73
+ obj['config'] = _ApiClient["default"].convertToType(data['config'], {
74
+ 'String': Object
75
+ });
76
+ }
77
+ if (data.hasOwnProperty('profile_check_id')) {
78
+ obj['profile_check_id'] = _ApiClient["default"].convertToType(data['profile_check_id'], 'String');
79
+ }
80
+ }
81
+ return obj;
82
+ }
83
+
84
+ /**
85
+ * Validates the JSON data with respect to <code>V2ProfileUpdateCheck</code>.
86
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
87
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>V2ProfileUpdateCheck</code>.
88
+ */
89
+ }, {
90
+ key: "validateJSON",
91
+ value: function validateJSON(data) {
92
+ // check to make sure all required properties are present in the JSON string
93
+ var _iterator = _createForOfIteratorHelper(V2ProfileUpdateCheck.RequiredProperties),
94
+ _step;
95
+ try {
96
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
97
+ var property = _step.value;
98
+ if (!data.hasOwnProperty(property)) {
99
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
100
+ }
101
+ }
102
+ // ensure the json data is a string
103
+ } catch (err) {
104
+ _iterator.e(err);
105
+ } finally {
106
+ _iterator.f();
107
+ }
108
+ if (data['check_type'] && !(typeof data['check_type'] === 'string' || data['check_type'] instanceof String)) {
109
+ throw new Error("Expected the field `check_type` to be a primitive type in the JSON string but got " + data['check_type']);
110
+ }
111
+ // ensure the json data is a string
112
+ if (data['profile_check_id'] && !(typeof data['profile_check_id'] === 'string' || data['profile_check_id'] instanceof String)) {
113
+ throw new Error("Expected the field `profile_check_id` to be a primitive type in the JSON string but got " + data['profile_check_id']);
114
+ }
115
+ return true;
116
+ }
117
+ }]);
118
+ }();
119
+ V2ProfileUpdateCheck.RequiredProperties = ["check_type"];
120
+
121
+ /**
122
+ * * `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
123
+ * @member {module:model/V2ProfileUpdateCheck.CheckTypeEnum} check_type
124
+ */
125
+ V2ProfileUpdateCheck.prototype['check_type'] = undefined;
126
+
127
+ /**
128
+ * @member {Object.<String, Object>} config
129
+ */
130
+ V2ProfileUpdateCheck.prototype['config'] = undefined;
131
+
132
+ /**
133
+ * @member {String} profile_check_id
134
+ */
135
+ V2ProfileUpdateCheck.prototype['profile_check_id'] = undefined;
136
+
137
+ /**
138
+ * Allowed values for the <code>check_type</code> property.
139
+ * @enum {String}
140
+ * @readonly
141
+ */
142
+ V2ProfileUpdateCheck['CheckTypeEnum'] = {
143
+ /**
144
+ * value: "addresscheck"
145
+ * @const
146
+ */
147
+ "addresscheck": "addresscheck",
148
+ /**
149
+ * value: "adversemediacheck"
150
+ * @const
151
+ */
152
+ "adversemediacheck": "adversemediacheck",
153
+ /**
154
+ * value: "bigcheck"
155
+ * @const
156
+ */
157
+ "bigcheck": "bigcheck",
158
+ /**
159
+ * value: "criminalrecordscheck"
160
+ * @const
161
+ */
162
+ "criminalrecordscheck": "criminalrecordscheck",
163
+ /**
164
+ * value: "criminalrecordsuploadcheck"
165
+ * @const
166
+ */
167
+ "criminalrecordsuploadcheck": "criminalrecordsuploadcheck",
168
+ /**
169
+ * value: "customintegritycheck"
170
+ * @const
171
+ */
172
+ "customintegritycheck": "customintegritycheck",
173
+ /**
174
+ * value: "cvcheck"
175
+ * @const
176
+ */
177
+ "cvcheck": "cvcheck",
178
+ /**
179
+ * value: "edrcheck"
180
+ * @const
181
+ */
182
+ "edrcheck": "edrcheck",
183
+ /**
184
+ * value: "focumcheck"
185
+ * @const
186
+ */
187
+ "focumcheck": "focumcheck",
188
+ /**
189
+ * value: "id2check"
190
+ * @const
191
+ */
192
+ "id2check": "id2check",
193
+ /**
194
+ * value: "idcheck"
195
+ * @const
196
+ */
197
+ "idcheck": "idcheck",
198
+ /**
199
+ * value: "integritycheck"
200
+ * @const
201
+ */
202
+ "integritycheck": "integritycheck",
203
+ /**
204
+ * value: "openhealthcarecheck"
205
+ * @const
206
+ */
207
+ "openhealthcarecheck": "openhealthcarecheck",
208
+ /**
209
+ * value: "permissioncheck"
210
+ * @const
211
+ */
212
+ "permissioncheck": "permissioncheck",
213
+ /**
214
+ * value: "pescheckadversemediacheck"
215
+ * @const
216
+ */
217
+ "pescheckadversemediacheck": "pescheckadversemediacheck",
218
+ /**
219
+ * value: "qualificationcheck"
220
+ * @const
221
+ */
222
+ "qualificationcheck": "qualificationcheck",
223
+ /**
224
+ * value: "righttoworkcheck"
225
+ * @const
226
+ */
227
+ "righttoworkcheck": "righttoworkcheck",
228
+ /**
229
+ * value: "vogcheck"
230
+ * @const
231
+ */
232
+ "vogcheck": "vogcheck",
233
+ /**
234
+ * value: "watchlist2check"
235
+ * @const
236
+ */
237
+ "watchlist2check": "watchlist2check",
238
+ /**
239
+ * value: "watchlistcheck"
240
+ * @const
241
+ */
242
+ "watchlistcheck": "watchlistcheck",
243
+ /**
244
+ * value: "workreferencecheck"
245
+ * @const
246
+ */
247
+ "workreferencecheck": "workreferencecheck",
248
+ /**
249
+ * value: "worldwidecreditcheck"
250
+ * @const
251
+ */
252
+ "worldwidecreditcheck": "worldwidecreditcheck"
253
+ };
254
+ var _default = exports["default"] = V2ProfileUpdateCheck;
@@ -0,0 +1,243 @@
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 V2ScreeningCheck model module.
31
+ * @module model/V2ScreeningCheck
32
+ * @version 0.0.5
33
+ */
34
+ var V2ScreeningCheck = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>V2ScreeningCheck</code>.
37
+ * Per-screening entry: identifies a target ProfileCheck (by check_type when unambiguous, or via profile_check_id when the profile has multiple ProfileChecks of the same type) and supplies optional &#x60;config&#x60; patch + per-check &#x60;input&#x60;.
38
+ * @alias module:model/V2ScreeningCheck
39
+ * @param checkType {module:model/V2ScreeningCheck.CheckTypeEnum} * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `id2check` - id2check * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck
40
+ */
41
+ function V2ScreeningCheck(checkType) {
42
+ _classCallCheck(this, V2ScreeningCheck);
43
+ V2ScreeningCheck.initialize(this, checkType);
44
+ }
45
+
46
+ /**
47
+ * Initializes the fields of this object.
48
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
+ * Only for internal use.
50
+ */
51
+ return _createClass(V2ScreeningCheck, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, checkType) {
54
+ obj['check_type'] = checkType;
55
+ }
56
+
57
+ /**
58
+ * Constructs a <code>V2ScreeningCheck</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
61
+ * @param {module:model/V2ScreeningCheck} obj Optional instance to populate.
62
+ * @return {module:model/V2ScreeningCheck} The populated <code>V2ScreeningCheck</code> instance.
63
+ */
64
+ }, {
65
+ key: "constructFromObject",
66
+ value: function constructFromObject(data, obj) {
67
+ if (data) {
68
+ obj = obj || new V2ScreeningCheck();
69
+ if (data.hasOwnProperty('check_type')) {
70
+ obj['check_type'] = _ApiClient["default"].convertToType(data['check_type'], 'String');
71
+ }
72
+ if (data.hasOwnProperty('config')) {
73
+ obj['config'] = _ApiClient["default"].convertToType(data['config'], {
74
+ 'String': Object
75
+ });
76
+ }
77
+ if (data.hasOwnProperty('profile_check_id')) {
78
+ obj['profile_check_id'] = _ApiClient["default"].convertToType(data['profile_check_id'], 'String');
79
+ }
80
+ if (data.hasOwnProperty('input')) {
81
+ obj['input'] = _ApiClient["default"].convertToType(data['input'], Object);
82
+ }
83
+ }
84
+ return obj;
85
+ }
86
+
87
+ /**
88
+ * Validates the JSON data with respect to <code>V2ScreeningCheck</code>.
89
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
90
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>V2ScreeningCheck</code>.
91
+ */
92
+ }, {
93
+ key: "validateJSON",
94
+ value: function validateJSON(data) {
95
+ // check to make sure all required properties are present in the JSON string
96
+ var _iterator = _createForOfIteratorHelper(V2ScreeningCheck.RequiredProperties),
97
+ _step;
98
+ try {
99
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
100
+ var property = _step.value;
101
+ if (!data.hasOwnProperty(property)) {
102
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
103
+ }
104
+ }
105
+ // ensure the json data is a string
106
+ } catch (err) {
107
+ _iterator.e(err);
108
+ } finally {
109
+ _iterator.f();
110
+ }
111
+ if (data['check_type'] && !(typeof data['check_type'] === 'string' || data['check_type'] instanceof String)) {
112
+ throw new Error("Expected the field `check_type` to be a primitive type in the JSON string but got " + data['check_type']);
113
+ }
114
+ // ensure the json data is a string
115
+ if (data['profile_check_id'] && !(typeof data['profile_check_id'] === 'string' || data['profile_check_id'] instanceof String)) {
116
+ throw new Error("Expected the field `profile_check_id` to be a primitive type in the JSON string but got " + data['profile_check_id']);
117
+ }
118
+ return true;
119
+ }
120
+ }]);
121
+ }();
122
+ V2ScreeningCheck.RequiredProperties = ["check_type"];
123
+
124
+ /**
125
+ * * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `id2check` - id2check * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck
126
+ * @member {module:model/V2ScreeningCheck.CheckTypeEnum} check_type
127
+ */
128
+ V2ScreeningCheck.prototype['check_type'] = undefined;
129
+
130
+ /**
131
+ * @member {Object.<String, Object>} config
132
+ */
133
+ V2ScreeningCheck.prototype['config'] = undefined;
134
+
135
+ /**
136
+ * Disambiguator. Use when the profile has multiple ProfileChecks of the same check_type.
137
+ * @member {String} profile_check_id
138
+ */
139
+ V2ScreeningCheck.prototype['profile_check_id'] = undefined;
140
+
141
+ /**
142
+ * @member {Object} input
143
+ */
144
+ V2ScreeningCheck.prototype['input'] = undefined;
145
+
146
+ /**
147
+ * Allowed values for the <code>check_type</code> property.
148
+ * @enum {String}
149
+ * @readonly
150
+ */
151
+ V2ScreeningCheck['CheckTypeEnum'] = {
152
+ /**
153
+ * value: "addresscheck"
154
+ * @const
155
+ */
156
+ "addresscheck": "addresscheck",
157
+ /**
158
+ * value: "adversemediacheck"
159
+ * @const
160
+ */
161
+ "adversemediacheck": "adversemediacheck",
162
+ /**
163
+ * value: "bigcheck"
164
+ * @const
165
+ */
166
+ "bigcheck": "bigcheck",
167
+ /**
168
+ * value: "criminalrecordscheck"
169
+ * @const
170
+ */
171
+ "criminalrecordscheck": "criminalrecordscheck",
172
+ /**
173
+ * value: "criminalrecordsuploadcheck"
174
+ * @const
175
+ */
176
+ "criminalrecordsuploadcheck": "criminalrecordsuploadcheck",
177
+ /**
178
+ * value: "customintegritycheck"
179
+ * @const
180
+ */
181
+ "customintegritycheck": "customintegritycheck",
182
+ /**
183
+ * value: "cvcheck"
184
+ * @const
185
+ */
186
+ "cvcheck": "cvcheck",
187
+ /**
188
+ * value: "edrcheck"
189
+ * @const
190
+ */
191
+ "edrcheck": "edrcheck",
192
+ /**
193
+ * value: "id2check"
194
+ * @const
195
+ */
196
+ "id2check": "id2check",
197
+ /**
198
+ * value: "integritycheck"
199
+ * @const
200
+ */
201
+ "integritycheck": "integritycheck",
202
+ /**
203
+ * value: "openhealthcarecheck"
204
+ * @const
205
+ */
206
+ "openhealthcarecheck": "openhealthcarecheck",
207
+ /**
208
+ * value: "qualificationcheck"
209
+ * @const
210
+ */
211
+ "qualificationcheck": "qualificationcheck",
212
+ /**
213
+ * value: "righttoworkcheck"
214
+ * @const
215
+ */
216
+ "righttoworkcheck": "righttoworkcheck",
217
+ /**
218
+ * value: "vogcheck"
219
+ * @const
220
+ */
221
+ "vogcheck": "vogcheck",
222
+ /**
223
+ * value: "watchlist2check"
224
+ * @const
225
+ */
226
+ "watchlist2check": "watchlist2check",
227
+ /**
228
+ * value: "watchlistcheck"
229
+ * @const
230
+ */
231
+ "watchlistcheck": "watchlistcheck",
232
+ /**
233
+ * value: "workreferencecheck"
234
+ * @const
235
+ */
236
+ "workreferencecheck": "workreferencecheck",
237
+ /**
238
+ * value: "worldwidecreditcheck"
239
+ * @const
240
+ */
241
+ "worldwidecreditcheck": "worldwidecreditcheck"
242
+ };
243
+ var _default = exports["default"] = V2ScreeningCheck;