pescheck 0.0.1
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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +193 -0
- data/Rakefile +10 -0
- data/docs/AuthenticationApi.md +217 -0
- data/docs/ChecksApi.md +147 -0
- data/docs/CustomTokenObtainPair.md +20 -0
- data/docs/DivisionReadOnly.md +46 -0
- data/docs/DivisionWrite.md +40 -0
- data/docs/DivisionsApi.md +369 -0
- data/docs/JWTGeneration.md +24 -0
- data/docs/JWTResponse.md +28 -0
- data/docs/OAuthApi.md +213 -0
- data/docs/OAuthApplication.md +26 -0
- data/docs/OAuthApplicationResponse.md +32 -0
- data/docs/PaginatedDivisionReadOnlyList.md +24 -0
- data/docs/PaginatedV2ProfileListItemList.md +24 -0
- data/docs/PaginatedV2ScreeningListItemList.md +24 -0
- data/docs/PatchedDivisionWrite.md +40 -0
- data/docs/PatchedV2ProfilePartialUpdate.md +20 -0
- data/docs/ProfilesApi.md +438 -0
- data/docs/ScreeningsApi.md +293 -0
- data/docs/TokenRefresh.md +20 -0
- data/docs/V2Candidate.md +36 -0
- data/docs/V2CheckField.md +26 -0
- data/docs/V2CheckInfo.md +40 -0
- data/docs/V2Document.md +28 -0
- data/docs/V2DocumentContent.md +20 -0
- data/docs/V2Money.md +20 -0
- data/docs/V2ProfileCheck.md +20 -0
- data/docs/V2ProfileCheckEntry.md +30 -0
- data/docs/V2ProfileCreate.md +22 -0
- data/docs/V2ProfileDetail.md +38 -0
- data/docs/V2ProfileListItem.md +30 -0
- data/docs/V2ProfileUpdate.md +22 -0
- data/docs/V2ProfileUpdateCheck.md +22 -0
- data/docs/V2ScreeningCheck.md +24 -0
- data/docs/V2ScreeningCheckEntry.md +34 -0
- data/docs/V2ScreeningCheckListItem.md +22 -0
- data/docs/V2ScreeningCreate.md +22 -0
- data/docs/V2ScreeningDetail.md +34 -0
- data/docs/V2ScreeningDetailProfile.md +20 -0
- data/docs/V2ScreeningListItem.md +34 -0
- data/docs/VerifyWebhook.md +18 -0
- data/docs/Webhook.md +26 -0
- data/docs/WebhookResponse.md +36 -0
- data/docs/WebhooksApi.md +290 -0
- data/git_push.sh +57 -0
- data/lib/pescheck/api/authentication_api.rb +220 -0
- data/lib/pescheck/api/checks_api.rb +144 -0
- data/lib/pescheck/api/divisions_api.rb +365 -0
- data/lib/pescheck/api/o_auth_api.rb +202 -0
- data/lib/pescheck/api/profiles_api.rb +432 -0
- data/lib/pescheck/api/screenings_api.rb +288 -0
- data/lib/pescheck/api/webhooks_api.rb +278 -0
- data/lib/pescheck/api_client.rb +441 -0
- data/lib/pescheck/api_error.rb +58 -0
- data/lib/pescheck/api_model_base.rb +88 -0
- data/lib/pescheck/configuration.rb +429 -0
- data/lib/pescheck/models/custom_token_obtain_pair.rb +191 -0
- data/lib/pescheck/models/division_read_only.rb +469 -0
- data/lib/pescheck/models/division_write.rb +436 -0
- data/lib/pescheck/models/jwt_generation.rb +213 -0
- data/lib/pescheck/models/jwt_response.rb +285 -0
- data/lib/pescheck/models/o_auth_application.rb +265 -0
- data/lib/pescheck/models/o_auth_application_response.rb +379 -0
- data/lib/pescheck/models/paginated_division_read_only_list.rb +216 -0
- data/lib/pescheck/models/paginated_v2_profile_list_item_list.rb +216 -0
- data/lib/pescheck/models/paginated_v2_screening_list_item_list.rb +216 -0
- data/lib/pescheck/models/patched_division_write.rb +360 -0
- data/lib/pescheck/models/patched_v2_profile_partial_update.rb +176 -0
- data/lib/pescheck/models/token_refresh.rb +173 -0
- data/lib/pescheck/models/v2_candidate.rb +390 -0
- data/lib/pescheck/models/v2_check_field.rb +246 -0
- data/lib/pescheck/models/v2_check_info.rb +438 -0
- data/lib/pescheck/models/v2_document.rb +308 -0
- data/lib/pescheck/models/v2_document_content.rb +175 -0
- data/lib/pescheck/models/v2_money.rb +210 -0
- data/lib/pescheck/models/v2_profile_check.rb +201 -0
- data/lib/pescheck/models/v2_profile_check_entry.rb +349 -0
- data/lib/pescheck/models/v2_profile_create.rb +212 -0
- data/lib/pescheck/models/v2_profile_detail.rb +401 -0
- data/lib/pescheck/models/v2_profile_list_item.rb +291 -0
- data/lib/pescheck/models/v2_profile_update.rb +213 -0
- data/lib/pescheck/models/v2_profile_update_check.rb +210 -0
- data/lib/pescheck/models/v2_screening_check.rb +221 -0
- data/lib/pescheck/models/v2_screening_check_entry.rb +376 -0
- data/lib/pescheck/models/v2_screening_check_list_item.rb +242 -0
- data/lib/pescheck/models/v2_screening_create.rb +201 -0
- data/lib/pescheck/models/v2_screening_detail.rb +348 -0
- data/lib/pescheck/models/v2_screening_detail_profile.rb +156 -0
- data/lib/pescheck/models/v2_screening_list_item.rb +330 -0
- data/lib/pescheck/models/verify_webhook.rb +166 -0
- data/lib/pescheck/models/webhook.rb +265 -0
- data/lib/pescheck/models/webhook_response.rb +353 -0
- data/lib/pescheck/version.rb +15 -0
- data/lib/pescheck.rb +83 -0
- data/pescheck.gemspec +41 -0
- data/spec/api/authentication_api_spec.rb +68 -0
- data/spec/api/checks_api_spec.rb +56 -0
- data/spec/api/divisions_api_spec.rb +94 -0
- data/spec/api/o_auth_api_spec.rb +67 -0
- data/spec/api/profiles_api_spec.rb +105 -0
- data/spec/api/screenings_api_spec.rb +81 -0
- data/spec/api/webhooks_api_spec.rb +81 -0
- data/spec/models/custom_token_obtain_pair_spec.rb +42 -0
- data/spec/models/division_read_only_spec.rb +120 -0
- data/spec/models/division_write_spec.rb +102 -0
- data/spec/models/jwt_generation_spec.rb +54 -0
- data/spec/models/jwt_response_spec.rb +66 -0
- data/spec/models/o_auth_application_response_spec.rb +86 -0
- data/spec/models/o_auth_application_spec.rb +68 -0
- data/spec/models/paginated_division_read_only_list_spec.rb +54 -0
- data/spec/models/paginated_v2_profile_list_item_list_spec.rb +54 -0
- data/spec/models/paginated_v2_screening_list_item_list_spec.rb +54 -0
- data/spec/models/patched_division_write_spec.rb +102 -0
- data/spec/models/patched_v2_profile_partial_update_spec.rb +42 -0
- data/spec/models/token_refresh_spec.rb +42 -0
- data/spec/models/v2_candidate_spec.rb +94 -0
- data/spec/models/v2_check_field_spec.rb +60 -0
- data/spec/models/v2_check_info_spec.rb +102 -0
- data/spec/models/v2_document_content_spec.rb +42 -0
- data/spec/models/v2_document_spec.rb +70 -0
- data/spec/models/v2_money_spec.rb +42 -0
- data/spec/models/v2_profile_check_entry_spec.rb +76 -0
- data/spec/models/v2_profile_check_spec.rb +46 -0
- data/spec/models/v2_profile_create_spec.rb +48 -0
- data/spec/models/v2_profile_detail_spec.rb +96 -0
- data/spec/models/v2_profile_list_item_spec.rb +72 -0
- data/spec/models/v2_profile_update_check_spec.rb +52 -0
- data/spec/models/v2_profile_update_spec.rb +48 -0
- data/spec/models/v2_screening_check_entry_spec.rb +88 -0
- data/spec/models/v2_screening_check_list_item_spec.rb +52 -0
- data/spec/models/v2_screening_check_spec.rb +58 -0
- data/spec/models/v2_screening_create_spec.rb +48 -0
- data/spec/models/v2_screening_detail_profile_spec.rb +42 -0
- data/spec/models/v2_screening_detail_spec.rb +84 -0
- data/spec/models/v2_screening_list_item_spec.rb +84 -0
- data/spec/models/verify_webhook_spec.rb +36 -0
- data/spec/models/webhook_response_spec.rb +90 -0
- data/spec/models/webhook_spec.rb +64 -0
- data/spec/spec_helper.rb +111 -0
- metadata +302 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Pescheck::V2ProfileUpdateCheck
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **check_type** | **String** | * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `focumcheck` - focumcheck * `id2check` - id2check * `idcheck` - idcheck * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `permissioncheck` - permissioncheck * `pescheckadversemediacheck` - pescheckadversemediacheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck | |
|
|
8
|
+
| **config** | **Hash<String, Object>** | | [optional] |
|
|
9
|
+
| **profile_check_id** | **String** | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'pescheck'
|
|
15
|
+
|
|
16
|
+
instance = Pescheck::V2ProfileUpdateCheck.new(
|
|
17
|
+
check_type: null,
|
|
18
|
+
config: null,
|
|
19
|
+
profile_check_id: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Pescheck::V2ScreeningCheck
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **check_type** | **String** | * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `id2check` - id2check * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck | |
|
|
8
|
+
| **config** | **Hash<String, Object>** | | [optional] |
|
|
9
|
+
| **profile_check_id** | **String** | Disambiguator. Use when the profile has multiple ProfileChecks of the same check_type. | [optional] |
|
|
10
|
+
| **input** | **Object** | | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'pescheck'
|
|
16
|
+
|
|
17
|
+
instance = Pescheck::V2ScreeningCheck.new(
|
|
18
|
+
check_type: null,
|
|
19
|
+
config: null,
|
|
20
|
+
profile_check_id: null,
|
|
21
|
+
input: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Pescheck::V2ScreeningCheckEntry
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | [readonly] |
|
|
8
|
+
| **profile_check_id** | **String** | | [readonly] |
|
|
9
|
+
| **check_type** | **String** | * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `focumcheck` - focumcheck * `id2check` - id2check * `idcheck` - idcheck * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `permissioncheck` - permissioncheck * `pescheckadversemediacheck` - pescheckadversemediacheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck | [readonly] |
|
|
10
|
+
| **display_name** | **String** | | [readonly] |
|
|
11
|
+
| **status** | **String** | | [readonly] |
|
|
12
|
+
| **config** | **Hash<String, Object>** | | [readonly] |
|
|
13
|
+
| **input** | **Hash<String, Object>** | | [readonly] |
|
|
14
|
+
| **output** | **Hash<String, Object>** | | [readonly] |
|
|
15
|
+
| **candidate_wizard_url** | **String** | Deep link to this check's candidate wizard step. Null when the check has no dedicated candidate step. | [readonly] |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'pescheck'
|
|
21
|
+
|
|
22
|
+
instance = Pescheck::V2ScreeningCheckEntry.new(
|
|
23
|
+
id: null,
|
|
24
|
+
profile_check_id: null,
|
|
25
|
+
check_type: null,
|
|
26
|
+
display_name: null,
|
|
27
|
+
status: null,
|
|
28
|
+
config: null,
|
|
29
|
+
input: null,
|
|
30
|
+
output: null,
|
|
31
|
+
candidate_wizard_url: null
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Pescheck::V2ScreeningCheckListItem
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | [readonly] |
|
|
8
|
+
| **check_type** | **String** | * `addresscheck` - addresscheck * `adversemediacheck` - adversemediacheck * `bigcheck` - bigcheck * `criminalrecordscheck` - criminalrecordscheck * `criminalrecordsuploadcheck` - criminalrecordsuploadcheck * `customintegritycheck` - customintegritycheck * `cvcheck` - cvcheck * `edrcheck` - edrcheck * `focumcheck` - focumcheck * `id2check` - id2check * `idcheck` - idcheck * `integritycheck` - integritycheck * `openhealthcarecheck` - openhealthcarecheck * `permissioncheck` - permissioncheck * `pescheckadversemediacheck` - pescheckadversemediacheck * `qualificationcheck` - qualificationcheck * `righttoworkcheck` - righttoworkcheck * `vogcheck` - vogcheck * `watchlist2check` - watchlist2check * `watchlistcheck` - watchlistcheck * `workreferencecheck` - workreferencecheck * `worldwidecreditcheck` - worldwidecreditcheck | [readonly] |
|
|
9
|
+
| **status** | **String** | | [readonly] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'pescheck'
|
|
15
|
+
|
|
16
|
+
instance = Pescheck::V2ScreeningCheckListItem.new(
|
|
17
|
+
id: null,
|
|
18
|
+
check_type: null,
|
|
19
|
+
status: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Pescheck::V2ScreeningCreate
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **profile_id** | **String** | | |
|
|
8
|
+
| **candidate** | [**V2Candidate**](V2Candidate.md) | | |
|
|
9
|
+
| **checks** | [**Array<V2ScreeningCheck>**](V2ScreeningCheck.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'pescheck'
|
|
15
|
+
|
|
16
|
+
instance = Pescheck::V2ScreeningCreate.new(
|
|
17
|
+
profile_id: null,
|
|
18
|
+
candidate: null,
|
|
19
|
+
checks: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Pescheck::V2ScreeningDetail
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | [readonly] |
|
|
8
|
+
| **status** | **String** | | [readonly] |
|
|
9
|
+
| **profile** | [**V2ScreeningDetailProfile**](V2ScreeningDetailProfile.md) | | |
|
|
10
|
+
| **candidate** | [**V2Candidate**](V2Candidate.md) | | [readonly] |
|
|
11
|
+
| **checks** | [**Array<V2ScreeningCheckEntry>**](V2ScreeningCheckEntry.md) | | [readonly] |
|
|
12
|
+
| **candidate_wizard_url** | **String** | Public wizard URL for the candidate. Null when no check needs candidate input. | [readonly] |
|
|
13
|
+
| **dashboard_url** | **String** | Dashboard URL for this screening. | [readonly] |
|
|
14
|
+
| **created_at** | **Time** | | [readonly] |
|
|
15
|
+
| **updated_at** | **Time** | | [readonly] |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'pescheck'
|
|
21
|
+
|
|
22
|
+
instance = Pescheck::V2ScreeningDetail.new(
|
|
23
|
+
id: null,
|
|
24
|
+
status: null,
|
|
25
|
+
profile: null,
|
|
26
|
+
candidate: null,
|
|
27
|
+
checks: null,
|
|
28
|
+
candidate_wizard_url: null,
|
|
29
|
+
dashboard_url: null,
|
|
30
|
+
created_at: null,
|
|
31
|
+
updated_at: null
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Pescheck::V2ScreeningDetailProfile
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | [optional] |
|
|
8
|
+
| **name** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'pescheck'
|
|
14
|
+
|
|
15
|
+
instance = Pescheck::V2ScreeningDetailProfile.new(
|
|
16
|
+
id: null,
|
|
17
|
+
name: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Pescheck::V2ScreeningListItem
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | [readonly] |
|
|
8
|
+
| **status** | **String** | | [optional] |
|
|
9
|
+
| **profile** | [**V2ScreeningDetailProfile**](V2ScreeningDetailProfile.md) | | |
|
|
10
|
+
| **candidate** | [**V2Candidate**](V2Candidate.md) | | [readonly] |
|
|
11
|
+
| **checks** | [**Array<V2ScreeningCheckListItem>**](V2ScreeningCheckListItem.md) | | [readonly] |
|
|
12
|
+
| **candidate_wizard_url** | **String** | | [readonly] |
|
|
13
|
+
| **dashboard_url** | **String** | | [readonly] |
|
|
14
|
+
| **created_at** | **Time** | | [readonly] |
|
|
15
|
+
| **updated_at** | **Time** | | [readonly] |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'pescheck'
|
|
21
|
+
|
|
22
|
+
instance = Pescheck::V2ScreeningListItem.new(
|
|
23
|
+
id: null,
|
|
24
|
+
status: null,
|
|
25
|
+
profile: null,
|
|
26
|
+
candidate: null,
|
|
27
|
+
checks: null,
|
|
28
|
+
candidate_wizard_url: null,
|
|
29
|
+
dashboard_url: null,
|
|
30
|
+
created_at: null,
|
|
31
|
+
updated_at: null
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Pescheck::VerifyWebhook
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **verification_code** | **String** | The verification code delivered to the webhook URL on creation. | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'pescheck'
|
|
13
|
+
|
|
14
|
+
instance = Pescheck::VerifyWebhook.new(
|
|
15
|
+
verification_code: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
data/docs/Webhook.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Pescheck::Webhook
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **name** | **String** | Descriptive name for this webhook | |
|
|
8
|
+
| **url** | **String** | HTTPS URL where webhook events will be sent | |
|
|
9
|
+
| **events** | **Array<String>** | List of events to subscribe to. Valid events: check.status_changed, screening.status_changed, screening.archived, package.created, package.updated, profile.created, profile.updated, division.created, division.updated | |
|
|
10
|
+
| **active** | **Boolean** | Whether the webhook is active | [optional][default to true] |
|
|
11
|
+
| **division_id** | **String** | Division ID to create webhook for (optional) | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'pescheck'
|
|
17
|
+
|
|
18
|
+
instance = Pescheck::Webhook.new(
|
|
19
|
+
name: null,
|
|
20
|
+
url: null,
|
|
21
|
+
events: null,
|
|
22
|
+
active: null,
|
|
23
|
+
division_id: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Pescheck::WebhookResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | [readonly] |
|
|
8
|
+
| **name** | **String** | | |
|
|
9
|
+
| **url** | **String** | | |
|
|
10
|
+
| **events** | **Object** | | [readonly] |
|
|
11
|
+
| **active** | **Boolean** | | [optional] |
|
|
12
|
+
| **verified** | **Boolean** | | [readonly] |
|
|
13
|
+
| **token** | **String** | | [optional][readonly] |
|
|
14
|
+
| **organisation_name** | **String** | | [optional][readonly] |
|
|
15
|
+
| **created_at** | **Time** | | [readonly] |
|
|
16
|
+
| **updated_at** | **Time** | | [readonly] |
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'pescheck'
|
|
22
|
+
|
|
23
|
+
instance = Pescheck::WebhookResponse.new(
|
|
24
|
+
id: null,
|
|
25
|
+
name: null,
|
|
26
|
+
url: null,
|
|
27
|
+
events: null,
|
|
28
|
+
active: null,
|
|
29
|
+
verified: null,
|
|
30
|
+
token: null,
|
|
31
|
+
organisation_name: null,
|
|
32
|
+
created_at: null,
|
|
33
|
+
updated_at: null
|
|
34
|
+
)
|
|
35
|
+
```
|
|
36
|
+
|
data/docs/WebhooksApi.md
ADDED
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
# Pescheck::WebhooksApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.pescheck.io*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**create_webhook2**](WebhooksApi.md#create_webhook2) | **POST** /api/v2/webhooks/ | |
|
|
8
|
+
| [**delete_webhook2**](WebhooksApi.md#delete_webhook2) | **DELETE** /api/v2/webhooks/{webhook_id}/ | |
|
|
9
|
+
| [**list_webhooks2**](WebhooksApi.md#list_webhooks2) | **GET** /api/v2/webhooks/list/ | |
|
|
10
|
+
| [**verify_webhook2**](WebhooksApi.md#verify_webhook2) | **POST** /api/v2/webhooks/{webhook_id}/verify/ | |
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## create_webhook2
|
|
14
|
+
|
|
15
|
+
> <WebhookResponse> create_webhook2(webhook, opts)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
### Examples
|
|
22
|
+
|
|
23
|
+
```ruby
|
|
24
|
+
require 'time'
|
|
25
|
+
require 'pescheck'
|
|
26
|
+
# setup authorization
|
|
27
|
+
Pescheck.configure do |config|
|
|
28
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
29
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
api_instance = Pescheck::WebhooksApi.new
|
|
33
|
+
webhook = Pescheck::Webhook.new({name: 'name_example', url: 'url_example', events: ['check.status_changed']}) # Webhook |
|
|
34
|
+
opts = {
|
|
35
|
+
x_organization_id: 'x_organization_id_example', # String | Organization ID (for JWT/Session auth only)
|
|
36
|
+
organization_id: 'organization_id_example' # String | Organization ID (for JWT/Session auth only)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
begin
|
|
40
|
+
|
|
41
|
+
result = api_instance.create_webhook2(webhook, opts)
|
|
42
|
+
p result
|
|
43
|
+
rescue Pescheck::ApiError => e
|
|
44
|
+
puts "Error when calling WebhooksApi->create_webhook2: #{e}"
|
|
45
|
+
end
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
#### Using the create_webhook2_with_http_info variant
|
|
49
|
+
|
|
50
|
+
This returns an Array which contains the response data, status code and headers.
|
|
51
|
+
|
|
52
|
+
> <Array(<WebhookResponse>, Integer, Hash)> create_webhook2_with_http_info(webhook, opts)
|
|
53
|
+
|
|
54
|
+
```ruby
|
|
55
|
+
begin
|
|
56
|
+
|
|
57
|
+
data, status_code, headers = api_instance.create_webhook2_with_http_info(webhook, opts)
|
|
58
|
+
p status_code # => 2xx
|
|
59
|
+
p headers # => { ... }
|
|
60
|
+
p data # => <WebhookResponse>
|
|
61
|
+
rescue Pescheck::ApiError => e
|
|
62
|
+
puts "Error when calling WebhooksApi->create_webhook2_with_http_info: #{e}"
|
|
63
|
+
end
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Parameters
|
|
67
|
+
|
|
68
|
+
| Name | Type | Description | Notes |
|
|
69
|
+
| ---- | ---- | ----------- | ----- |
|
|
70
|
+
| **webhook** | [**Webhook**](Webhook.md) | | |
|
|
71
|
+
| **x_organization_id** | **String** | Organization ID (for JWT/Session auth only) | [optional] |
|
|
72
|
+
| **organization_id** | **String** | Organization ID (for JWT/Session auth only) | [optional] |
|
|
73
|
+
|
|
74
|
+
### Return type
|
|
75
|
+
|
|
76
|
+
[**WebhookResponse**](WebhookResponse.md)
|
|
77
|
+
|
|
78
|
+
### Authorization
|
|
79
|
+
|
|
80
|
+
[oauth2](../README.md#oauth2)
|
|
81
|
+
|
|
82
|
+
### HTTP request headers
|
|
83
|
+
|
|
84
|
+
- **Content-Type**: application/json, multipart/form-data
|
|
85
|
+
- **Accept**: application/json
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## delete_webhook2
|
|
89
|
+
|
|
90
|
+
> delete_webhook2(webhook_id)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
Delete a webhook
|
|
95
|
+
|
|
96
|
+
### Examples
|
|
97
|
+
|
|
98
|
+
```ruby
|
|
99
|
+
require 'time'
|
|
100
|
+
require 'pescheck'
|
|
101
|
+
# setup authorization
|
|
102
|
+
Pescheck.configure do |config|
|
|
103
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
104
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
api_instance = Pescheck::WebhooksApi.new
|
|
108
|
+
webhook_id = 'webhook_id_example' # String | Webhook ID to delete
|
|
109
|
+
|
|
110
|
+
begin
|
|
111
|
+
|
|
112
|
+
api_instance.delete_webhook2(webhook_id)
|
|
113
|
+
rescue Pescheck::ApiError => e
|
|
114
|
+
puts "Error when calling WebhooksApi->delete_webhook2: #{e}"
|
|
115
|
+
end
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
#### Using the delete_webhook2_with_http_info variant
|
|
119
|
+
|
|
120
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
121
|
+
|
|
122
|
+
> <Array(nil, Integer, Hash)> delete_webhook2_with_http_info(webhook_id)
|
|
123
|
+
|
|
124
|
+
```ruby
|
|
125
|
+
begin
|
|
126
|
+
|
|
127
|
+
data, status_code, headers = api_instance.delete_webhook2_with_http_info(webhook_id)
|
|
128
|
+
p status_code # => 2xx
|
|
129
|
+
p headers # => { ... }
|
|
130
|
+
p data # => nil
|
|
131
|
+
rescue Pescheck::ApiError => e
|
|
132
|
+
puts "Error when calling WebhooksApi->delete_webhook2_with_http_info: #{e}"
|
|
133
|
+
end
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Parameters
|
|
137
|
+
|
|
138
|
+
| Name | Type | Description | Notes |
|
|
139
|
+
| ---- | ---- | ----------- | ----- |
|
|
140
|
+
| **webhook_id** | **String** | Webhook ID to delete | |
|
|
141
|
+
|
|
142
|
+
### Return type
|
|
143
|
+
|
|
144
|
+
nil (empty response body)
|
|
145
|
+
|
|
146
|
+
### Authorization
|
|
147
|
+
|
|
148
|
+
[oauth2](../README.md#oauth2)
|
|
149
|
+
|
|
150
|
+
### HTTP request headers
|
|
151
|
+
|
|
152
|
+
- **Content-Type**: Not defined
|
|
153
|
+
- **Accept**: Not defined
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
## list_webhooks2
|
|
157
|
+
|
|
158
|
+
> <Array<WebhookResponse>> list_webhooks2
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
List webhooks for the organization
|
|
163
|
+
|
|
164
|
+
### Examples
|
|
165
|
+
|
|
166
|
+
```ruby
|
|
167
|
+
require 'time'
|
|
168
|
+
require 'pescheck'
|
|
169
|
+
# setup authorization
|
|
170
|
+
Pescheck.configure do |config|
|
|
171
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
172
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
api_instance = Pescheck::WebhooksApi.new
|
|
176
|
+
|
|
177
|
+
begin
|
|
178
|
+
|
|
179
|
+
result = api_instance.list_webhooks2
|
|
180
|
+
p result
|
|
181
|
+
rescue Pescheck::ApiError => e
|
|
182
|
+
puts "Error when calling WebhooksApi->list_webhooks2: #{e}"
|
|
183
|
+
end
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
#### Using the list_webhooks2_with_http_info variant
|
|
187
|
+
|
|
188
|
+
This returns an Array which contains the response data, status code and headers.
|
|
189
|
+
|
|
190
|
+
> <Array(<Array<WebhookResponse>>, Integer, Hash)> list_webhooks2_with_http_info
|
|
191
|
+
|
|
192
|
+
```ruby
|
|
193
|
+
begin
|
|
194
|
+
|
|
195
|
+
data, status_code, headers = api_instance.list_webhooks2_with_http_info
|
|
196
|
+
p status_code # => 2xx
|
|
197
|
+
p headers # => { ... }
|
|
198
|
+
p data # => <Array<WebhookResponse>>
|
|
199
|
+
rescue Pescheck::ApiError => e
|
|
200
|
+
puts "Error when calling WebhooksApi->list_webhooks2_with_http_info: #{e}"
|
|
201
|
+
end
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Parameters
|
|
205
|
+
|
|
206
|
+
This endpoint does not need any parameter.
|
|
207
|
+
|
|
208
|
+
### Return type
|
|
209
|
+
|
|
210
|
+
[**Array<WebhookResponse>**](WebhookResponse.md)
|
|
211
|
+
|
|
212
|
+
### Authorization
|
|
213
|
+
|
|
214
|
+
[oauth2](../README.md#oauth2)
|
|
215
|
+
|
|
216
|
+
### HTTP request headers
|
|
217
|
+
|
|
218
|
+
- **Content-Type**: Not defined
|
|
219
|
+
- **Accept**: application/json
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
## verify_webhook2
|
|
223
|
+
|
|
224
|
+
> verify_webhook2(webhook_id, verify_webhook)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
Verify webhook ownership
|
|
229
|
+
|
|
230
|
+
### Examples
|
|
231
|
+
|
|
232
|
+
```ruby
|
|
233
|
+
require 'time'
|
|
234
|
+
require 'pescheck'
|
|
235
|
+
# setup authorization
|
|
236
|
+
Pescheck.configure do |config|
|
|
237
|
+
# Configure OAuth2 access token for authorization: oauth2
|
|
238
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
api_instance = Pescheck::WebhooksApi.new
|
|
242
|
+
webhook_id = 'webhook_id_example' # String | Webhook ID
|
|
243
|
+
verify_webhook = Pescheck::VerifyWebhook.new({verification_code: 'verification_code_example'}) # VerifyWebhook |
|
|
244
|
+
|
|
245
|
+
begin
|
|
246
|
+
|
|
247
|
+
api_instance.verify_webhook2(webhook_id, verify_webhook)
|
|
248
|
+
rescue Pescheck::ApiError => e
|
|
249
|
+
puts "Error when calling WebhooksApi->verify_webhook2: #{e}"
|
|
250
|
+
end
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
#### Using the verify_webhook2_with_http_info variant
|
|
254
|
+
|
|
255
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
256
|
+
|
|
257
|
+
> <Array(nil, Integer, Hash)> verify_webhook2_with_http_info(webhook_id, verify_webhook)
|
|
258
|
+
|
|
259
|
+
```ruby
|
|
260
|
+
begin
|
|
261
|
+
|
|
262
|
+
data, status_code, headers = api_instance.verify_webhook2_with_http_info(webhook_id, verify_webhook)
|
|
263
|
+
p status_code # => 2xx
|
|
264
|
+
p headers # => { ... }
|
|
265
|
+
p data # => nil
|
|
266
|
+
rescue Pescheck::ApiError => e
|
|
267
|
+
puts "Error when calling WebhooksApi->verify_webhook2_with_http_info: #{e}"
|
|
268
|
+
end
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Parameters
|
|
272
|
+
|
|
273
|
+
| Name | Type | Description | Notes |
|
|
274
|
+
| ---- | ---- | ----------- | ----- |
|
|
275
|
+
| **webhook_id** | **String** | Webhook ID | |
|
|
276
|
+
| **verify_webhook** | [**VerifyWebhook**](VerifyWebhook.md) | | |
|
|
277
|
+
|
|
278
|
+
### Return type
|
|
279
|
+
|
|
280
|
+
nil (empty response body)
|
|
281
|
+
|
|
282
|
+
### Authorization
|
|
283
|
+
|
|
284
|
+
[oauth2](../README.md#oauth2)
|
|
285
|
+
|
|
286
|
+
### HTTP request headers
|
|
287
|
+
|
|
288
|
+
- **Content-Type**: application/json, multipart/form-data
|
|
289
|
+
- **Accept**: Not defined
|
|
290
|
+
|
data/git_push.sh
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
|
3
|
+
#
|
|
4
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
|
5
|
+
|
|
6
|
+
git_user_id=$1
|
|
7
|
+
git_repo_id=$2
|
|
8
|
+
release_note=$3
|
|
9
|
+
git_host=$4
|
|
10
|
+
|
|
11
|
+
if [ "$git_host" = "" ]; then
|
|
12
|
+
git_host="github.com"
|
|
13
|
+
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
if [ "$git_user_id" = "" ]; then
|
|
17
|
+
git_user_id="pescheckit"
|
|
18
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
if [ "$git_repo_id" = "" ]; then
|
|
22
|
+
git_repo_id="pescheck-clients"
|
|
23
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
if [ "$release_note" = "" ]; then
|
|
27
|
+
release_note="Minor update"
|
|
28
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# Initialize the local directory as a Git repository
|
|
32
|
+
git init
|
|
33
|
+
|
|
34
|
+
# Adds the files in the local repository and stages them for commit.
|
|
35
|
+
git add .
|
|
36
|
+
|
|
37
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
|
38
|
+
git commit -m "$release_note"
|
|
39
|
+
|
|
40
|
+
# Sets the new remote
|
|
41
|
+
git_remote=$(git remote)
|
|
42
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
|
43
|
+
|
|
44
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
|
45
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
|
46
|
+
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
|
47
|
+
else
|
|
48
|
+
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
git pull origin master
|
|
54
|
+
|
|
55
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
|
56
|
+
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
|
57
|
+
git push origin master 2>&1 | grep -v 'To https'
|