@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,302 @@
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 _V2DocumentContent = _interopRequireDefault(require("./V2DocumentContent"));
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 V2Document model module.
32
+ * @module model/V2Document
33
+ * @version 0.0.5
34
+ */
35
+ var V2Document = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>V2Document</code>.
38
+ * One document attached to a screening&#39;s check. &#x60;metadata&#x60; carries check-specific extras and may be empty.
39
+ * @alias module:model/V2Document
40
+ * @param checkId {String}
41
+ * @param checkType {module:model/V2Document.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
42
+ * @param filename {String}
43
+ * @param extension {String}
44
+ * @param content {module:model/V2DocumentContent}
45
+ * @param metadata {Object.<String, Object>}
46
+ */
47
+ function V2Document(checkId, checkType, filename, extension, content, metadata) {
48
+ _classCallCheck(this, V2Document);
49
+ V2Document.initialize(this, checkId, checkType, filename, extension, content, metadata);
50
+ }
51
+
52
+ /**
53
+ * Initializes the fields of this object.
54
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
55
+ * Only for internal use.
56
+ */
57
+ return _createClass(V2Document, null, [{
58
+ key: "initialize",
59
+ value: function initialize(obj, checkId, checkType, filename, extension, content, metadata) {
60
+ obj['check_id'] = checkId;
61
+ obj['check_type'] = checkType;
62
+ obj['filename'] = filename;
63
+ obj['extension'] = extension;
64
+ obj['content'] = content;
65
+ obj['metadata'] = metadata;
66
+ }
67
+
68
+ /**
69
+ * Constructs a <code>V2Document</code> from a plain JavaScript object, optionally creating a new instance.
70
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
71
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
72
+ * @param {module:model/V2Document} obj Optional instance to populate.
73
+ * @return {module:model/V2Document} The populated <code>V2Document</code> instance.
74
+ */
75
+ }, {
76
+ key: "constructFromObject",
77
+ value: function constructFromObject(data, obj) {
78
+ if (data) {
79
+ obj = obj || new V2Document();
80
+ if (data.hasOwnProperty('check_id')) {
81
+ obj['check_id'] = _ApiClient["default"].convertToType(data['check_id'], 'String');
82
+ }
83
+ if (data.hasOwnProperty('check_type')) {
84
+ obj['check_type'] = _ApiClient["default"].convertToType(data['check_type'], 'String');
85
+ }
86
+ if (data.hasOwnProperty('filename')) {
87
+ obj['filename'] = _ApiClient["default"].convertToType(data['filename'], 'String');
88
+ }
89
+ if (data.hasOwnProperty('extension')) {
90
+ obj['extension'] = _ApiClient["default"].convertToType(data['extension'], 'String');
91
+ }
92
+ if (data.hasOwnProperty('content')) {
93
+ obj['content'] = _ApiClient["default"].convertToType(data['content'], _V2DocumentContent["default"]);
94
+ }
95
+ if (data.hasOwnProperty('metadata')) {
96
+ obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], {
97
+ 'String': Object
98
+ });
99
+ }
100
+ }
101
+ return obj;
102
+ }
103
+
104
+ /**
105
+ * Validates the JSON data with respect to <code>V2Document</code>.
106
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
107
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>V2Document</code>.
108
+ */
109
+ }, {
110
+ key: "validateJSON",
111
+ value: function validateJSON(data) {
112
+ // check to make sure all required properties are present in the JSON string
113
+ var _iterator = _createForOfIteratorHelper(V2Document.RequiredProperties),
114
+ _step;
115
+ try {
116
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
117
+ var property = _step.value;
118
+ if (!data.hasOwnProperty(property)) {
119
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
120
+ }
121
+ }
122
+ // ensure the json data is a string
123
+ } catch (err) {
124
+ _iterator.e(err);
125
+ } finally {
126
+ _iterator.f();
127
+ }
128
+ if (data['check_id'] && !(typeof data['check_id'] === 'string' || data['check_id'] instanceof String)) {
129
+ throw new Error("Expected the field `check_id` to be a primitive type in the JSON string but got " + data['check_id']);
130
+ }
131
+ // ensure the json data is a string
132
+ if (data['check_type'] && !(typeof data['check_type'] === 'string' || data['check_type'] instanceof String)) {
133
+ throw new Error("Expected the field `check_type` to be a primitive type in the JSON string but got " + data['check_type']);
134
+ }
135
+ // ensure the json data is a string
136
+ if (data['filename'] && !(typeof data['filename'] === 'string' || data['filename'] instanceof String)) {
137
+ throw new Error("Expected the field `filename` to be a primitive type in the JSON string but got " + data['filename']);
138
+ }
139
+ // ensure the json data is a string
140
+ if (data['extension'] && !(typeof data['extension'] === 'string' || data['extension'] instanceof String)) {
141
+ throw new Error("Expected the field `extension` to be a primitive type in the JSON string but got " + data['extension']);
142
+ }
143
+ // validate the optional field `content`
144
+ if (data['content']) {
145
+ // data not null
146
+ _V2DocumentContent["default"].validateJSON(data['content']);
147
+ }
148
+ return true;
149
+ }
150
+ }]);
151
+ }();
152
+ V2Document.RequiredProperties = ["check_id", "check_type", "filename", "extension", "content", "metadata"];
153
+
154
+ /**
155
+ * @member {String} check_id
156
+ */
157
+ V2Document.prototype['check_id'] = undefined;
158
+
159
+ /**
160
+ * * `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
161
+ * @member {module:model/V2Document.CheckTypeEnum} check_type
162
+ */
163
+ V2Document.prototype['check_type'] = undefined;
164
+
165
+ /**
166
+ * @member {String} filename
167
+ */
168
+ V2Document.prototype['filename'] = undefined;
169
+
170
+ /**
171
+ * @member {String} extension
172
+ */
173
+ V2Document.prototype['extension'] = undefined;
174
+
175
+ /**
176
+ * @member {module:model/V2DocumentContent} content
177
+ */
178
+ V2Document.prototype['content'] = undefined;
179
+
180
+ /**
181
+ * @member {Object.<String, Object>} metadata
182
+ */
183
+ V2Document.prototype['metadata'] = undefined;
184
+
185
+ /**
186
+ * Allowed values for the <code>check_type</code> property.
187
+ * @enum {String}
188
+ * @readonly
189
+ */
190
+ V2Document['CheckTypeEnum'] = {
191
+ /**
192
+ * value: "addresscheck"
193
+ * @const
194
+ */
195
+ "addresscheck": "addresscheck",
196
+ /**
197
+ * value: "adversemediacheck"
198
+ * @const
199
+ */
200
+ "adversemediacheck": "adversemediacheck",
201
+ /**
202
+ * value: "bigcheck"
203
+ * @const
204
+ */
205
+ "bigcheck": "bigcheck",
206
+ /**
207
+ * value: "criminalrecordscheck"
208
+ * @const
209
+ */
210
+ "criminalrecordscheck": "criminalrecordscheck",
211
+ /**
212
+ * value: "criminalrecordsuploadcheck"
213
+ * @const
214
+ */
215
+ "criminalrecordsuploadcheck": "criminalrecordsuploadcheck",
216
+ /**
217
+ * value: "customintegritycheck"
218
+ * @const
219
+ */
220
+ "customintegritycheck": "customintegritycheck",
221
+ /**
222
+ * value: "cvcheck"
223
+ * @const
224
+ */
225
+ "cvcheck": "cvcheck",
226
+ /**
227
+ * value: "edrcheck"
228
+ * @const
229
+ */
230
+ "edrcheck": "edrcheck",
231
+ /**
232
+ * value: "focumcheck"
233
+ * @const
234
+ */
235
+ "focumcheck": "focumcheck",
236
+ /**
237
+ * value: "id2check"
238
+ * @const
239
+ */
240
+ "id2check": "id2check",
241
+ /**
242
+ * value: "idcheck"
243
+ * @const
244
+ */
245
+ "idcheck": "idcheck",
246
+ /**
247
+ * value: "integritycheck"
248
+ * @const
249
+ */
250
+ "integritycheck": "integritycheck",
251
+ /**
252
+ * value: "openhealthcarecheck"
253
+ * @const
254
+ */
255
+ "openhealthcarecheck": "openhealthcarecheck",
256
+ /**
257
+ * value: "permissioncheck"
258
+ * @const
259
+ */
260
+ "permissioncheck": "permissioncheck",
261
+ /**
262
+ * value: "pescheckadversemediacheck"
263
+ * @const
264
+ */
265
+ "pescheckadversemediacheck": "pescheckadversemediacheck",
266
+ /**
267
+ * value: "qualificationcheck"
268
+ * @const
269
+ */
270
+ "qualificationcheck": "qualificationcheck",
271
+ /**
272
+ * value: "righttoworkcheck"
273
+ * @const
274
+ */
275
+ "righttoworkcheck": "righttoworkcheck",
276
+ /**
277
+ * value: "vogcheck"
278
+ * @const
279
+ */
280
+ "vogcheck": "vogcheck",
281
+ /**
282
+ * value: "watchlist2check"
283
+ * @const
284
+ */
285
+ "watchlist2check": "watchlist2check",
286
+ /**
287
+ * value: "watchlistcheck"
288
+ * @const
289
+ */
290
+ "watchlistcheck": "watchlistcheck",
291
+ /**
292
+ * value: "workreferencecheck"
293
+ * @const
294
+ */
295
+ "workreferencecheck": "workreferencecheck",
296
+ /**
297
+ * value: "worldwidecreditcheck"
298
+ * @const
299
+ */
300
+ "worldwidecreditcheck": "worldwidecreditcheck"
301
+ };
302
+ var _default = exports["default"] = V2Document;
@@ -0,0 +1,126 @@
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 V2DocumentContent model module.
31
+ * @module model/V2DocumentContent
32
+ * @version 0.0.5
33
+ */
34
+ var V2DocumentContent = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>V2DocumentContent</code>.
37
+ * How the file is delivered. &#x60;type&#x60; is the discriminator; today it is always &#x60;\&quot;base64\&quot;&#x60; and &#x60;data&#x60; holds the encoded bytes. Other delivery types may be added later without breaking this contract.
38
+ * @alias module:model/V2DocumentContent
39
+ * @param type {String}
40
+ */
41
+ function V2DocumentContent(type) {
42
+ _classCallCheck(this, V2DocumentContent);
43
+ V2DocumentContent.initialize(this, type);
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(V2DocumentContent, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, type) {
54
+ obj['type'] = type;
55
+ }
56
+
57
+ /**
58
+ * Constructs a <code>V2DocumentContent</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/V2DocumentContent} obj Optional instance to populate.
62
+ * @return {module:model/V2DocumentContent} The populated <code>V2DocumentContent</code> instance.
63
+ */
64
+ }, {
65
+ key: "constructFromObject",
66
+ value: function constructFromObject(data, obj) {
67
+ if (data) {
68
+ obj = obj || new V2DocumentContent();
69
+ if (data.hasOwnProperty('type')) {
70
+ obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String');
71
+ }
72
+ if (data.hasOwnProperty('data')) {
73
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], 'String');
74
+ }
75
+ }
76
+ return obj;
77
+ }
78
+
79
+ /**
80
+ * Validates the JSON data with respect to <code>V2DocumentContent</code>.
81
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
82
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>V2DocumentContent</code>.
83
+ */
84
+ }, {
85
+ key: "validateJSON",
86
+ value: function validateJSON(data) {
87
+ // check to make sure all required properties are present in the JSON string
88
+ var _iterator = _createForOfIteratorHelper(V2DocumentContent.RequiredProperties),
89
+ _step;
90
+ try {
91
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
92
+ var property = _step.value;
93
+ if (!data.hasOwnProperty(property)) {
94
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
95
+ }
96
+ }
97
+ // ensure the json data is a string
98
+ } catch (err) {
99
+ _iterator.e(err);
100
+ } finally {
101
+ _iterator.f();
102
+ }
103
+ if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) {
104
+ throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']);
105
+ }
106
+ // ensure the json data is a string
107
+ if (data['data'] && !(typeof data['data'] === 'string' || data['data'] instanceof String)) {
108
+ throw new Error("Expected the field `data` to be a primitive type in the JSON string but got " + data['data']);
109
+ }
110
+ return true;
111
+ }
112
+ }]);
113
+ }();
114
+ V2DocumentContent.RequiredProperties = ["type"];
115
+
116
+ /**
117
+ * @member {String} type
118
+ */
119
+ V2DocumentContent.prototype['type'] = undefined;
120
+
121
+ /**
122
+ * Base64-encoded file contents (type == base64).
123
+ * @member {String} data
124
+ */
125
+ V2DocumentContent.prototype['data'] = undefined;
126
+ var _default = exports["default"] = V2DocumentContent;
@@ -0,0 +1,126 @@
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 V2Money model module.
31
+ * @module model/V2Money
32
+ * @version 0.0.5
33
+ */
34
+ var V2Money = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>V2Money</code>.
37
+ * @alias module:model/V2Money
38
+ * @param amount {String}
39
+ * @param currency {String}
40
+ */
41
+ function V2Money(amount, currency) {
42
+ _classCallCheck(this, V2Money);
43
+ V2Money.initialize(this, amount, currency);
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(V2Money, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, amount, currency) {
54
+ obj['amount'] = amount;
55
+ obj['currency'] = currency;
56
+ }
57
+
58
+ /**
59
+ * Constructs a <code>V2Money</code> from a plain JavaScript object, optionally creating a new instance.
60
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
61
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
62
+ * @param {module:model/V2Money} obj Optional instance to populate.
63
+ * @return {module:model/V2Money} The populated <code>V2Money</code> instance.
64
+ */
65
+ }, {
66
+ key: "constructFromObject",
67
+ value: function constructFromObject(data, obj) {
68
+ if (data) {
69
+ obj = obj || new V2Money();
70
+ if (data.hasOwnProperty('amount')) {
71
+ obj['amount'] = _ApiClient["default"].convertToType(data['amount'], 'String');
72
+ }
73
+ if (data.hasOwnProperty('currency')) {
74
+ obj['currency'] = _ApiClient["default"].convertToType(data['currency'], 'String');
75
+ }
76
+ }
77
+ return obj;
78
+ }
79
+
80
+ /**
81
+ * Validates the JSON data with respect to <code>V2Money</code>.
82
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
83
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>V2Money</code>.
84
+ */
85
+ }, {
86
+ key: "validateJSON",
87
+ value: function validateJSON(data) {
88
+ // check to make sure all required properties are present in the JSON string
89
+ var _iterator = _createForOfIteratorHelper(V2Money.RequiredProperties),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var property = _step.value;
94
+ if (!data.hasOwnProperty(property)) {
95
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
96
+ }
97
+ }
98
+ // ensure the json data is a string
99
+ } catch (err) {
100
+ _iterator.e(err);
101
+ } finally {
102
+ _iterator.f();
103
+ }
104
+ if (data['amount'] && !(typeof data['amount'] === 'string' || data['amount'] instanceof String)) {
105
+ throw new Error("Expected the field `amount` to be a primitive type in the JSON string but got " + data['amount']);
106
+ }
107
+ // ensure the json data is a string
108
+ if (data['currency'] && !(typeof data['currency'] === 'string' || data['currency'] instanceof String)) {
109
+ throw new Error("Expected the field `currency` to be a primitive type in the JSON string but got " + data['currency']);
110
+ }
111
+ return true;
112
+ }
113
+ }]);
114
+ }();
115
+ V2Money.RequiredProperties = ["amount", "currency"];
116
+
117
+ /**
118
+ * @member {String} amount
119
+ */
120
+ V2Money.prototype['amount'] = undefined;
121
+
122
+ /**
123
+ * @member {String} currency
124
+ */
125
+ V2Money.prototype['currency'] = undefined;
126
+ var _default = exports["default"] = V2Money;