@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
package/README.md
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# @pescheckit/pescheck-client-js
|
|
2
|
+
|
|
3
|
+
PescheckApi - JavaScript client for @pescheckit/pescheck-client-js
|
|
4
|
+
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.
|
|
5
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
6
|
+
|
|
7
|
+
- API version: 2.0.0
|
|
8
|
+
- Package version: 0.0.5
|
|
9
|
+
- Generator version: 7.23.0
|
|
10
|
+
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
### For [Node.js](https://nodejs.org/)
|
|
15
|
+
|
|
16
|
+
#### npm
|
|
17
|
+
|
|
18
|
+
To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).
|
|
19
|
+
|
|
20
|
+
Then install it via:
|
|
21
|
+
|
|
22
|
+
```shell
|
|
23
|
+
npm install @pescheckit/pescheck-client-js --save
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Finally, you need to build the module:
|
|
27
|
+
|
|
28
|
+
```shell
|
|
29
|
+
npm run build
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
##### Local development
|
|
33
|
+
|
|
34
|
+
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:
|
|
35
|
+
|
|
36
|
+
```shell
|
|
37
|
+
npm install
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:
|
|
41
|
+
|
|
42
|
+
```shell
|
|
43
|
+
npm link
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
To use the link you just defined in your project, switch to the directory you want to use your @pescheckit/pescheck-client-js from, and run:
|
|
47
|
+
|
|
48
|
+
```shell
|
|
49
|
+
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Finally, you need to build the module:
|
|
53
|
+
|
|
54
|
+
```shell
|
|
55
|
+
npm run build
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
#### git
|
|
59
|
+
|
|
60
|
+
If the library is hosted at a git repository, e.g.https://github.com/pescheckit/pescheck-clients
|
|
61
|
+
then install it via:
|
|
62
|
+
|
|
63
|
+
```shell
|
|
64
|
+
npm install pescheckit/pescheck-clients --save
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### For browser
|
|
68
|
+
|
|
69
|
+
The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
|
|
70
|
+
the above steps with Node.js and installing browserify with `npm install -g browserify`,
|
|
71
|
+
perform the following (assuming *main.js* is your entry file):
|
|
72
|
+
|
|
73
|
+
```shell
|
|
74
|
+
browserify main.js > bundle.js
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Then include *bundle.js* in the HTML pages.
|
|
78
|
+
|
|
79
|
+
### Webpack Configuration
|
|
80
|
+
|
|
81
|
+
Using Webpack you may encounter the following error: "Module not found: Error:
|
|
82
|
+
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
|
|
83
|
+
the following section to your webpack config:
|
|
84
|
+
|
|
85
|
+
```javascript
|
|
86
|
+
module: {
|
|
87
|
+
rules: [
|
|
88
|
+
{
|
|
89
|
+
parser: {
|
|
90
|
+
amd: false
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Getting Started
|
|
98
|
+
|
|
99
|
+
Please follow the [installation](#installation) instruction and execute the following JS code:
|
|
100
|
+
|
|
101
|
+
```javascript
|
|
102
|
+
var PescheckApi = require('@pescheckit/pescheck-client-js');
|
|
103
|
+
|
|
104
|
+
var defaultClient = PescheckApi.ApiClient.instance;
|
|
105
|
+
// Configure OAuth2 access token for authorization: oauth2
|
|
106
|
+
var oauth2 = defaultClient.authentications['oauth2'];
|
|
107
|
+
oauth2.accessToken = "YOUR ACCESS TOKEN"
|
|
108
|
+
|
|
109
|
+
var api = new PescheckApi.AuthenticationApi()
|
|
110
|
+
var jWTGeneration = new PescheckApi.JWTGeneration(); // {JWTGeneration}
|
|
111
|
+
api.generateJWTToken2(jWTGeneration).then(function(data) {
|
|
112
|
+
console.log('API called successfully. Returned data: ' + data);
|
|
113
|
+
}, function(error) {
|
|
114
|
+
console.error(error);
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Documentation for API Endpoints
|
|
121
|
+
|
|
122
|
+
All URIs are relative to *https://api.pescheck.io*
|
|
123
|
+
|
|
124
|
+
Class | Method | HTTP request | Description
|
|
125
|
+
------------ | ------------- | ------------- | -------------
|
|
126
|
+
*PescheckApi.AuthenticationApi* | [**generateJWTToken2**](docs/AuthenticationApi.md#generateJWTToken2) | **POST** /api/v2/jwt/generate/ |
|
|
127
|
+
*PescheckApi.AuthenticationApi* | [**jwtCreate**](docs/AuthenticationApi.md#jwtCreate) | **POST** /api/jwt/ |
|
|
128
|
+
*PescheckApi.AuthenticationApi* | [**jwtRefreshCreate**](docs/AuthenticationApi.md#jwtRefreshCreate) | **POST** /api/jwt/refresh/ |
|
|
129
|
+
*PescheckApi.ChecksApi* | [**v2ChecksList**](docs/ChecksApi.md#v2ChecksList) | **GET** /api/v2/checks/ |
|
|
130
|
+
*PescheckApi.ChecksApi* | [**v2ChecksRetrieve**](docs/ChecksApi.md#v2ChecksRetrieve) | **GET** /api/v2/checks/{check_type}/ |
|
|
131
|
+
*PescheckApi.DivisionsApi* | [**v2OrganisationsDivisionsCreate**](docs/DivisionsApi.md#v2OrganisationsDivisionsCreate) | **POST** /api/v2/organisations/divisions/ |
|
|
132
|
+
*PescheckApi.DivisionsApi* | [**v2OrganisationsDivisionsList**](docs/DivisionsApi.md#v2OrganisationsDivisionsList) | **GET** /api/v2/organisations/divisions/ |
|
|
133
|
+
*PescheckApi.DivisionsApi* | [**v2OrganisationsDivisionsPartialUpdate**](docs/DivisionsApi.md#v2OrganisationsDivisionsPartialUpdate) | **PATCH** /api/v2/organisations/divisions/{id}/ |
|
|
134
|
+
*PescheckApi.DivisionsApi* | [**v2OrganisationsDivisionsRetrieve**](docs/DivisionsApi.md#v2OrganisationsDivisionsRetrieve) | **GET** /api/v2/organisations/divisions/{id}/ |
|
|
135
|
+
*PescheckApi.DivisionsApi* | [**v2OrganisationsDivisionsUpdate**](docs/DivisionsApi.md#v2OrganisationsDivisionsUpdate) | **PUT** /api/v2/organisations/divisions/{id}/ |
|
|
136
|
+
*PescheckApi.OAuthApi* | [**createOAuthApplication2**](docs/OAuthApi.md#createOAuthApplication2) | **POST** /api/v2/oauth/applications/ |
|
|
137
|
+
*PescheckApi.OAuthApi* | [**deleteOAuthApplication2**](docs/OAuthApi.md#deleteOAuthApplication2) | **DELETE** /api/v2/oauth/applications/{application_id}/ |
|
|
138
|
+
*PescheckApi.OAuthApi* | [**listOAuthApplications2**](docs/OAuthApi.md#listOAuthApplications2) | **GET** /api/v2/oauth/applications/list/ |
|
|
139
|
+
*PescheckApi.ProfilesApi* | [**v2ProfilesCreate**](docs/ProfilesApi.md#v2ProfilesCreate) | **POST** /api/v2/profiles/ |
|
|
140
|
+
*PescheckApi.ProfilesApi* | [**v2ProfilesDestroy**](docs/ProfilesApi.md#v2ProfilesDestroy) | **DELETE** /api/v2/profiles/{id}/ |
|
|
141
|
+
*PescheckApi.ProfilesApi* | [**v2ProfilesList**](docs/ProfilesApi.md#v2ProfilesList) | **GET** /api/v2/profiles/ |
|
|
142
|
+
*PescheckApi.ProfilesApi* | [**v2ProfilesPartialUpdate**](docs/ProfilesApi.md#v2ProfilesPartialUpdate) | **PATCH** /api/v2/profiles/{id}/ |
|
|
143
|
+
*PescheckApi.ProfilesApi* | [**v2ProfilesRetrieve**](docs/ProfilesApi.md#v2ProfilesRetrieve) | **GET** /api/v2/profiles/{id}/ |
|
|
144
|
+
*PescheckApi.ProfilesApi* | [**v2ProfilesUpdate**](docs/ProfilesApi.md#v2ProfilesUpdate) | **PUT** /api/v2/profiles/{id}/ |
|
|
145
|
+
*PescheckApi.ScreeningsApi* | [**v2ScreeningsCreate**](docs/ScreeningsApi.md#v2ScreeningsCreate) | **POST** /api/v2/screenings/ |
|
|
146
|
+
*PescheckApi.ScreeningsApi* | [**v2ScreeningsDocumentsList**](docs/ScreeningsApi.md#v2ScreeningsDocumentsList) | **GET** /api/v2/screenings/{id}/documents/ | Retrieve screening documents
|
|
147
|
+
*PescheckApi.ScreeningsApi* | [**v2ScreeningsList**](docs/ScreeningsApi.md#v2ScreeningsList) | **GET** /api/v2/screenings/ |
|
|
148
|
+
*PescheckApi.ScreeningsApi* | [**v2ScreeningsRetrieve**](docs/ScreeningsApi.md#v2ScreeningsRetrieve) | **GET** /api/v2/screenings/{id}/ |
|
|
149
|
+
*PescheckApi.WebhooksApi* | [**createWebhook2**](docs/WebhooksApi.md#createWebhook2) | **POST** /api/v2/webhooks/ |
|
|
150
|
+
*PescheckApi.WebhooksApi* | [**deleteWebhook2**](docs/WebhooksApi.md#deleteWebhook2) | **DELETE** /api/v2/webhooks/{webhook_id}/ |
|
|
151
|
+
*PescheckApi.WebhooksApi* | [**listWebhooks2**](docs/WebhooksApi.md#listWebhooks2) | **GET** /api/v2/webhooks/list/ |
|
|
152
|
+
*PescheckApi.WebhooksApi* | [**verifyWebhook2**](docs/WebhooksApi.md#verifyWebhook2) | **POST** /api/v2/webhooks/{webhook_id}/verify/ |
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
## Documentation for Models
|
|
156
|
+
|
|
157
|
+
- [PescheckApi.CustomTokenObtainPair](docs/CustomTokenObtainPair.md)
|
|
158
|
+
- [PescheckApi.DivisionReadOnly](docs/DivisionReadOnly.md)
|
|
159
|
+
- [PescheckApi.DivisionWrite](docs/DivisionWrite.md)
|
|
160
|
+
- [PescheckApi.JWTGeneration](docs/JWTGeneration.md)
|
|
161
|
+
- [PescheckApi.JWTResponse](docs/JWTResponse.md)
|
|
162
|
+
- [PescheckApi.OAuthApplication](docs/OAuthApplication.md)
|
|
163
|
+
- [PescheckApi.OAuthApplicationResponse](docs/OAuthApplicationResponse.md)
|
|
164
|
+
- [PescheckApi.PaginatedDivisionReadOnlyList](docs/PaginatedDivisionReadOnlyList.md)
|
|
165
|
+
- [PescheckApi.PaginatedV2ProfileListItemList](docs/PaginatedV2ProfileListItemList.md)
|
|
166
|
+
- [PescheckApi.PaginatedV2ScreeningListItemList](docs/PaginatedV2ScreeningListItemList.md)
|
|
167
|
+
- [PescheckApi.PatchedDivisionWrite](docs/PatchedDivisionWrite.md)
|
|
168
|
+
- [PescheckApi.PatchedV2ProfilePartialUpdate](docs/PatchedV2ProfilePartialUpdate.md)
|
|
169
|
+
- [PescheckApi.TokenRefresh](docs/TokenRefresh.md)
|
|
170
|
+
- [PescheckApi.V2Candidate](docs/V2Candidate.md)
|
|
171
|
+
- [PescheckApi.V2CheckField](docs/V2CheckField.md)
|
|
172
|
+
- [PescheckApi.V2CheckInfo](docs/V2CheckInfo.md)
|
|
173
|
+
- [PescheckApi.V2Document](docs/V2Document.md)
|
|
174
|
+
- [PescheckApi.V2DocumentContent](docs/V2DocumentContent.md)
|
|
175
|
+
- [PescheckApi.V2Money](docs/V2Money.md)
|
|
176
|
+
- [PescheckApi.V2ProfileCheck](docs/V2ProfileCheck.md)
|
|
177
|
+
- [PescheckApi.V2ProfileCheckEntry](docs/V2ProfileCheckEntry.md)
|
|
178
|
+
- [PescheckApi.V2ProfileCreate](docs/V2ProfileCreate.md)
|
|
179
|
+
- [PescheckApi.V2ProfileDetail](docs/V2ProfileDetail.md)
|
|
180
|
+
- [PescheckApi.V2ProfileListItem](docs/V2ProfileListItem.md)
|
|
181
|
+
- [PescheckApi.V2ProfileUpdate](docs/V2ProfileUpdate.md)
|
|
182
|
+
- [PescheckApi.V2ProfileUpdateCheck](docs/V2ProfileUpdateCheck.md)
|
|
183
|
+
- [PescheckApi.V2ScreeningCheck](docs/V2ScreeningCheck.md)
|
|
184
|
+
- [PescheckApi.V2ScreeningCheckEntry](docs/V2ScreeningCheckEntry.md)
|
|
185
|
+
- [PescheckApi.V2ScreeningCheckListItem](docs/V2ScreeningCheckListItem.md)
|
|
186
|
+
- [PescheckApi.V2ScreeningCreate](docs/V2ScreeningCreate.md)
|
|
187
|
+
- [PescheckApi.V2ScreeningDetail](docs/V2ScreeningDetail.md)
|
|
188
|
+
- [PescheckApi.V2ScreeningDetailProfile](docs/V2ScreeningDetailProfile.md)
|
|
189
|
+
- [PescheckApi.V2ScreeningListItem](docs/V2ScreeningListItem.md)
|
|
190
|
+
- [PescheckApi.VerifyWebhook](docs/VerifyWebhook.md)
|
|
191
|
+
- [PescheckApi.Webhook](docs/Webhook.md)
|
|
192
|
+
- [PescheckApi.WebhookResponse](docs/WebhookResponse.md)
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
## Documentation for Authorization
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
Authentication schemes defined for the API:
|
|
199
|
+
### cookieAuth
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
- **Type**: API key
|
|
203
|
+
- **API key parameter name**: __Secure-sessionid
|
|
204
|
+
- **Location**:
|
|
205
|
+
|
|
206
|
+
### jwtAuth
|
|
207
|
+
|
|
208
|
+
- **Type**: Bearer authentication (JWT)
|
|
209
|
+
|
|
210
|
+
### oauth2
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
- **Type**: OAuth
|
|
214
|
+
- **Flow**: application
|
|
215
|
+
- **Authorization URL**:
|
|
216
|
+
- **Scopes**:
|
|
217
|
+
- read:api: read groups
|
|
218
|
+
- create:api: create groups
|
|
219
|
+
- update:api: update groups
|
|
220
|
+
|