@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,209 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
15
+ * Pescheck API
16
+ * Official client library for the Pescheck API (v2), generated from the OpenAPI specification. Authenticate with OAuth2 client credentials and use the checks, profiles, screenings, webhooks and divisions endpoints. See https://github.com/pescheckit/pescheck-clients for installation and usage.
17
+ *
18
+ * The version of the OpenAPI document: 2.0.0
19
+ *
20
+ *
21
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
+ * https://openapi-generator.tech
23
+ * Do not edit the class manually.
24
+ *
25
+ */
26
+ /**
27
+ * The PatchedDivisionWrite model module.
28
+ * @module model/PatchedDivisionWrite
29
+ * @version 0.0.5
30
+ */
31
+ var PatchedDivisionWrite = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>PatchedDivisionWrite</code>.
34
+ * @alias module:model/PatchedDivisionWrite
35
+ */
36
+ function PatchedDivisionWrite() {
37
+ _classCallCheck(this, PatchedDivisionWrite);
38
+ PatchedDivisionWrite.initialize(this);
39
+ }
40
+
41
+ /**
42
+ * Initializes the fields of this object.
43
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
44
+ * Only for internal use.
45
+ */
46
+ return _createClass(PatchedDivisionWrite, null, [{
47
+ key: "initialize",
48
+ value: function initialize(obj) {}
49
+
50
+ /**
51
+ * Constructs a <code>PatchedDivisionWrite</code> from a plain JavaScript object, optionally creating a new instance.
52
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
53
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
54
+ * @param {module:model/PatchedDivisionWrite} obj Optional instance to populate.
55
+ * @return {module:model/PatchedDivisionWrite} The populated <code>PatchedDivisionWrite</code> instance.
56
+ */
57
+ }, {
58
+ key: "constructFromObject",
59
+ value: function constructFromObject(data, obj) {
60
+ if (data) {
61
+ obj = obj || new PatchedDivisionWrite();
62
+ if (data.hasOwnProperty('id')) {
63
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
64
+ }
65
+ if (data.hasOwnProperty('name')) {
66
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
67
+ }
68
+ if (data.hasOwnProperty('city')) {
69
+ obj['city'] = _ApiClient["default"].convertToType(data['city'], 'String');
70
+ }
71
+ if (data.hasOwnProperty('address')) {
72
+ obj['address'] = _ApiClient["default"].convertToType(data['address'], 'String');
73
+ }
74
+ if (data.hasOwnProperty('postal')) {
75
+ obj['postal'] = _ApiClient["default"].convertToType(data['postal'], 'String');
76
+ }
77
+ if (data.hasOwnProperty('phone')) {
78
+ obj['phone'] = _ApiClient["default"].convertToType(data['phone'], 'String');
79
+ }
80
+ if (data.hasOwnProperty('contact_name')) {
81
+ obj['contact_name'] = _ApiClient["default"].convertToType(data['contact_name'], 'String');
82
+ }
83
+ if (data.hasOwnProperty('contact_email')) {
84
+ obj['contact_email'] = _ApiClient["default"].convertToType(data['contact_email'], 'String');
85
+ }
86
+ if (data.hasOwnProperty('invoice_email')) {
87
+ obj['invoice_email'] = _ApiClient["default"].convertToType(data['invoice_email'], 'String');
88
+ }
89
+ if (data.hasOwnProperty('use_parent_on_email')) {
90
+ obj['use_parent_on_email'] = _ApiClient["default"].convertToType(data['use_parent_on_email'], 'Boolean');
91
+ }
92
+ if (data.hasOwnProperty('use_parent_on_billing')) {
93
+ obj['use_parent_on_billing'] = _ApiClient["default"].convertToType(data['use_parent_on_billing'], 'Boolean');
94
+ }
95
+ if (data.hasOwnProperty('use_parent_on_report')) {
96
+ obj['use_parent_on_report'] = _ApiClient["default"].convertToType(data['use_parent_on_report'], 'Boolean');
97
+ }
98
+ }
99
+ return obj;
100
+ }
101
+
102
+ /**
103
+ * Validates the JSON data with respect to <code>PatchedDivisionWrite</code>.
104
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
105
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>PatchedDivisionWrite</code>.
106
+ */
107
+ }, {
108
+ key: "validateJSON",
109
+ value: function validateJSON(data) {
110
+ // ensure the json data is a string
111
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
112
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
113
+ }
114
+ // ensure the json data is a string
115
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
116
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
117
+ }
118
+ // ensure the json data is a string
119
+ if (data['city'] && !(typeof data['city'] === 'string' || data['city'] instanceof String)) {
120
+ throw new Error("Expected the field `city` to be a primitive type in the JSON string but got " + data['city']);
121
+ }
122
+ // ensure the json data is a string
123
+ if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) {
124
+ throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']);
125
+ }
126
+ // ensure the json data is a string
127
+ if (data['postal'] && !(typeof data['postal'] === 'string' || data['postal'] instanceof String)) {
128
+ throw new Error("Expected the field `postal` to be a primitive type in the JSON string but got " + data['postal']);
129
+ }
130
+ // ensure the json data is a string
131
+ if (data['phone'] && !(typeof data['phone'] === 'string' || data['phone'] instanceof String)) {
132
+ throw new Error("Expected the field `phone` to be a primitive type in the JSON string but got " + data['phone']);
133
+ }
134
+ // ensure the json data is a string
135
+ if (data['contact_name'] && !(typeof data['contact_name'] === 'string' || data['contact_name'] instanceof String)) {
136
+ throw new Error("Expected the field `contact_name` to be a primitive type in the JSON string but got " + data['contact_name']);
137
+ }
138
+ // ensure the json data is a string
139
+ if (data['contact_email'] && !(typeof data['contact_email'] === 'string' || data['contact_email'] instanceof String)) {
140
+ throw new Error("Expected the field `contact_email` to be a primitive type in the JSON string but got " + data['contact_email']);
141
+ }
142
+ // ensure the json data is a string
143
+ if (data['invoice_email'] && !(typeof data['invoice_email'] === 'string' || data['invoice_email'] instanceof String)) {
144
+ throw new Error("Expected the field `invoice_email` to be a primitive type in the JSON string but got " + data['invoice_email']);
145
+ }
146
+ return true;
147
+ }
148
+ }]);
149
+ }();
150
+ /**
151
+ * @member {String} id
152
+ */
153
+ PatchedDivisionWrite.prototype['id'] = undefined;
154
+
155
+ /**
156
+ * @member {String} name
157
+ */
158
+ PatchedDivisionWrite.prototype['name'] = undefined;
159
+
160
+ /**
161
+ * @member {String} city
162
+ */
163
+ PatchedDivisionWrite.prototype['city'] = undefined;
164
+
165
+ /**
166
+ * @member {String} address
167
+ */
168
+ PatchedDivisionWrite.prototype['address'] = undefined;
169
+
170
+ /**
171
+ * @member {String} postal
172
+ */
173
+ PatchedDivisionWrite.prototype['postal'] = undefined;
174
+
175
+ /**
176
+ * @member {String} phone
177
+ */
178
+ PatchedDivisionWrite.prototype['phone'] = undefined;
179
+
180
+ /**
181
+ * @member {String} contact_name
182
+ */
183
+ PatchedDivisionWrite.prototype['contact_name'] = undefined;
184
+
185
+ /**
186
+ * @member {String} contact_email
187
+ */
188
+ PatchedDivisionWrite.prototype['contact_email'] = undefined;
189
+
190
+ /**
191
+ * @member {String} invoice_email
192
+ */
193
+ PatchedDivisionWrite.prototype['invoice_email'] = undefined;
194
+
195
+ /**
196
+ * @member {Boolean} use_parent_on_email
197
+ */
198
+ PatchedDivisionWrite.prototype['use_parent_on_email'] = undefined;
199
+
200
+ /**
201
+ * @member {Boolean} use_parent_on_billing
202
+ */
203
+ PatchedDivisionWrite.prototype['use_parent_on_billing'] = undefined;
204
+
205
+ /**
206
+ * @member {Boolean} use_parent_on_report
207
+ */
208
+ PatchedDivisionWrite.prototype['use_parent_on_report'] = undefined;
209
+ var _default = exports["default"] = PatchedDivisionWrite;
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
12
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
15
+ * Pescheck API
16
+ * Official client library for the Pescheck API (v2), generated from the OpenAPI specification. Authenticate with OAuth2 client credentials and use the checks, profiles, screenings, webhooks and divisions endpoints. See https://github.com/pescheckit/pescheck-clients for installation and usage.
17
+ *
18
+ * The version of the OpenAPI document: 2.0.0
19
+ *
20
+ *
21
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
+ * https://openapi-generator.tech
23
+ * Do not edit the class manually.
24
+ *
25
+ */
26
+ /**
27
+ * The PatchedV2ProfilePartialUpdate model module.
28
+ * @module model/PatchedV2ProfilePartialUpdate
29
+ * @version 0.0.5
30
+ */
31
+ var PatchedV2ProfilePartialUpdate = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>PatchedV2ProfilePartialUpdate</code>.
34
+ * PATCH body. Only name and description are editable. Sending &#x60;checks&#x60; is explicitly rejected - use PUT to replace the full check list.
35
+ * @alias module:model/PatchedV2ProfilePartialUpdate
36
+ */
37
+ function PatchedV2ProfilePartialUpdate() {
38
+ _classCallCheck(this, PatchedV2ProfilePartialUpdate);
39
+ PatchedV2ProfilePartialUpdate.initialize(this);
40
+ }
41
+
42
+ /**
43
+ * Initializes the fields of this object.
44
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
45
+ * Only for internal use.
46
+ */
47
+ return _createClass(PatchedV2ProfilePartialUpdate, null, [{
48
+ key: "initialize",
49
+ value: function initialize(obj) {}
50
+
51
+ /**
52
+ * Constructs a <code>PatchedV2ProfilePartialUpdate</code> from a plain JavaScript object, optionally creating a new instance.
53
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
54
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
55
+ * @param {module:model/PatchedV2ProfilePartialUpdate} obj Optional instance to populate.
56
+ * @return {module:model/PatchedV2ProfilePartialUpdate} The populated <code>PatchedV2ProfilePartialUpdate</code> instance.
57
+ */
58
+ }, {
59
+ key: "constructFromObject",
60
+ value: function constructFromObject(data, obj) {
61
+ if (data) {
62
+ obj = obj || new PatchedV2ProfilePartialUpdate();
63
+ if (data.hasOwnProperty('name')) {
64
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
65
+ }
66
+ if (data.hasOwnProperty('description')) {
67
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
68
+ }
69
+ }
70
+ return obj;
71
+ }
72
+
73
+ /**
74
+ * Validates the JSON data with respect to <code>PatchedV2ProfilePartialUpdate</code>.
75
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
76
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>PatchedV2ProfilePartialUpdate</code>.
77
+ */
78
+ }, {
79
+ key: "validateJSON",
80
+ value: function validateJSON(data) {
81
+ // ensure the json data is a string
82
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
83
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
84
+ }
85
+ // ensure the json data is a string
86
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
87
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
88
+ }
89
+ return true;
90
+ }
91
+ }]);
92
+ }();
93
+ /**
94
+ * @member {String} name
95
+ */
96
+ PatchedV2ProfilePartialUpdate.prototype['name'] = undefined;
97
+
98
+ /**
99
+ * @member {String} description
100
+ */
101
+ PatchedV2ProfilePartialUpdate.prototype['description'] = undefined;
102
+ var _default = exports["default"] = PatchedV2ProfilePartialUpdate;
@@ -0,0 +1,124 @@
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 TokenRefresh model module.
31
+ * @module model/TokenRefresh
32
+ * @version 0.0.5
33
+ */
34
+ var TokenRefresh = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>TokenRefresh</code>.
37
+ * @alias module:model/TokenRefresh
38
+ * @param refresh {String}
39
+ */
40
+ function TokenRefresh(refresh) {
41
+ _classCallCheck(this, TokenRefresh);
42
+ TokenRefresh.initialize(this, refresh);
43
+ }
44
+
45
+ /**
46
+ * Initializes the fields of this object.
47
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
+ * Only for internal use.
49
+ */
50
+ return _createClass(TokenRefresh, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, refresh) {
53
+ obj['refresh'] = refresh;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>TokenRefresh</code> from a plain JavaScript object, optionally creating a new instance.
58
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
59
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
60
+ * @param {module:model/TokenRefresh} obj Optional instance to populate.
61
+ * @return {module:model/TokenRefresh} The populated <code>TokenRefresh</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new TokenRefresh();
68
+ if (data.hasOwnProperty('access')) {
69
+ obj['access'] = _ApiClient["default"].convertToType(data['access'], 'String');
70
+ }
71
+ if (data.hasOwnProperty('refresh')) {
72
+ obj['refresh'] = _ApiClient["default"].convertToType(data['refresh'], 'String');
73
+ }
74
+ }
75
+ return obj;
76
+ }
77
+
78
+ /**
79
+ * Validates the JSON data with respect to <code>TokenRefresh</code>.
80
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
81
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>TokenRefresh</code>.
82
+ */
83
+ }, {
84
+ key: "validateJSON",
85
+ value: function validateJSON(data) {
86
+ // check to make sure all required properties are present in the JSON string
87
+ var _iterator = _createForOfIteratorHelper(TokenRefresh.RequiredProperties),
88
+ _step;
89
+ try {
90
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
91
+ var property = _step.value;
92
+ if (!data.hasOwnProperty(property)) {
93
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
94
+ }
95
+ }
96
+ // ensure the json data is a string
97
+ } catch (err) {
98
+ _iterator.e(err);
99
+ } finally {
100
+ _iterator.f();
101
+ }
102
+ if (data['access'] && !(typeof data['access'] === 'string' || data['access'] instanceof String)) {
103
+ throw new Error("Expected the field `access` to be a primitive type in the JSON string but got " + data['access']);
104
+ }
105
+ // ensure the json data is a string
106
+ if (data['refresh'] && !(typeof data['refresh'] === 'string' || data['refresh'] instanceof String)) {
107
+ throw new Error("Expected the field `refresh` to be a primitive type in the JSON string but got " + data['refresh']);
108
+ }
109
+ return true;
110
+ }
111
+ }]);
112
+ }();
113
+ TokenRefresh.RequiredProperties = ["refresh"];
114
+
115
+ /**
116
+ * @member {String} access
117
+ */
118
+ TokenRefresh.prototype['access'] = undefined;
119
+
120
+ /**
121
+ * @member {String} refresh
122
+ */
123
+ TokenRefresh.prototype['refresh'] = undefined;
124
+ var _default = exports["default"] = TokenRefresh;