@pescheckit/pescheck-client-js 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +220 -0
- package/dist/ApiClient.js +730 -0
- package/dist/api/AuthenticationApi.js +159 -0
- package/dist/api/ChecksApi.js +120 -0
- package/dist/api/DivisionsApi.js +257 -0
- package/dist/api/OAuthApi.js +153 -0
- package/dist/api/ProfilesApi.js +301 -0
- package/dist/api/ScreeningsApi.js +213 -0
- package/dist/api/WebhooksApi.js +210 -0
- package/dist/index.js +314 -0
- package/dist/model/CustomTokenObtainPair.js +127 -0
- package/dist/model/DivisionReadOnly.js +266 -0
- package/dist/model/DivisionWrite.js +246 -0
- package/dist/model/JWTGeneration.js +155 -0
- package/dist/model/JWTResponse.js +184 -0
- package/dist/model/OAuthApplication.js +221 -0
- package/dist/model/OAuthApplicationResponse.js +252 -0
- package/dist/model/PaginatedDivisionReadOnlyList.js +168 -0
- package/dist/model/PaginatedV2ProfileListItemList.js +168 -0
- package/dist/model/PaginatedV2ScreeningListItemList.js +168 -0
- package/dist/model/PatchedDivisionWrite.js +209 -0
- package/dist/model/PatchedV2ProfilePartialUpdate.js +102 -0
- package/dist/model/TokenRefresh.js +124 -0
- package/dist/model/V2Candidate.js +1474 -0
- package/dist/model/V2CheckField.js +168 -0
- package/dist/model/V2CheckInfo.js +316 -0
- package/dist/model/V2Document.js +302 -0
- package/dist/model/V2DocumentContent.js +126 -0
- package/dist/model/V2Money.js +126 -0
- package/dist/model/V2ProfileCheck.js +222 -0
- package/dist/model/V2ProfileCheckEntry.js +311 -0
- package/dist/model/V2ProfileCreate.js +158 -0
- package/dist/model/V2ProfileDetail.js +258 -0
- package/dist/model/V2ProfileListItem.js +182 -0
- package/dist/model/V2ProfileUpdate.js +159 -0
- package/dist/model/V2ProfileUpdateCheck.js +254 -0
- package/dist/model/V2ScreeningCheck.js +243 -0
- package/dist/model/V2ScreeningCheckEntry.js +338 -0
- package/dist/model/V2ScreeningCheckListItem.js +260 -0
- package/dist/model/V2ScreeningCreate.js +158 -0
- package/dist/model/V2ScreeningDetail.js +240 -0
- package/dist/model/V2ScreeningDetailProfile.js +101 -0
- package/dist/model/V2ScreeningListItem.js +237 -0
- package/dist/model/VerifyWebhook.js +114 -0
- package/dist/model/Webhook.js +221 -0
- package/dist/model/WebhookResponse.js +215 -0
- package/package.json +54 -0
|
@@ -0,0 +1,210 @@
|
|
|
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 _VerifyWebhook = _interopRequireDefault(require("../model/VerifyWebhook"));
|
|
9
|
+
var _Webhook = _interopRequireDefault(require("../model/Webhook"));
|
|
10
|
+
var _WebhookResponse = _interopRequireDefault(require("../model/WebhookResponse"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
13
|
+
function _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
|
+
* Webhooks service.
|
|
31
|
+
* @module api/WebhooksApi
|
|
32
|
+
* @version 0.0.5
|
|
33
|
+
*/
|
|
34
|
+
var WebhooksApi = exports["default"] = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new WebhooksApi.
|
|
37
|
+
* @alias module:api/WebhooksApi
|
|
38
|
+
* @class
|
|
39
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
40
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
41
|
+
*/
|
|
42
|
+
function WebhooksApi(apiClient) {
|
|
43
|
+
_classCallCheck(this, WebhooksApi);
|
|
44
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Create webhook for event notifications. **Authentication Notes:** - OAuth2: Organization is automatically determined from the OAuth application - If your OAuth app has no organization set, pass it via `X-Organization-Id` header or `organization_id` query parameter **Valid Events:** - `check.started` - Check has been initiated - `check.completed` - Check has been completed successfully - `check.failed` - Check has failed - `screening.created` - New screening has been created - `screening.completed` - Screening has been completed - `screening.archived` - Screening has been archived - `package.created` - New package has been created - `package.updated` - Package has been updated - `division.created` - New division has been created - `division.updated` - Division has been updated Limited to 5 webhooks per organization/division.
|
|
49
|
+
* @param {module:model/Webhook} webhook
|
|
50
|
+
* @param {Object} opts Optional parameters
|
|
51
|
+
* @param {String} [xOrganizationId] Organization ID (for JWT/Session auth only)
|
|
52
|
+
* @param {String} [organizationId] Organization ID (for JWT/Session auth only)
|
|
53
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WebhookResponse} and HTTP response
|
|
54
|
+
*/
|
|
55
|
+
return _createClass(WebhooksApi, [{
|
|
56
|
+
key: "createWebhook2WithHttpInfo",
|
|
57
|
+
value: function createWebhook2WithHttpInfo(webhook, opts) {
|
|
58
|
+
opts = opts || {};
|
|
59
|
+
var postBody = webhook;
|
|
60
|
+
// verify the required parameter 'webhook' is set
|
|
61
|
+
if (webhook === undefined || webhook === null) {
|
|
62
|
+
throw new Error("Missing the required parameter 'webhook' when calling createWebhook2");
|
|
63
|
+
}
|
|
64
|
+
var pathParams = {};
|
|
65
|
+
var queryParams = {
|
|
66
|
+
'organization_id': opts['organizationId']
|
|
67
|
+
};
|
|
68
|
+
var headerParams = {
|
|
69
|
+
'X-Organization-Id': opts['xOrganizationId']
|
|
70
|
+
};
|
|
71
|
+
var formParams = {};
|
|
72
|
+
var authNames = ['oauth2'];
|
|
73
|
+
var contentTypes = ['application/json', 'multipart/form-data'];
|
|
74
|
+
var accepts = ['application/json'];
|
|
75
|
+
var returnType = _WebhookResponse["default"];
|
|
76
|
+
return this.apiClient.callApi('/api/v2/webhooks/', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Create webhook for event notifications. **Authentication Notes:** - OAuth2: Organization is automatically determined from the OAuth application - If your OAuth app has no organization set, pass it via `X-Organization-Id` header or `organization_id` query parameter **Valid Events:** - `check.started` - Check has been initiated - `check.completed` - Check has been completed successfully - `check.failed` - Check has failed - `screening.created` - New screening has been created - `screening.completed` - Screening has been completed - `screening.archived` - Screening has been archived - `package.created` - New package has been created - `package.updated` - Package has been updated - `division.created` - New division has been created - `division.updated` - Division has been updated Limited to 5 webhooks per organization/division.
|
|
81
|
+
* @param {module:model/Webhook} webhook
|
|
82
|
+
* @param {Object} opts Optional parameters
|
|
83
|
+
* @param {String} opts.xOrganizationId Organization ID (for JWT/Session auth only)
|
|
84
|
+
* @param {String} opts.organizationId Organization ID (for JWT/Session auth only)
|
|
85
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WebhookResponse}
|
|
86
|
+
*/
|
|
87
|
+
}, {
|
|
88
|
+
key: "createWebhook2",
|
|
89
|
+
value: function createWebhook2(webhook, opts) {
|
|
90
|
+
return this.createWebhook2WithHttpInfo(webhook, opts).then(function (response_and_data) {
|
|
91
|
+
return response_and_data.data;
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Delete a webhook
|
|
97
|
+
* @param {String} webhookId Webhook ID to delete
|
|
98
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
99
|
+
*/
|
|
100
|
+
}, {
|
|
101
|
+
key: "deleteWebhook2WithHttpInfo",
|
|
102
|
+
value: function deleteWebhook2WithHttpInfo(webhookId) {
|
|
103
|
+
var postBody = null;
|
|
104
|
+
// verify the required parameter 'webhookId' is set
|
|
105
|
+
if (webhookId === undefined || webhookId === null) {
|
|
106
|
+
throw new Error("Missing the required parameter 'webhookId' when calling deleteWebhook2");
|
|
107
|
+
}
|
|
108
|
+
var pathParams = {
|
|
109
|
+
'webhook_id': webhookId
|
|
110
|
+
};
|
|
111
|
+
var queryParams = {};
|
|
112
|
+
var headerParams = {};
|
|
113
|
+
var formParams = {};
|
|
114
|
+
var authNames = ['oauth2'];
|
|
115
|
+
var contentTypes = [];
|
|
116
|
+
var accepts = [];
|
|
117
|
+
var returnType = null;
|
|
118
|
+
return this.apiClient.callApi('/api/v2/webhooks/{webhook_id}/', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Delete a webhook
|
|
123
|
+
* @param {String} webhookId Webhook ID to delete
|
|
124
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
125
|
+
*/
|
|
126
|
+
}, {
|
|
127
|
+
key: "deleteWebhook2",
|
|
128
|
+
value: function deleteWebhook2(webhookId) {
|
|
129
|
+
return this.deleteWebhook2WithHttpInfo(webhookId).then(function (response_and_data) {
|
|
130
|
+
return response_and_data.data;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* List webhooks for the organization
|
|
136
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/WebhookResponse>} and HTTP response
|
|
137
|
+
*/
|
|
138
|
+
}, {
|
|
139
|
+
key: "listWebhooks2WithHttpInfo",
|
|
140
|
+
value: function listWebhooks2WithHttpInfo() {
|
|
141
|
+
var postBody = null;
|
|
142
|
+
var pathParams = {};
|
|
143
|
+
var queryParams = {};
|
|
144
|
+
var headerParams = {};
|
|
145
|
+
var formParams = {};
|
|
146
|
+
var authNames = ['oauth2'];
|
|
147
|
+
var contentTypes = [];
|
|
148
|
+
var accepts = ['application/json'];
|
|
149
|
+
var returnType = [_WebhookResponse["default"]];
|
|
150
|
+
return this.apiClient.callApi('/api/v2/webhooks/list/', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* List webhooks for the organization
|
|
155
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/WebhookResponse>}
|
|
156
|
+
*/
|
|
157
|
+
}, {
|
|
158
|
+
key: "listWebhooks2",
|
|
159
|
+
value: function listWebhooks2() {
|
|
160
|
+
return this.listWebhooks2WithHttpInfo().then(function (response_and_data) {
|
|
161
|
+
return response_and_data.data;
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Verify webhook ownership
|
|
167
|
+
* @param {String} webhookId Webhook ID
|
|
168
|
+
* @param {module:model/VerifyWebhook} verifyWebhook
|
|
169
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
170
|
+
*/
|
|
171
|
+
}, {
|
|
172
|
+
key: "verifyWebhook2WithHttpInfo",
|
|
173
|
+
value: function verifyWebhook2WithHttpInfo(webhookId, verifyWebhook) {
|
|
174
|
+
var postBody = verifyWebhook;
|
|
175
|
+
// verify the required parameter 'webhookId' is set
|
|
176
|
+
if (webhookId === undefined || webhookId === null) {
|
|
177
|
+
throw new Error("Missing the required parameter 'webhookId' when calling verifyWebhook2");
|
|
178
|
+
}
|
|
179
|
+
// verify the required parameter 'verifyWebhook' is set
|
|
180
|
+
if (verifyWebhook === undefined || verifyWebhook === null) {
|
|
181
|
+
throw new Error("Missing the required parameter 'verifyWebhook' when calling verifyWebhook2");
|
|
182
|
+
}
|
|
183
|
+
var pathParams = {
|
|
184
|
+
'webhook_id': webhookId
|
|
185
|
+
};
|
|
186
|
+
var queryParams = {};
|
|
187
|
+
var headerParams = {};
|
|
188
|
+
var formParams = {};
|
|
189
|
+
var authNames = ['oauth2'];
|
|
190
|
+
var contentTypes = ['application/json', 'multipart/form-data'];
|
|
191
|
+
var accepts = [];
|
|
192
|
+
var returnType = null;
|
|
193
|
+
return this.apiClient.callApi('/api/v2/webhooks/{webhook_id}/verify/', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Verify webhook ownership
|
|
198
|
+
* @param {String} webhookId Webhook ID
|
|
199
|
+
* @param {module:model/VerifyWebhook} verifyWebhook
|
|
200
|
+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
201
|
+
*/
|
|
202
|
+
}, {
|
|
203
|
+
key: "verifyWebhook2",
|
|
204
|
+
value: function verifyWebhook2(webhookId, verifyWebhook) {
|
|
205
|
+
return this.verifyWebhook2WithHttpInfo(webhookId, verifyWebhook).then(function (response_and_data) {
|
|
206
|
+
return response_and_data.data;
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
}]);
|
|
210
|
+
}();
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ApiClient", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _ApiClient["default"];
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "AuthenticationApi", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _AuthenticationApi["default"];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "ChecksApi", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _ChecksApi["default"];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "CustomTokenObtainPair", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _CustomTokenObtainPair["default"];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "DivisionReadOnly", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _DivisionReadOnly["default"];
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "DivisionWrite", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _DivisionWrite["default"];
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "DivisionsApi", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function get() {
|
|
45
|
+
return _DivisionsApi["default"];
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "JWTGeneration", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function get() {
|
|
51
|
+
return _JWTGeneration["default"];
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "JWTResponse", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function get() {
|
|
57
|
+
return _JWTResponse["default"];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "OAuthApi", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function get() {
|
|
63
|
+
return _OAuthApi["default"];
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "OAuthApplication", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function get() {
|
|
69
|
+
return _OAuthApplication["default"];
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "OAuthApplicationResponse", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function get() {
|
|
75
|
+
return _OAuthApplicationResponse["default"];
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "PaginatedDivisionReadOnlyList", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function get() {
|
|
81
|
+
return _PaginatedDivisionReadOnlyList["default"];
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "PaginatedV2ProfileListItemList", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function get() {
|
|
87
|
+
return _PaginatedV2ProfileListItemList["default"];
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "PaginatedV2ScreeningListItemList", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function get() {
|
|
93
|
+
return _PaginatedV2ScreeningListItemList["default"];
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "PatchedDivisionWrite", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function get() {
|
|
99
|
+
return _PatchedDivisionWrite["default"];
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(exports, "PatchedV2ProfilePartialUpdate", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function get() {
|
|
105
|
+
return _PatchedV2ProfilePartialUpdate["default"];
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(exports, "ProfilesApi", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function get() {
|
|
111
|
+
return _ProfilesApi["default"];
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(exports, "ScreeningsApi", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function get() {
|
|
117
|
+
return _ScreeningsApi["default"];
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "TokenRefresh", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function get() {
|
|
123
|
+
return _TokenRefresh["default"];
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
Object.defineProperty(exports, "V2Candidate", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function get() {
|
|
129
|
+
return _V2Candidate["default"];
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
Object.defineProperty(exports, "V2CheckField", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function get() {
|
|
135
|
+
return _V2CheckField["default"];
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
Object.defineProperty(exports, "V2CheckInfo", {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
get: function get() {
|
|
141
|
+
return _V2CheckInfo["default"];
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(exports, "V2Document", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function get() {
|
|
147
|
+
return _V2Document["default"];
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
Object.defineProperty(exports, "V2DocumentContent", {
|
|
151
|
+
enumerable: true,
|
|
152
|
+
get: function get() {
|
|
153
|
+
return _V2DocumentContent["default"];
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
Object.defineProperty(exports, "V2Money", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
get: function get() {
|
|
159
|
+
return _V2Money["default"];
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
Object.defineProperty(exports, "V2ProfileCheck", {
|
|
163
|
+
enumerable: true,
|
|
164
|
+
get: function get() {
|
|
165
|
+
return _V2ProfileCheck["default"];
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
Object.defineProperty(exports, "V2ProfileCheckEntry", {
|
|
169
|
+
enumerable: true,
|
|
170
|
+
get: function get() {
|
|
171
|
+
return _V2ProfileCheckEntry["default"];
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
Object.defineProperty(exports, "V2ProfileCreate", {
|
|
175
|
+
enumerable: true,
|
|
176
|
+
get: function get() {
|
|
177
|
+
return _V2ProfileCreate["default"];
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
Object.defineProperty(exports, "V2ProfileDetail", {
|
|
181
|
+
enumerable: true,
|
|
182
|
+
get: function get() {
|
|
183
|
+
return _V2ProfileDetail["default"];
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
Object.defineProperty(exports, "V2ProfileListItem", {
|
|
187
|
+
enumerable: true,
|
|
188
|
+
get: function get() {
|
|
189
|
+
return _V2ProfileListItem["default"];
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
Object.defineProperty(exports, "V2ProfileUpdate", {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
get: function get() {
|
|
195
|
+
return _V2ProfileUpdate["default"];
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
Object.defineProperty(exports, "V2ProfileUpdateCheck", {
|
|
199
|
+
enumerable: true,
|
|
200
|
+
get: function get() {
|
|
201
|
+
return _V2ProfileUpdateCheck["default"];
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
Object.defineProperty(exports, "V2ScreeningCheck", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
get: function get() {
|
|
207
|
+
return _V2ScreeningCheck["default"];
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
Object.defineProperty(exports, "V2ScreeningCheckEntry", {
|
|
211
|
+
enumerable: true,
|
|
212
|
+
get: function get() {
|
|
213
|
+
return _V2ScreeningCheckEntry["default"];
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
Object.defineProperty(exports, "V2ScreeningCheckListItem", {
|
|
217
|
+
enumerable: true,
|
|
218
|
+
get: function get() {
|
|
219
|
+
return _V2ScreeningCheckListItem["default"];
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
Object.defineProperty(exports, "V2ScreeningCreate", {
|
|
223
|
+
enumerable: true,
|
|
224
|
+
get: function get() {
|
|
225
|
+
return _V2ScreeningCreate["default"];
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
Object.defineProperty(exports, "V2ScreeningDetail", {
|
|
229
|
+
enumerable: true,
|
|
230
|
+
get: function get() {
|
|
231
|
+
return _V2ScreeningDetail["default"];
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
Object.defineProperty(exports, "V2ScreeningDetailProfile", {
|
|
235
|
+
enumerable: true,
|
|
236
|
+
get: function get() {
|
|
237
|
+
return _V2ScreeningDetailProfile["default"];
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
Object.defineProperty(exports, "V2ScreeningListItem", {
|
|
241
|
+
enumerable: true,
|
|
242
|
+
get: function get() {
|
|
243
|
+
return _V2ScreeningListItem["default"];
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
Object.defineProperty(exports, "VerifyWebhook", {
|
|
247
|
+
enumerable: true,
|
|
248
|
+
get: function get() {
|
|
249
|
+
return _VerifyWebhook["default"];
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
Object.defineProperty(exports, "Webhook", {
|
|
253
|
+
enumerable: true,
|
|
254
|
+
get: function get() {
|
|
255
|
+
return _Webhook["default"];
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
Object.defineProperty(exports, "WebhookResponse", {
|
|
259
|
+
enumerable: true,
|
|
260
|
+
get: function get() {
|
|
261
|
+
return _WebhookResponse["default"];
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
Object.defineProperty(exports, "WebhooksApi", {
|
|
265
|
+
enumerable: true,
|
|
266
|
+
get: function get() {
|
|
267
|
+
return _WebhooksApi["default"];
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
var _ApiClient = _interopRequireDefault(require("./ApiClient"));
|
|
271
|
+
var _CustomTokenObtainPair = _interopRequireDefault(require("./model/CustomTokenObtainPair"));
|
|
272
|
+
var _DivisionReadOnly = _interopRequireDefault(require("./model/DivisionReadOnly"));
|
|
273
|
+
var _DivisionWrite = _interopRequireDefault(require("./model/DivisionWrite"));
|
|
274
|
+
var _JWTGeneration = _interopRequireDefault(require("./model/JWTGeneration"));
|
|
275
|
+
var _JWTResponse = _interopRequireDefault(require("./model/JWTResponse"));
|
|
276
|
+
var _OAuthApplication = _interopRequireDefault(require("./model/OAuthApplication"));
|
|
277
|
+
var _OAuthApplicationResponse = _interopRequireDefault(require("./model/OAuthApplicationResponse"));
|
|
278
|
+
var _PaginatedDivisionReadOnlyList = _interopRequireDefault(require("./model/PaginatedDivisionReadOnlyList"));
|
|
279
|
+
var _PaginatedV2ProfileListItemList = _interopRequireDefault(require("./model/PaginatedV2ProfileListItemList"));
|
|
280
|
+
var _PaginatedV2ScreeningListItemList = _interopRequireDefault(require("./model/PaginatedV2ScreeningListItemList"));
|
|
281
|
+
var _PatchedDivisionWrite = _interopRequireDefault(require("./model/PatchedDivisionWrite"));
|
|
282
|
+
var _PatchedV2ProfilePartialUpdate = _interopRequireDefault(require("./model/PatchedV2ProfilePartialUpdate"));
|
|
283
|
+
var _TokenRefresh = _interopRequireDefault(require("./model/TokenRefresh"));
|
|
284
|
+
var _V2Candidate = _interopRequireDefault(require("./model/V2Candidate"));
|
|
285
|
+
var _V2CheckField = _interopRequireDefault(require("./model/V2CheckField"));
|
|
286
|
+
var _V2CheckInfo = _interopRequireDefault(require("./model/V2CheckInfo"));
|
|
287
|
+
var _V2Document = _interopRequireDefault(require("./model/V2Document"));
|
|
288
|
+
var _V2DocumentContent = _interopRequireDefault(require("./model/V2DocumentContent"));
|
|
289
|
+
var _V2Money = _interopRequireDefault(require("./model/V2Money"));
|
|
290
|
+
var _V2ProfileCheck = _interopRequireDefault(require("./model/V2ProfileCheck"));
|
|
291
|
+
var _V2ProfileCheckEntry = _interopRequireDefault(require("./model/V2ProfileCheckEntry"));
|
|
292
|
+
var _V2ProfileCreate = _interopRequireDefault(require("./model/V2ProfileCreate"));
|
|
293
|
+
var _V2ProfileDetail = _interopRequireDefault(require("./model/V2ProfileDetail"));
|
|
294
|
+
var _V2ProfileListItem = _interopRequireDefault(require("./model/V2ProfileListItem"));
|
|
295
|
+
var _V2ProfileUpdate = _interopRequireDefault(require("./model/V2ProfileUpdate"));
|
|
296
|
+
var _V2ProfileUpdateCheck = _interopRequireDefault(require("./model/V2ProfileUpdateCheck"));
|
|
297
|
+
var _V2ScreeningCheck = _interopRequireDefault(require("./model/V2ScreeningCheck"));
|
|
298
|
+
var _V2ScreeningCheckEntry = _interopRequireDefault(require("./model/V2ScreeningCheckEntry"));
|
|
299
|
+
var _V2ScreeningCheckListItem = _interopRequireDefault(require("./model/V2ScreeningCheckListItem"));
|
|
300
|
+
var _V2ScreeningCreate = _interopRequireDefault(require("./model/V2ScreeningCreate"));
|
|
301
|
+
var _V2ScreeningDetail = _interopRequireDefault(require("./model/V2ScreeningDetail"));
|
|
302
|
+
var _V2ScreeningDetailProfile = _interopRequireDefault(require("./model/V2ScreeningDetailProfile"));
|
|
303
|
+
var _V2ScreeningListItem = _interopRequireDefault(require("./model/V2ScreeningListItem"));
|
|
304
|
+
var _VerifyWebhook = _interopRequireDefault(require("./model/VerifyWebhook"));
|
|
305
|
+
var _Webhook = _interopRequireDefault(require("./model/Webhook"));
|
|
306
|
+
var _WebhookResponse = _interopRequireDefault(require("./model/WebhookResponse"));
|
|
307
|
+
var _AuthenticationApi = _interopRequireDefault(require("./api/AuthenticationApi"));
|
|
308
|
+
var _ChecksApi = _interopRequireDefault(require("./api/ChecksApi"));
|
|
309
|
+
var _DivisionsApi = _interopRequireDefault(require("./api/DivisionsApi"));
|
|
310
|
+
var _OAuthApi = _interopRequireDefault(require("./api/OAuthApi"));
|
|
311
|
+
var _ProfilesApi = _interopRequireDefault(require("./api/ProfilesApi"));
|
|
312
|
+
var _ScreeningsApi = _interopRequireDefault(require("./api/ScreeningsApi"));
|
|
313
|
+
var _WebhooksApi = _interopRequireDefault(require("./api/WebhooksApi"));
|
|
314
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
@@ -0,0 +1,127 @@
|
|
|
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 CustomTokenObtainPair model module.
|
|
31
|
+
* @module model/CustomTokenObtainPair
|
|
32
|
+
* @version 0.0.5
|
|
33
|
+
*/
|
|
34
|
+
var CustomTokenObtainPair = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>CustomTokenObtainPair</code>.
|
|
37
|
+
* Custom JWT serializer that includes organization information in the token.
|
|
38
|
+
* @alias module:model/CustomTokenObtainPair
|
|
39
|
+
* @param email {String}
|
|
40
|
+
* @param password {String}
|
|
41
|
+
*/
|
|
42
|
+
function CustomTokenObtainPair(email, password) {
|
|
43
|
+
_classCallCheck(this, CustomTokenObtainPair);
|
|
44
|
+
CustomTokenObtainPair.initialize(this, email, password);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Initializes the fields of this object.
|
|
49
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
50
|
+
* Only for internal use.
|
|
51
|
+
*/
|
|
52
|
+
return _createClass(CustomTokenObtainPair, null, [{
|
|
53
|
+
key: "initialize",
|
|
54
|
+
value: function initialize(obj, email, password) {
|
|
55
|
+
obj['email'] = email;
|
|
56
|
+
obj['password'] = password;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Constructs a <code>CustomTokenObtainPair</code> from a plain JavaScript object, optionally creating a new instance.
|
|
61
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
62
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
63
|
+
* @param {module:model/CustomTokenObtainPair} obj Optional instance to populate.
|
|
64
|
+
* @return {module:model/CustomTokenObtainPair} The populated <code>CustomTokenObtainPair</code> instance.
|
|
65
|
+
*/
|
|
66
|
+
}, {
|
|
67
|
+
key: "constructFromObject",
|
|
68
|
+
value: function constructFromObject(data, obj) {
|
|
69
|
+
if (data) {
|
|
70
|
+
obj = obj || new CustomTokenObtainPair();
|
|
71
|
+
if (data.hasOwnProperty('email')) {
|
|
72
|
+
obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('password')) {
|
|
75
|
+
obj['password'] = _ApiClient["default"].convertToType(data['password'], 'String');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return obj;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Validates the JSON data with respect to <code>CustomTokenObtainPair</code>.
|
|
83
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
84
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CustomTokenObtainPair</code>.
|
|
85
|
+
*/
|
|
86
|
+
}, {
|
|
87
|
+
key: "validateJSON",
|
|
88
|
+
value: function validateJSON(data) {
|
|
89
|
+
// check to make sure all required properties are present in the JSON string
|
|
90
|
+
var _iterator = _createForOfIteratorHelper(CustomTokenObtainPair.RequiredProperties),
|
|
91
|
+
_step;
|
|
92
|
+
try {
|
|
93
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
94
|
+
var property = _step.value;
|
|
95
|
+
if (!data.hasOwnProperty(property)) {
|
|
96
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// ensure the json data is a string
|
|
100
|
+
} catch (err) {
|
|
101
|
+
_iterator.e(err);
|
|
102
|
+
} finally {
|
|
103
|
+
_iterator.f();
|
|
104
|
+
}
|
|
105
|
+
if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
|
|
106
|
+
throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
|
|
107
|
+
}
|
|
108
|
+
// ensure the json data is a string
|
|
109
|
+
if (data['password'] && !(typeof data['password'] === 'string' || data['password'] instanceof String)) {
|
|
110
|
+
throw new Error("Expected the field `password` to be a primitive type in the JSON string but got " + data['password']);
|
|
111
|
+
}
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
}]);
|
|
115
|
+
}();
|
|
116
|
+
CustomTokenObtainPair.RequiredProperties = ["email", "password"];
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @member {String} email
|
|
120
|
+
*/
|
|
121
|
+
CustomTokenObtainPair.prototype['email'] = undefined;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @member {String} password
|
|
125
|
+
*/
|
|
126
|
+
CustomTokenObtainPair.prototype['password'] = undefined;
|
|
127
|
+
var _default = exports["default"] = CustomTokenObtainPair;
|