@pescheckit/pescheck-client 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/.openapi-generator/FILES +97 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +200 -0
- package/dist/apis/AuthenticationApi.d.ts +131 -0
- package/dist/apis/AuthenticationApi.js +168 -0
- package/dist/apis/ChecksApi.d.ts +91 -0
- package/dist/apis/ChecksApi.js +116 -0
- package/dist/apis/DivisionsApi.d.ts +211 -0
- package/dist/apis/DivisionsApi.js +264 -0
- package/dist/apis/OAuthApi.d.ts +124 -0
- package/dist/apis/OAuthApi.js +159 -0
- package/dist/apis/ProfilesApi.d.ts +270 -0
- package/dist/apis/ProfilesApi.js +334 -0
- package/dist/apis/ScreeningsApi.d.ts +172 -0
- package/dist/apis/ScreeningsApi.js +216 -0
- package/dist/apis/WebhooksApi.d.ts +168 -0
- package/dist/apis/WebhooksApi.js +213 -0
- package/dist/apis/index.d.ts +7 -0
- package/dist/apis/index.js +25 -0
- package/dist/esm/apis/AuthenticationApi.d.ts +131 -0
- package/dist/esm/apis/AuthenticationApi.js +164 -0
- package/dist/esm/apis/ChecksApi.d.ts +91 -0
- package/dist/esm/apis/ChecksApi.js +112 -0
- package/dist/esm/apis/DivisionsApi.d.ts +211 -0
- package/dist/esm/apis/DivisionsApi.js +260 -0
- package/dist/esm/apis/OAuthApi.d.ts +124 -0
- package/dist/esm/apis/OAuthApi.js +155 -0
- package/dist/esm/apis/ProfilesApi.d.ts +270 -0
- package/dist/esm/apis/ProfilesApi.js +330 -0
- package/dist/esm/apis/ScreeningsApi.d.ts +172 -0
- package/dist/esm/apis/ScreeningsApi.js +212 -0
- package/dist/esm/apis/WebhooksApi.d.ts +168 -0
- package/dist/esm/apis/WebhooksApi.js +209 -0
- package/dist/esm/apis/index.d.ts +7 -0
- package/dist/esm/apis/index.js +9 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/models/CustomTokenObtainPair.d.ts +38 -0
- package/dist/esm/models/CustomTokenObtainPair.js +47 -0
- package/dist/esm/models/DivisionReadOnly.d.ts +116 -0
- package/dist/esm/models/DivisionReadOnly.js +73 -0
- package/dist/esm/models/DivisionWrite.d.ts +98 -0
- package/dist/esm/models/DivisionWrite.js +78 -0
- package/dist/esm/models/JWTGeneration.d.ts +50 -0
- package/dist/esm/models/JWTGeneration.js +51 -0
- package/dist/esm/models/JWTResponse.d.ts +62 -0
- package/dist/esm/models/JWTResponse.js +61 -0
- package/dist/esm/models/OAuthApplication.d.ts +84 -0
- package/dist/esm/models/OAuthApplication.js +68 -0
- package/dist/esm/models/OAuthApplicationResponse.d.ts +98 -0
- package/dist/esm/models/OAuthApplicationResponse.js +80 -0
- package/dist/esm/models/PaginatedDivisionReadOnlyList.d.ts +51 -0
- package/dist/esm/models/PaginatedDivisionReadOnlyList.js +56 -0
- package/dist/esm/models/PaginatedV2ProfileListItemList.d.ts +51 -0
- package/dist/esm/models/PaginatedV2ProfileListItemList.js +56 -0
- package/dist/esm/models/PaginatedV2ScreeningListItemList.d.ts +51 -0
- package/dist/esm/models/PaginatedV2ScreeningListItemList.js +56 -0
- package/dist/esm/models/PatchedDivisionWrite.d.ts +98 -0
- package/dist/esm/models/PatchedDivisionWrite.js +62 -0
- package/dist/esm/models/PatchedV2ProfilePartialUpdate.d.ts +39 -0
- package/dist/esm/models/PatchedV2ProfilePartialUpdate.js +43 -0
- package/dist/esm/models/TokenRefresh.d.ts +38 -0
- package/dist/esm/models/TokenRefresh.js +44 -0
- package/dist/esm/models/V2Candidate.d.ts +592 -0
- package/dist/esm/models/V2Candidate.js +318 -0
- package/dist/esm/models/V2CheckField.d.ts +56 -0
- package/dist/esm/models/V2CheckField.js +53 -0
- package/dist/esm/models/V2CheckInfo.d.ts +100 -0
- package/dist/esm/models/V2CheckInfo.js +76 -0
- package/dist/esm/models/V2Document.d.ts +115 -0
- package/dist/esm/models/V2Document.js +84 -0
- package/dist/esm/models/V2DocumentContent.d.ts +40 -0
- package/dist/esm/models/V2DocumentContent.js +45 -0
- package/dist/esm/models/V2Money.d.ts +38 -0
- package/dist/esm/models/V2Money.js +47 -0
- package/dist/esm/models/V2ProfileCheck.d.ts +85 -0
- package/dist/esm/models/V2ProfileCheck.js +68 -0
- package/dist/esm/models/V2ProfileCheckEntry.d.ts +120 -0
- package/dist/esm/models/V2ProfileCheckEntry.js +87 -0
- package/dist/esm/models/V2ProfileCreate.d.ts +45 -0
- package/dist/esm/models/V2ProfileCreate.js +50 -0
- package/dist/esm/models/V2ProfileDetail.d.ts +94 -0
- package/dist/esm/models/V2ProfileDetail.js +75 -0
- package/dist/esm/models/V2ProfileListItem.d.ts +68 -0
- package/dist/esm/models/V2ProfileListItem.js +61 -0
- package/dist/esm/models/V2ProfileUpdate.d.ts +47 -0
- package/dist/esm/models/V2ProfileUpdate.js +50 -0
- package/dist/esm/models/V2ProfileUpdateCheck.d.ts +96 -0
- package/dist/esm/models/V2ProfileUpdateCheck.js +74 -0
- package/dist/esm/models/V2ScreeningCheck.d.ts +95 -0
- package/dist/esm/models/V2ScreeningCheck.js +72 -0
- package/dist/esm/models/V2ScreeningCheckEntry.d.ts +135 -0
- package/dist/esm/models/V2ScreeningCheckEntry.js +92 -0
- package/dist/esm/models/V2ScreeningCheckListItem.d.ts +93 -0
- package/dist/esm/models/V2ScreeningCheckListItem.js +74 -0
- package/dist/esm/models/V2ScreeningCreate.d.ts +46 -0
- package/dist/esm/models/V2ScreeningCreate.js +51 -0
- package/dist/esm/models/V2ScreeningDetail.d.ts +83 -0
- package/dist/esm/models/V2ScreeningDetail.js +70 -0
- package/dist/esm/models/V2ScreeningDetailProfile.d.ts +38 -0
- package/dist/esm/models/V2ScreeningDetailProfile.js +43 -0
- package/dist/esm/models/V2ScreeningListItem.d.ts +85 -0
- package/dist/esm/models/V2ScreeningListItem.js +69 -0
- package/dist/esm/models/VerifyWebhook.d.ts +34 -0
- package/dist/esm/models/VerifyWebhook.js +43 -0
- package/dist/esm/models/Webhook.d.ts +71 -0
- package/dist/esm/models/Webhook.js +69 -0
- package/dist/esm/models/WebhookResponse.d.ts +87 -0
- package/dist/esm/models/WebhookResponse.js +51 -0
- package/dist/esm/models/index.d.ts +36 -0
- package/dist/esm/models/index.js +38 -0
- package/dist/esm/runtime.d.ts +184 -0
- package/dist/esm/runtime.js +349 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/CustomTokenObtainPair.d.ts +38 -0
- package/dist/models/CustomTokenObtainPair.js +54 -0
- package/dist/models/DivisionReadOnly.d.ts +116 -0
- package/dist/models/DivisionReadOnly.js +80 -0
- package/dist/models/DivisionWrite.d.ts +98 -0
- package/dist/models/DivisionWrite.js +85 -0
- package/dist/models/JWTGeneration.d.ts +50 -0
- package/dist/models/JWTGeneration.js +58 -0
- package/dist/models/JWTResponse.d.ts +62 -0
- package/dist/models/JWTResponse.js +68 -0
- package/dist/models/OAuthApplication.d.ts +84 -0
- package/dist/models/OAuthApplication.js +76 -0
- package/dist/models/OAuthApplicationResponse.d.ts +98 -0
- package/dist/models/OAuthApplicationResponse.js +88 -0
- package/dist/models/PaginatedDivisionReadOnlyList.d.ts +51 -0
- package/dist/models/PaginatedDivisionReadOnlyList.js +63 -0
- package/dist/models/PaginatedV2ProfileListItemList.d.ts +51 -0
- package/dist/models/PaginatedV2ProfileListItemList.js +63 -0
- package/dist/models/PaginatedV2ScreeningListItemList.d.ts +51 -0
- package/dist/models/PaginatedV2ScreeningListItemList.js +63 -0
- package/dist/models/PatchedDivisionWrite.d.ts +98 -0
- package/dist/models/PatchedDivisionWrite.js +69 -0
- package/dist/models/PatchedV2ProfilePartialUpdate.d.ts +39 -0
- package/dist/models/PatchedV2ProfilePartialUpdate.js +50 -0
- package/dist/models/TokenRefresh.d.ts +38 -0
- package/dist/models/TokenRefresh.js +51 -0
- package/dist/models/V2Candidate.d.ts +592 -0
- package/dist/models/V2Candidate.js +326 -0
- package/dist/models/V2CheckField.d.ts +56 -0
- package/dist/models/V2CheckField.js +60 -0
- package/dist/models/V2CheckInfo.d.ts +100 -0
- package/dist/models/V2CheckInfo.js +83 -0
- package/dist/models/V2Document.d.ts +115 -0
- package/dist/models/V2Document.js +92 -0
- package/dist/models/V2DocumentContent.d.ts +40 -0
- package/dist/models/V2DocumentContent.js +52 -0
- package/dist/models/V2Money.d.ts +38 -0
- package/dist/models/V2Money.js +54 -0
- package/dist/models/V2ProfileCheck.d.ts +85 -0
- package/dist/models/V2ProfileCheck.js +76 -0
- package/dist/models/V2ProfileCheckEntry.d.ts +120 -0
- package/dist/models/V2ProfileCheckEntry.js +95 -0
- package/dist/models/V2ProfileCreate.d.ts +45 -0
- package/dist/models/V2ProfileCreate.js +57 -0
- package/dist/models/V2ProfileDetail.d.ts +94 -0
- package/dist/models/V2ProfileDetail.js +82 -0
- package/dist/models/V2ProfileListItem.d.ts +68 -0
- package/dist/models/V2ProfileListItem.js +68 -0
- package/dist/models/V2ProfileUpdate.d.ts +47 -0
- package/dist/models/V2ProfileUpdate.js +57 -0
- package/dist/models/V2ProfileUpdateCheck.d.ts +96 -0
- package/dist/models/V2ProfileUpdateCheck.js +82 -0
- package/dist/models/V2ScreeningCheck.d.ts +95 -0
- package/dist/models/V2ScreeningCheck.js +80 -0
- package/dist/models/V2ScreeningCheckEntry.d.ts +135 -0
- package/dist/models/V2ScreeningCheckEntry.js +100 -0
- package/dist/models/V2ScreeningCheckListItem.d.ts +93 -0
- package/dist/models/V2ScreeningCheckListItem.js +82 -0
- package/dist/models/V2ScreeningCreate.d.ts +46 -0
- package/dist/models/V2ScreeningCreate.js +58 -0
- package/dist/models/V2ScreeningDetail.d.ts +83 -0
- package/dist/models/V2ScreeningDetail.js +77 -0
- package/dist/models/V2ScreeningDetailProfile.d.ts +38 -0
- package/dist/models/V2ScreeningDetailProfile.js +50 -0
- package/dist/models/V2ScreeningListItem.d.ts +85 -0
- package/dist/models/V2ScreeningListItem.js +76 -0
- package/dist/models/VerifyWebhook.d.ts +34 -0
- package/dist/models/VerifyWebhook.js +50 -0
- package/dist/models/Webhook.d.ts +71 -0
- package/dist/models/Webhook.js +77 -0
- package/dist/models/WebhookResponse.d.ts +87 -0
- package/dist/models/WebhookResponse.js +58 -0
- package/dist/models/index.d.ts +36 -0
- package/dist/models/index.js +54 -0
- package/dist/runtime.d.ts +184 -0
- package/dist/runtime.js +365 -0
- package/docs/AuthenticationApi.md +227 -0
- package/docs/ChecksApi.md +150 -0
- package/docs/CustomTokenObtainPair.md +37 -0
- package/docs/DivisionReadOnly.md +62 -0
- package/docs/DivisionWrite.md +56 -0
- package/docs/DivisionsApi.md +380 -0
- package/docs/JWTGeneration.md +41 -0
- package/docs/JWTResponse.md +45 -0
- package/docs/OAuthApi.md +222 -0
- package/docs/OAuthApplication.md +43 -0
- package/docs/OAuthApplicationResponse.md +49 -0
- package/docs/PaginatedDivisionReadOnlyList.md +40 -0
- package/docs/PaginatedV2ProfileListItemList.md +40 -0
- package/docs/PaginatedV2ScreeningListItemList.md +40 -0
- package/docs/PatchedDivisionWrite.md +56 -0
- package/docs/PatchedV2ProfilePartialUpdate.md +37 -0
- package/docs/ProfilesApi.md +456 -0
- package/docs/ScreeningsApi.md +302 -0
- package/docs/TokenRefresh.md +36 -0
- package/docs/V2Candidate.md +53 -0
- package/docs/V2CheckField.md +43 -0
- package/docs/V2CheckInfo.md +57 -0
- package/docs/V2Document.md +45 -0
- package/docs/V2DocumentContent.md +37 -0
- package/docs/V2Money.md +36 -0
- package/docs/V2ProfileCheck.md +37 -0
- package/docs/V2ProfileCheckEntry.md +46 -0
- package/docs/V2ProfileCreate.md +38 -0
- package/docs/V2ProfileDetail.md +54 -0
- package/docs/V2ProfileListItem.md +46 -0
- package/docs/V2ProfileUpdate.md +39 -0
- package/docs/V2ProfileUpdateCheck.md +39 -0
- package/docs/V2ScreeningCheck.md +41 -0
- package/docs/V2ScreeningCheckEntry.md +50 -0
- package/docs/V2ScreeningCheckListItem.md +39 -0
- package/docs/V2ScreeningCreate.md +38 -0
- package/docs/V2ScreeningDetail.md +50 -0
- package/docs/V2ScreeningDetailProfile.md +36 -0
- package/docs/V2ScreeningListItem.md +51 -0
- package/docs/VerifyWebhook.md +35 -0
- package/docs/Webhook.md +43 -0
- package/docs/WebhookResponse.md +53 -0
- package/docs/WebhooksApi.md +305 -0
- package/package.json +25 -0
- package/src/apis/AuthenticationApi.ts +285 -0
- package/src/apis/ChecksApi.ts +181 -0
- package/src/apis/DivisionsApi.ts +462 -0
- package/src/apis/OAuthApi.ts +256 -0
- package/src/apis/ProfilesApi.ts +583 -0
- package/src/apis/ScreeningsApi.ts +376 -0
- package/src/apis/WebhooksApi.ts +363 -0
- package/src/apis/index.ts +9 -0
- package/src/index.ts +5 -0
- package/src/models/CustomTokenObtainPair.ts +75 -0
- package/src/models/DivisionReadOnly.ts +177 -0
- package/src/models/DivisionWrite.ts +160 -0
- package/src/models/JWTGeneration.ts +91 -0
- package/src/models/JWTResponse.ts +110 -0
- package/src/models/OAuthApplication.ts +130 -0
- package/src/models/OAuthApplicationResponse.ts +151 -0
- package/src/models/PaginatedDivisionReadOnlyList.ts +101 -0
- package/src/models/PaginatedV2ProfileListItemList.ts +101 -0
- package/src/models/PaginatedV2ScreeningListItemList.ts +101 -0
- package/src/models/PatchedDivisionWrite.ts +152 -0
- package/src/models/PatchedV2ProfilePartialUpdate.ts +74 -0
- package/src/models/TokenRefresh.ts +73 -0
- package/src/models/V2Candidate.ts +649 -0
- package/src/models/V2CheckField.ts +97 -0
- package/src/models/V2CheckInfo.ts +168 -0
- package/src/models/V2Document.ts +166 -0
- package/src/models/V2DocumentContent.ts +76 -0
- package/src/models/V2Money.ts +75 -0
- package/src/models/V2ProfileCheck.ts +122 -0
- package/src/models/V2ProfileCheckEntry.ts +173 -0
- package/src/models/V2ProfileCreate.ts +91 -0
- package/src/models/V2ProfileDetail.ts +162 -0
- package/src/models/V2ProfileListItem.ts +115 -0
- package/src/models/V2ProfileUpdate.ts +93 -0
- package/src/models/V2ProfileUpdateCheck.ts +135 -0
- package/src/models/V2ScreeningCheck.ts +136 -0
- package/src/models/V2ScreeningCheckEntry.ts +181 -0
- package/src/models/V2ScreeningCheckListItem.ts +133 -0
- package/src/models/V2ScreeningCreate.ts +98 -0
- package/src/models/V2ScreeningDetail.ts +152 -0
- package/src/models/V2ScreeningDetailProfile.ts +73 -0
- package/src/models/V2ScreeningListItem.ts +154 -0
- package/src/models/VerifyWebhook.ts +68 -0
- package/src/models/Webhook.ts +118 -0
- package/src/models/WebhookResponse.ts +140 -0
- package/src/models/index.ts +38 -0
- package/src/runtime.ts +449 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Pescheck API
|
|
5
|
+
* 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.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { PaginatedV2ScreeningListItemListFromJSON, } from '../models/PaginatedV2ScreeningListItemList';
|
|
25
|
+
import { V2DocumentFromJSON, } from '../models/V2Document';
|
|
26
|
+
import { V2ScreeningCreateToJSON, } from '../models/V2ScreeningCreate';
|
|
27
|
+
import { V2ScreeningDetailFromJSON, } from '../models/V2ScreeningDetail';
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
export class ScreeningsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Creates request options for v2ScreeningsCreate without sending the request
|
|
34
|
+
*/
|
|
35
|
+
v2ScreeningsCreateRequestOpts(requestParameters) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (requestParameters['v2ScreeningCreate'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('v2ScreeningCreate', 'Required parameter "v2ScreeningCreate" was null or undefined when calling v2ScreeningsCreate().');
|
|
39
|
+
}
|
|
40
|
+
const queryParameters = {};
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
43
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
44
|
+
// oauth required
|
|
45
|
+
headerParameters["Authorization"] = `Bearer ${yield this.configuration.accessToken("oauth2", ["read:api", "create:api", "update:api"])}`;
|
|
46
|
+
}
|
|
47
|
+
let urlPath = `/api/v2/screenings/`;
|
|
48
|
+
return {
|
|
49
|
+
path: urlPath,
|
|
50
|
+
method: 'POST',
|
|
51
|
+
headers: headerParameters,
|
|
52
|
+
query: queryParameters,
|
|
53
|
+
body: V2ScreeningCreateToJSON(requestParameters['v2ScreeningCreate']),
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
*/
|
|
59
|
+
v2ScreeningsCreateRaw(requestParameters, initOverrides) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
const requestOptions = yield this.v2ScreeningsCreateRequestOpts(requestParameters);
|
|
62
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
63
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => V2ScreeningDetailFromJSON(jsonValue));
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
*/
|
|
68
|
+
v2ScreeningsCreate(requestParameters, initOverrides) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const response = yield this.v2ScreeningsCreateRaw(requestParameters, initOverrides);
|
|
71
|
+
return yield response.value();
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Creates request options for v2ScreeningsDocumentsList without sending the request
|
|
76
|
+
*/
|
|
77
|
+
v2ScreeningsDocumentsListRequestOpts(requestParameters) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
if (requestParameters['id'] == null) {
|
|
80
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling v2ScreeningsDocumentsList().');
|
|
81
|
+
}
|
|
82
|
+
const queryParameters = {};
|
|
83
|
+
if (requestParameters['checkId'] != null) {
|
|
84
|
+
queryParameters['check_id'] = requestParameters['checkId'];
|
|
85
|
+
}
|
|
86
|
+
if (requestParameters['checkType'] != null) {
|
|
87
|
+
queryParameters['check_type'] = requestParameters['checkType'];
|
|
88
|
+
}
|
|
89
|
+
const headerParameters = {};
|
|
90
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
91
|
+
// oauth required
|
|
92
|
+
headerParameters["Authorization"] = `Bearer ${yield this.configuration.accessToken("oauth2", ["read:api", "create:api", "update:api"])}`;
|
|
93
|
+
}
|
|
94
|
+
let urlPath = `/api/v2/screenings/{id}/documents/`;
|
|
95
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
96
|
+
return {
|
|
97
|
+
path: urlPath,
|
|
98
|
+
method: 'GET',
|
|
99
|
+
headers: headerParameters,
|
|
100
|
+
query: queryParameters,
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Documents attached to the screening\'s checks. Files are delivered inline as Base64 in `content`. Narrow the result with `check_id` or `check_type`.
|
|
106
|
+
* Retrieve screening documents
|
|
107
|
+
*/
|
|
108
|
+
v2ScreeningsDocumentsListRaw(requestParameters, initOverrides) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
const requestOptions = yield this.v2ScreeningsDocumentsListRequestOpts(requestParameters);
|
|
111
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
112
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(V2DocumentFromJSON));
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Documents attached to the screening\'s checks. Files are delivered inline as Base64 in `content`. Narrow the result with `check_id` or `check_type`.
|
|
117
|
+
* Retrieve screening documents
|
|
118
|
+
*/
|
|
119
|
+
v2ScreeningsDocumentsList(requestParameters, initOverrides) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
const response = yield this.v2ScreeningsDocumentsListRaw(requestParameters, initOverrides);
|
|
122
|
+
return yield response.value();
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Creates request options for v2ScreeningsList without sending the request
|
|
127
|
+
*/
|
|
128
|
+
v2ScreeningsListRequestOpts(requestParameters) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
const queryParameters = {};
|
|
131
|
+
if (requestParameters['page'] != null) {
|
|
132
|
+
queryParameters['page'] = requestParameters['page'];
|
|
133
|
+
}
|
|
134
|
+
if (requestParameters['pageSize'] != null) {
|
|
135
|
+
queryParameters['page_size'] = requestParameters['pageSize'];
|
|
136
|
+
}
|
|
137
|
+
if (requestParameters['paginate'] != null) {
|
|
138
|
+
queryParameters['paginate'] = requestParameters['paginate'];
|
|
139
|
+
}
|
|
140
|
+
const headerParameters = {};
|
|
141
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
142
|
+
// oauth required
|
|
143
|
+
headerParameters["Authorization"] = `Bearer ${yield this.configuration.accessToken("oauth2", ["read:api", "create:api", "update:api"])}`;
|
|
144
|
+
}
|
|
145
|
+
let urlPath = `/api/v2/screenings/`;
|
|
146
|
+
return {
|
|
147
|
+
path: urlPath,
|
|
148
|
+
method: 'GET',
|
|
149
|
+
headers: headerParameters,
|
|
150
|
+
query: queryParameters,
|
|
151
|
+
};
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
*/
|
|
156
|
+
v2ScreeningsListRaw(requestParameters, initOverrides) {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
const requestOptions = yield this.v2ScreeningsListRequestOpts(requestParameters);
|
|
159
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
160
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedV2ScreeningListItemListFromJSON(jsonValue));
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
*/
|
|
165
|
+
v2ScreeningsList() {
|
|
166
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
167
|
+
const response = yield this.v2ScreeningsListRaw(requestParameters, initOverrides);
|
|
168
|
+
return yield response.value();
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Creates request options for v2ScreeningsRetrieve without sending the request
|
|
173
|
+
*/
|
|
174
|
+
v2ScreeningsRetrieveRequestOpts(requestParameters) {
|
|
175
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
176
|
+
if (requestParameters['id'] == null) {
|
|
177
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling v2ScreeningsRetrieve().');
|
|
178
|
+
}
|
|
179
|
+
const queryParameters = {};
|
|
180
|
+
const headerParameters = {};
|
|
181
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
182
|
+
// oauth required
|
|
183
|
+
headerParameters["Authorization"] = `Bearer ${yield this.configuration.accessToken("oauth2", ["read:api", "create:api", "update:api"])}`;
|
|
184
|
+
}
|
|
185
|
+
let urlPath = `/api/v2/screenings/{id}/`;
|
|
186
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
187
|
+
return {
|
|
188
|
+
path: urlPath,
|
|
189
|
+
method: 'GET',
|
|
190
|
+
headers: headerParameters,
|
|
191
|
+
query: queryParameters,
|
|
192
|
+
};
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
*/
|
|
197
|
+
v2ScreeningsRetrieveRaw(requestParameters, initOverrides) {
|
|
198
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
199
|
+
const requestOptions = yield this.v2ScreeningsRetrieveRequestOpts(requestParameters);
|
|
200
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
201
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => V2ScreeningDetailFromJSON(jsonValue));
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
*/
|
|
206
|
+
v2ScreeningsRetrieve(requestParameters, initOverrides) {
|
|
207
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
+
const response = yield this.v2ScreeningsRetrieveRaw(requestParameters, initOverrides);
|
|
209
|
+
return yield response.value();
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pescheck API
|
|
3
|
+
* 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.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import { type VerifyWebhook } from '../models/VerifyWebhook';
|
|
14
|
+
import { type Webhook } from '../models/Webhook';
|
|
15
|
+
import { type WebhookResponse } from '../models/WebhookResponse';
|
|
16
|
+
export interface CreateWebhook2Request {
|
|
17
|
+
webhook: Webhook;
|
|
18
|
+
xOrganizationId?: string;
|
|
19
|
+
organizationId?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface DeleteWebhook2Request {
|
|
22
|
+
webhookId: string;
|
|
23
|
+
}
|
|
24
|
+
export interface VerifyWebhook2Request {
|
|
25
|
+
webhookId: string;
|
|
26
|
+
verifyWebhook: VerifyWebhook;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* WebhooksApi - interface
|
|
30
|
+
*
|
|
31
|
+
* @export
|
|
32
|
+
* @interface WebhooksApiInterface
|
|
33
|
+
*/
|
|
34
|
+
export interface WebhooksApiInterface {
|
|
35
|
+
/**
|
|
36
|
+
* Creates request options for createWebhook2 without sending the request
|
|
37
|
+
* @param {Webhook} webhook
|
|
38
|
+
* @param {string} [xOrganizationId] Organization ID (for JWT/Session auth only)
|
|
39
|
+
* @param {string} [organizationId] Organization ID (for JWT/Session auth only)
|
|
40
|
+
* @throws {RequiredError}
|
|
41
|
+
* @memberof WebhooksApiInterface
|
|
42
|
+
*/
|
|
43
|
+
createWebhook2RequestOpts(requestParameters: CreateWebhook2Request): Promise<runtime.RequestOpts>;
|
|
44
|
+
/**
|
|
45
|
+
* 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.
|
|
46
|
+
* @param {Webhook} webhook
|
|
47
|
+
* @param {string} [xOrganizationId] Organization ID (for JWT/Session auth only)
|
|
48
|
+
* @param {string} [organizationId] Organization ID (for JWT/Session auth only)
|
|
49
|
+
* @param {*} [options] Override http request option.
|
|
50
|
+
* @throws {RequiredError}
|
|
51
|
+
* @memberof WebhooksApiInterface
|
|
52
|
+
*/
|
|
53
|
+
createWebhook2Raw(requestParameters: CreateWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookResponse>>;
|
|
54
|
+
/**
|
|
55
|
+
* 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.
|
|
56
|
+
*/
|
|
57
|
+
createWebhook2(requestParameters: CreateWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookResponse>;
|
|
58
|
+
/**
|
|
59
|
+
* Creates request options for deleteWebhook2 without sending the request
|
|
60
|
+
* @param {string} webhookId Webhook ID to delete
|
|
61
|
+
* @throws {RequiredError}
|
|
62
|
+
* @memberof WebhooksApiInterface
|
|
63
|
+
*/
|
|
64
|
+
deleteWebhook2RequestOpts(requestParameters: DeleteWebhook2Request): Promise<runtime.RequestOpts>;
|
|
65
|
+
/**
|
|
66
|
+
* Delete a webhook
|
|
67
|
+
* @param {string} webhookId Webhook ID to delete
|
|
68
|
+
* @param {*} [options] Override http request option.
|
|
69
|
+
* @throws {RequiredError}
|
|
70
|
+
* @memberof WebhooksApiInterface
|
|
71
|
+
*/
|
|
72
|
+
deleteWebhook2Raw(requestParameters: DeleteWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
73
|
+
/**
|
|
74
|
+
* Delete a webhook
|
|
75
|
+
*/
|
|
76
|
+
deleteWebhook2(requestParameters: DeleteWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Creates request options for listWebhooks2 without sending the request
|
|
79
|
+
* @throws {RequiredError}
|
|
80
|
+
* @memberof WebhooksApiInterface
|
|
81
|
+
*/
|
|
82
|
+
listWebhooks2RequestOpts(): Promise<runtime.RequestOpts>;
|
|
83
|
+
/**
|
|
84
|
+
* List webhooks for the organization
|
|
85
|
+
* @param {*} [options] Override http request option.
|
|
86
|
+
* @throws {RequiredError}
|
|
87
|
+
* @memberof WebhooksApiInterface
|
|
88
|
+
*/
|
|
89
|
+
listWebhooks2Raw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<WebhookResponse>>>;
|
|
90
|
+
/**
|
|
91
|
+
* List webhooks for the organization
|
|
92
|
+
*/
|
|
93
|
+
listWebhooks2(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<WebhookResponse>>;
|
|
94
|
+
/**
|
|
95
|
+
* Creates request options for verifyWebhook2 without sending the request
|
|
96
|
+
* @param {string} webhookId Webhook ID
|
|
97
|
+
* @param {VerifyWebhook} verifyWebhook
|
|
98
|
+
* @throws {RequiredError}
|
|
99
|
+
* @memberof WebhooksApiInterface
|
|
100
|
+
*/
|
|
101
|
+
verifyWebhook2RequestOpts(requestParameters: VerifyWebhook2Request): Promise<runtime.RequestOpts>;
|
|
102
|
+
/**
|
|
103
|
+
* Verify webhook ownership
|
|
104
|
+
* @param {string} webhookId Webhook ID
|
|
105
|
+
* @param {VerifyWebhook} verifyWebhook
|
|
106
|
+
* @param {*} [options] Override http request option.
|
|
107
|
+
* @throws {RequiredError}
|
|
108
|
+
* @memberof WebhooksApiInterface
|
|
109
|
+
*/
|
|
110
|
+
verifyWebhook2Raw(requestParameters: VerifyWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
111
|
+
/**
|
|
112
|
+
* Verify webhook ownership
|
|
113
|
+
*/
|
|
114
|
+
verifyWebhook2(requestParameters: VerifyWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
*
|
|
118
|
+
*/
|
|
119
|
+
export declare class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface {
|
|
120
|
+
/**
|
|
121
|
+
* Creates request options for createWebhook2 without sending the request
|
|
122
|
+
*/
|
|
123
|
+
createWebhook2RequestOpts(requestParameters: CreateWebhook2Request): Promise<runtime.RequestOpts>;
|
|
124
|
+
/**
|
|
125
|
+
* 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.
|
|
126
|
+
*/
|
|
127
|
+
createWebhook2Raw(requestParameters: CreateWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookResponse>>;
|
|
128
|
+
/**
|
|
129
|
+
* 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.
|
|
130
|
+
*/
|
|
131
|
+
createWebhook2(requestParameters: CreateWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookResponse>;
|
|
132
|
+
/**
|
|
133
|
+
* Creates request options for deleteWebhook2 without sending the request
|
|
134
|
+
*/
|
|
135
|
+
deleteWebhook2RequestOpts(requestParameters: DeleteWebhook2Request): Promise<runtime.RequestOpts>;
|
|
136
|
+
/**
|
|
137
|
+
* Delete a webhook
|
|
138
|
+
*/
|
|
139
|
+
deleteWebhook2Raw(requestParameters: DeleteWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
140
|
+
/**
|
|
141
|
+
* Delete a webhook
|
|
142
|
+
*/
|
|
143
|
+
deleteWebhook2(requestParameters: DeleteWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
144
|
+
/**
|
|
145
|
+
* Creates request options for listWebhooks2 without sending the request
|
|
146
|
+
*/
|
|
147
|
+
listWebhooks2RequestOpts(): Promise<runtime.RequestOpts>;
|
|
148
|
+
/**
|
|
149
|
+
* List webhooks for the organization
|
|
150
|
+
*/
|
|
151
|
+
listWebhooks2Raw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<WebhookResponse>>>;
|
|
152
|
+
/**
|
|
153
|
+
* List webhooks for the organization
|
|
154
|
+
*/
|
|
155
|
+
listWebhooks2(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<WebhookResponse>>;
|
|
156
|
+
/**
|
|
157
|
+
* Creates request options for verifyWebhook2 without sending the request
|
|
158
|
+
*/
|
|
159
|
+
verifyWebhook2RequestOpts(requestParameters: VerifyWebhook2Request): Promise<runtime.RequestOpts>;
|
|
160
|
+
/**
|
|
161
|
+
* Verify webhook ownership
|
|
162
|
+
*/
|
|
163
|
+
verifyWebhook2Raw(requestParameters: VerifyWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
164
|
+
/**
|
|
165
|
+
* Verify webhook ownership
|
|
166
|
+
*/
|
|
167
|
+
verifyWebhook2(requestParameters: VerifyWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
168
|
+
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Pescheck API
|
|
5
|
+
* 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.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { VerifyWebhookToJSON, } from '../models/VerifyWebhook';
|
|
25
|
+
import { WebhookToJSON, } from '../models/Webhook';
|
|
26
|
+
import { WebhookResponseFromJSON, } from '../models/WebhookResponse';
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export class WebhooksApi extends runtime.BaseAPI {
|
|
31
|
+
/**
|
|
32
|
+
* Creates request options for createWebhook2 without sending the request
|
|
33
|
+
*/
|
|
34
|
+
createWebhook2RequestOpts(requestParameters) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
if (requestParameters['webhook'] == null) {
|
|
37
|
+
throw new runtime.RequiredError('webhook', 'Required parameter "webhook" was null or undefined when calling createWebhook2().');
|
|
38
|
+
}
|
|
39
|
+
const queryParameters = {};
|
|
40
|
+
if (requestParameters['organizationId'] != null) {
|
|
41
|
+
queryParameters['organization_id'] = requestParameters['organizationId'];
|
|
42
|
+
}
|
|
43
|
+
const headerParameters = {};
|
|
44
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
45
|
+
if (requestParameters['xOrganizationId'] != null) {
|
|
46
|
+
headerParameters['X-Organization-Id'] = String(requestParameters['xOrganizationId']);
|
|
47
|
+
}
|
|
48
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
49
|
+
// oauth required
|
|
50
|
+
headerParameters["Authorization"] = `Bearer ${yield this.configuration.accessToken("oauth2", ["read:api", "create:api", "update:api"])}`;
|
|
51
|
+
}
|
|
52
|
+
let urlPath = `/api/v2/webhooks/`;
|
|
53
|
+
return {
|
|
54
|
+
path: urlPath,
|
|
55
|
+
method: 'POST',
|
|
56
|
+
headers: headerParameters,
|
|
57
|
+
query: queryParameters,
|
|
58
|
+
body: WebhookToJSON(requestParameters['webhook']),
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* 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.
|
|
64
|
+
*/
|
|
65
|
+
createWebhook2Raw(requestParameters, initOverrides) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
const requestOptions = yield this.createWebhook2RequestOpts(requestParameters);
|
|
68
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
69
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WebhookResponseFromJSON(jsonValue));
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* 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.
|
|
74
|
+
*/
|
|
75
|
+
createWebhook2(requestParameters, initOverrides) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
const response = yield this.createWebhook2Raw(requestParameters, initOverrides);
|
|
78
|
+
return yield response.value();
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Creates request options for deleteWebhook2 without sending the request
|
|
83
|
+
*/
|
|
84
|
+
deleteWebhook2RequestOpts(requestParameters) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
if (requestParameters['webhookId'] == null) {
|
|
87
|
+
throw new runtime.RequiredError('webhookId', 'Required parameter "webhookId" was null or undefined when calling deleteWebhook2().');
|
|
88
|
+
}
|
|
89
|
+
const queryParameters = {};
|
|
90
|
+
const headerParameters = {};
|
|
91
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
92
|
+
// oauth required
|
|
93
|
+
headerParameters["Authorization"] = `Bearer ${yield this.configuration.accessToken("oauth2", ["read:api", "create:api", "update:api"])}`;
|
|
94
|
+
}
|
|
95
|
+
let urlPath = `/api/v2/webhooks/{webhook_id}/`;
|
|
96
|
+
urlPath = urlPath.replace('{webhook_id}', encodeURIComponent(String(requestParameters['webhookId'])));
|
|
97
|
+
return {
|
|
98
|
+
path: urlPath,
|
|
99
|
+
method: 'DELETE',
|
|
100
|
+
headers: headerParameters,
|
|
101
|
+
query: queryParameters,
|
|
102
|
+
};
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Delete a webhook
|
|
107
|
+
*/
|
|
108
|
+
deleteWebhook2Raw(requestParameters, initOverrides) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
const requestOptions = yield this.deleteWebhook2RequestOpts(requestParameters);
|
|
111
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
112
|
+
return new runtime.VoidApiResponse(response);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Delete a webhook
|
|
117
|
+
*/
|
|
118
|
+
deleteWebhook2(requestParameters, initOverrides) {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
yield this.deleteWebhook2Raw(requestParameters, initOverrides);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Creates request options for listWebhooks2 without sending the request
|
|
125
|
+
*/
|
|
126
|
+
listWebhooks2RequestOpts() {
|
|
127
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
128
|
+
const queryParameters = {};
|
|
129
|
+
const headerParameters = {};
|
|
130
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
131
|
+
// oauth required
|
|
132
|
+
headerParameters["Authorization"] = `Bearer ${yield this.configuration.accessToken("oauth2", ["read:api", "create:api", "update:api"])}`;
|
|
133
|
+
}
|
|
134
|
+
let urlPath = `/api/v2/webhooks/list/`;
|
|
135
|
+
return {
|
|
136
|
+
path: urlPath,
|
|
137
|
+
method: 'GET',
|
|
138
|
+
headers: headerParameters,
|
|
139
|
+
query: queryParameters,
|
|
140
|
+
};
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* List webhooks for the organization
|
|
145
|
+
*/
|
|
146
|
+
listWebhooks2Raw(initOverrides) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
const requestOptions = yield this.listWebhooks2RequestOpts();
|
|
149
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
150
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(WebhookResponseFromJSON));
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* List webhooks for the organization
|
|
155
|
+
*/
|
|
156
|
+
listWebhooks2(initOverrides) {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
const response = yield this.listWebhooks2Raw(initOverrides);
|
|
159
|
+
return yield response.value();
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Creates request options for verifyWebhook2 without sending the request
|
|
164
|
+
*/
|
|
165
|
+
verifyWebhook2RequestOpts(requestParameters) {
|
|
166
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
+
if (requestParameters['webhookId'] == null) {
|
|
168
|
+
throw new runtime.RequiredError('webhookId', 'Required parameter "webhookId" was null or undefined when calling verifyWebhook2().');
|
|
169
|
+
}
|
|
170
|
+
if (requestParameters['verifyWebhook'] == null) {
|
|
171
|
+
throw new runtime.RequiredError('verifyWebhook', 'Required parameter "verifyWebhook" was null or undefined when calling verifyWebhook2().');
|
|
172
|
+
}
|
|
173
|
+
const queryParameters = {};
|
|
174
|
+
const headerParameters = {};
|
|
175
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
176
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
177
|
+
// oauth required
|
|
178
|
+
headerParameters["Authorization"] = `Bearer ${yield this.configuration.accessToken("oauth2", ["read:api", "create:api", "update:api"])}`;
|
|
179
|
+
}
|
|
180
|
+
let urlPath = `/api/v2/webhooks/{webhook_id}/verify/`;
|
|
181
|
+
urlPath = urlPath.replace('{webhook_id}', encodeURIComponent(String(requestParameters['webhookId'])));
|
|
182
|
+
return {
|
|
183
|
+
path: urlPath,
|
|
184
|
+
method: 'POST',
|
|
185
|
+
headers: headerParameters,
|
|
186
|
+
query: queryParameters,
|
|
187
|
+
body: VerifyWebhookToJSON(requestParameters['verifyWebhook']),
|
|
188
|
+
};
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Verify webhook ownership
|
|
193
|
+
*/
|
|
194
|
+
verifyWebhook2Raw(requestParameters, initOverrides) {
|
|
195
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
196
|
+
const requestOptions = yield this.verifyWebhook2RequestOpts(requestParameters);
|
|
197
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
198
|
+
return new runtime.VoidApiResponse(response);
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Verify webhook ownership
|
|
203
|
+
*/
|
|
204
|
+
verifyWebhook2(requestParameters, initOverrides) {
|
|
205
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
yield this.verifyWebhook2Raw(requestParameters, initOverrides);
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export * from './AuthenticationApi';
|
|
4
|
+
export * from './ChecksApi';
|
|
5
|
+
export * from './DivisionsApi';
|
|
6
|
+
export * from './OAuthApi';
|
|
7
|
+
export * from './ProfilesApi';
|
|
8
|
+
export * from './ScreeningsApi';
|
|
9
|
+
export * from './WebhooksApi';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pescheck API
|
|
3
|
+
* 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.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Custom JWT serializer that includes organization information in the token.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CustomTokenObtainPair
|
|
16
|
+
*/
|
|
17
|
+
export interface CustomTokenObtainPair {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CustomTokenObtainPair
|
|
22
|
+
*/
|
|
23
|
+
email: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof CustomTokenObtainPair
|
|
28
|
+
*/
|
|
29
|
+
password: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the CustomTokenObtainPair interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfCustomTokenObtainPair(value: any): value is CustomTokenObtainPair;
|
|
35
|
+
export declare function CustomTokenObtainPairFromJSON(json: any): CustomTokenObtainPair;
|
|
36
|
+
export declare function CustomTokenObtainPairFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomTokenObtainPair;
|
|
37
|
+
export declare function CustomTokenObtainPairToJSON(json: any): CustomTokenObtainPair;
|
|
38
|
+
export declare function CustomTokenObtainPairToJSONTyped(value?: CustomTokenObtainPair | null, ignoreDiscriminator?: boolean): any;
|