@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,150 @@
|
|
|
1
|
+
# ChecksApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.pescheck.io*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**v2ChecksList**](ChecksApi.md#v2checkslist) | **GET** /api/v2/checks/ | |
|
|
8
|
+
| [**v2ChecksRetrieve**](ChecksApi.md#v2checksretrieve) | **GET** /api/v2/checks/{check_type}/ | |
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## v2ChecksList
|
|
13
|
+
|
|
14
|
+
> Array<V2CheckInfo> v2ChecksList(checkType)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
List the check types this API supports. The list is bounded metadata about the available check types (not a paginated collection), so the response is a flat array.
|
|
19
|
+
|
|
20
|
+
### Example
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import {
|
|
24
|
+
Configuration,
|
|
25
|
+
ChecksApi,
|
|
26
|
+
} from '@pescheckit/pescheck-client';
|
|
27
|
+
import type { V2ChecksListRequest } from '@pescheckit/pescheck-client';
|
|
28
|
+
|
|
29
|
+
async function example() {
|
|
30
|
+
console.log("🚀 Testing @pescheckit/pescheck-client SDK...");
|
|
31
|
+
const config = new Configuration({
|
|
32
|
+
// To configure OAuth2 access token for authorization: oauth2 application
|
|
33
|
+
accessToken: "YOUR ACCESS TOKEN",
|
|
34
|
+
});
|
|
35
|
+
const api = new ChecksApi(config);
|
|
36
|
+
|
|
37
|
+
const body = {
|
|
38
|
+
// string | Restrict the list to a single check type. (optional)
|
|
39
|
+
checkType: checkType_example,
|
|
40
|
+
} satisfies V2ChecksListRequest;
|
|
41
|
+
|
|
42
|
+
try {
|
|
43
|
+
const data = await api.v2ChecksList(body);
|
|
44
|
+
console.log(data);
|
|
45
|
+
} catch (error) {
|
|
46
|
+
console.error(error);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Run the test
|
|
51
|
+
example().catch(console.error);
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Parameters
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
| Name | Type | Description | Notes |
|
|
58
|
+
|------------- | ------------- | ------------- | -------------|
|
|
59
|
+
| **checkType** | `string` | Restrict the list to a single check type. | [Optional] [Defaults to `undefined`] |
|
|
60
|
+
|
|
61
|
+
### Return type
|
|
62
|
+
|
|
63
|
+
[**Array<V2CheckInfo>**](V2CheckInfo.md)
|
|
64
|
+
|
|
65
|
+
### Authorization
|
|
66
|
+
|
|
67
|
+
[oauth2 application](../README.md#oauth2-application)
|
|
68
|
+
|
|
69
|
+
### HTTP request headers
|
|
70
|
+
|
|
71
|
+
- **Content-Type**: Not defined
|
|
72
|
+
- **Accept**: `application/json`
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### HTTP response details
|
|
76
|
+
| Status code | Description | Response headers |
|
|
77
|
+
|-------------|-------------|------------------|
|
|
78
|
+
| **200** | | - |
|
|
79
|
+
|
|
80
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## v2ChecksRetrieve
|
|
84
|
+
|
|
85
|
+
> V2CheckInfo v2ChecksRetrieve(checkType)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
### Example
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
import {
|
|
93
|
+
Configuration,
|
|
94
|
+
ChecksApi,
|
|
95
|
+
} from '@pescheckit/pescheck-client';
|
|
96
|
+
import type { V2ChecksRetrieveRequest } from '@pescheckit/pescheck-client';
|
|
97
|
+
|
|
98
|
+
async function example() {
|
|
99
|
+
console.log("🚀 Testing @pescheckit/pescheck-client SDK...");
|
|
100
|
+
const config = new Configuration({
|
|
101
|
+
// To configure OAuth2 access token for authorization: oauth2 application
|
|
102
|
+
accessToken: "YOUR ACCESS TOKEN",
|
|
103
|
+
});
|
|
104
|
+
const api = new ChecksApi(config);
|
|
105
|
+
|
|
106
|
+
const body = {
|
|
107
|
+
// string
|
|
108
|
+
checkType: checkType_example,
|
|
109
|
+
} satisfies V2ChecksRetrieveRequest;
|
|
110
|
+
|
|
111
|
+
try {
|
|
112
|
+
const data = await api.v2ChecksRetrieve(body);
|
|
113
|
+
console.log(data);
|
|
114
|
+
} catch (error) {
|
|
115
|
+
console.error(error);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Run the test
|
|
120
|
+
example().catch(console.error);
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Parameters
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
| Name | Type | Description | Notes |
|
|
127
|
+
|------------- | ------------- | ------------- | -------------|
|
|
128
|
+
| **checkType** | `string` | | [Defaults to `undefined`] |
|
|
129
|
+
|
|
130
|
+
### Return type
|
|
131
|
+
|
|
132
|
+
[**V2CheckInfo**](V2CheckInfo.md)
|
|
133
|
+
|
|
134
|
+
### Authorization
|
|
135
|
+
|
|
136
|
+
[oauth2 application](../README.md#oauth2-application)
|
|
137
|
+
|
|
138
|
+
### HTTP request headers
|
|
139
|
+
|
|
140
|
+
- **Content-Type**: Not defined
|
|
141
|
+
- **Accept**: `application/json`
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
### HTTP response details
|
|
145
|
+
| Status code | Description | Response headers |
|
|
146
|
+
|-------------|-------------|------------------|
|
|
147
|
+
| **200** | | - |
|
|
148
|
+
|
|
149
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
150
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# CustomTokenObtainPair
|
|
3
|
+
|
|
4
|
+
Custom JWT serializer that includes organization information in the token.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`email` | string
|
|
11
|
+
`password` | string
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { CustomTokenObtainPair } from '@pescheckit/pescheck-client'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"email": null,
|
|
21
|
+
"password": null,
|
|
22
|
+
} satisfies CustomTokenObtainPair
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as CustomTokenObtainPair
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
|
|
2
|
+
# DivisionReadOnly
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | string
|
|
10
|
+
`name` | string
|
|
11
|
+
`parent` | string
|
|
12
|
+
`createdAt` | Date
|
|
13
|
+
`updatedAt` | Date
|
|
14
|
+
`city` | string
|
|
15
|
+
`address` | string
|
|
16
|
+
`postal` | string
|
|
17
|
+
`phone` | string
|
|
18
|
+
`contactName` | string
|
|
19
|
+
`contactEmail` | string
|
|
20
|
+
`invoiceEmail` | string
|
|
21
|
+
`useParentOnEmail` | boolean
|
|
22
|
+
`useParentOnBilling` | boolean
|
|
23
|
+
`useParentOnReport` | boolean
|
|
24
|
+
|
|
25
|
+
## Example
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
import type { DivisionReadOnly } from '@pescheckit/pescheck-client'
|
|
29
|
+
|
|
30
|
+
// TODO: Update the object below with actual values
|
|
31
|
+
const example = {
|
|
32
|
+
"id": null,
|
|
33
|
+
"name": null,
|
|
34
|
+
"parent": null,
|
|
35
|
+
"createdAt": null,
|
|
36
|
+
"updatedAt": null,
|
|
37
|
+
"city": null,
|
|
38
|
+
"address": null,
|
|
39
|
+
"postal": null,
|
|
40
|
+
"phone": null,
|
|
41
|
+
"contactName": null,
|
|
42
|
+
"contactEmail": null,
|
|
43
|
+
"invoiceEmail": null,
|
|
44
|
+
"useParentOnEmail": null,
|
|
45
|
+
"useParentOnBilling": null,
|
|
46
|
+
"useParentOnReport": null,
|
|
47
|
+
} satisfies DivisionReadOnly
|
|
48
|
+
|
|
49
|
+
console.log(example)
|
|
50
|
+
|
|
51
|
+
// Convert the instance to a JSON string
|
|
52
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
53
|
+
console.log(exampleJSON)
|
|
54
|
+
|
|
55
|
+
// Parse the JSON string back to an object
|
|
56
|
+
const exampleParsed = JSON.parse(exampleJSON) as DivisionReadOnly
|
|
57
|
+
console.log(exampleParsed)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
61
|
+
|
|
62
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
|
|
2
|
+
# DivisionWrite
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | string
|
|
10
|
+
`name` | string
|
|
11
|
+
`city` | string
|
|
12
|
+
`address` | string
|
|
13
|
+
`postal` | string
|
|
14
|
+
`phone` | string
|
|
15
|
+
`contactName` | string
|
|
16
|
+
`contactEmail` | string
|
|
17
|
+
`invoiceEmail` | string
|
|
18
|
+
`useParentOnEmail` | boolean
|
|
19
|
+
`useParentOnBilling` | boolean
|
|
20
|
+
`useParentOnReport` | boolean
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import type { DivisionWrite } from '@pescheckit/pescheck-client'
|
|
26
|
+
|
|
27
|
+
// TODO: Update the object below with actual values
|
|
28
|
+
const example = {
|
|
29
|
+
"id": null,
|
|
30
|
+
"name": null,
|
|
31
|
+
"city": null,
|
|
32
|
+
"address": null,
|
|
33
|
+
"postal": null,
|
|
34
|
+
"phone": null,
|
|
35
|
+
"contactName": null,
|
|
36
|
+
"contactEmail": null,
|
|
37
|
+
"invoiceEmail": null,
|
|
38
|
+
"useParentOnEmail": null,
|
|
39
|
+
"useParentOnBilling": null,
|
|
40
|
+
"useParentOnReport": null,
|
|
41
|
+
} satisfies DivisionWrite
|
|
42
|
+
|
|
43
|
+
console.log(example)
|
|
44
|
+
|
|
45
|
+
// Convert the instance to a JSON string
|
|
46
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
47
|
+
console.log(exampleJSON)
|
|
48
|
+
|
|
49
|
+
// Parse the JSON string back to an object
|
|
50
|
+
const exampleParsed = JSON.parse(exampleJSON) as DivisionWrite
|
|
51
|
+
console.log(exampleParsed)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
55
|
+
|
|
56
|
+
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
# DivisionsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.pescheck.io*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**v2OrganisationsDivisionsCreate**](DivisionsApi.md#v2organisationsdivisionscreate) | **POST** /api/v2/organisations/divisions/ | |
|
|
8
|
+
| [**v2OrganisationsDivisionsList**](DivisionsApi.md#v2organisationsdivisionslist) | **GET** /api/v2/organisations/divisions/ | |
|
|
9
|
+
| [**v2OrganisationsDivisionsPartialUpdate**](DivisionsApi.md#v2organisationsdivisionspartialupdate) | **PATCH** /api/v2/organisations/divisions/{id}/ | |
|
|
10
|
+
| [**v2OrganisationsDivisionsRetrieve**](DivisionsApi.md#v2organisationsdivisionsretrieve) | **GET** /api/v2/organisations/divisions/{id}/ | |
|
|
11
|
+
| [**v2OrganisationsDivisionsUpdate**](DivisionsApi.md#v2organisationsdivisionsupdate) | **PUT** /api/v2/organisations/divisions/{id}/ | |
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## v2OrganisationsDivisionsCreate
|
|
16
|
+
|
|
17
|
+
> DivisionWrite v2OrganisationsDivisionsCreate(divisionWrite)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
Create a division (a child organisation under the current parent org). Divisions are an advanced, rarely-needed feature: create one ONLY when the user has clearly stated they want to manage a separate business unit, location, or legal entity under their account. Do NOT create a division just to organise screenings, for a single-person or single-member organisation, or without an explicit request to do so. When in doubt, ask the user to confirm before calling this tool.
|
|
22
|
+
|
|
23
|
+
### Example
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import {
|
|
27
|
+
Configuration,
|
|
28
|
+
DivisionsApi,
|
|
29
|
+
} from '@pescheckit/pescheck-client';
|
|
30
|
+
import type { V2OrganisationsDivisionsCreateRequest } from '@pescheckit/pescheck-client';
|
|
31
|
+
|
|
32
|
+
async function example() {
|
|
33
|
+
console.log("🚀 Testing @pescheckit/pescheck-client SDK...");
|
|
34
|
+
const config = new Configuration({
|
|
35
|
+
// To configure OAuth2 access token for authorization: oauth2 application
|
|
36
|
+
accessToken: "YOUR ACCESS TOKEN",
|
|
37
|
+
});
|
|
38
|
+
const api = new DivisionsApi(config);
|
|
39
|
+
|
|
40
|
+
const body = {
|
|
41
|
+
// DivisionWrite
|
|
42
|
+
divisionWrite: ...,
|
|
43
|
+
} satisfies V2OrganisationsDivisionsCreateRequest;
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
const data = await api.v2OrganisationsDivisionsCreate(body);
|
|
47
|
+
console.log(data);
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.error(error);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Run the test
|
|
54
|
+
example().catch(console.error);
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Parameters
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
| Name | Type | Description | Notes |
|
|
61
|
+
|------------- | ------------- | ------------- | -------------|
|
|
62
|
+
| **divisionWrite** | [DivisionWrite](DivisionWrite.md) | | |
|
|
63
|
+
|
|
64
|
+
### Return type
|
|
65
|
+
|
|
66
|
+
[**DivisionWrite**](DivisionWrite.md)
|
|
67
|
+
|
|
68
|
+
### Authorization
|
|
69
|
+
|
|
70
|
+
[oauth2 application](../README.md#oauth2-application)
|
|
71
|
+
|
|
72
|
+
### HTTP request headers
|
|
73
|
+
|
|
74
|
+
- **Content-Type**: `application/json`, `multipart/form-data`
|
|
75
|
+
- **Accept**: `application/json`
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### HTTP response details
|
|
79
|
+
| Status code | Description | Response headers |
|
|
80
|
+
|-------------|-------------|------------------|
|
|
81
|
+
| **201** | | - |
|
|
82
|
+
|
|
83
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## v2OrganisationsDivisionsList
|
|
87
|
+
|
|
88
|
+
> PaginatedDivisionReadOnlyList v2OrganisationsDivisionsList(page, pageSize, paginate)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
List method that handles both paginated and unpaginated responses and enforces the max_total_records limit (500).
|
|
93
|
+
|
|
94
|
+
### Example
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
import {
|
|
98
|
+
Configuration,
|
|
99
|
+
DivisionsApi,
|
|
100
|
+
} from '@pescheckit/pescheck-client';
|
|
101
|
+
import type { V2OrganisationsDivisionsListRequest } from '@pescheckit/pescheck-client';
|
|
102
|
+
|
|
103
|
+
async function example() {
|
|
104
|
+
console.log("🚀 Testing @pescheckit/pescheck-client SDK...");
|
|
105
|
+
const config = new Configuration({
|
|
106
|
+
// To configure OAuth2 access token for authorization: oauth2 application
|
|
107
|
+
accessToken: "YOUR ACCESS TOKEN",
|
|
108
|
+
});
|
|
109
|
+
const api = new DivisionsApi(config);
|
|
110
|
+
|
|
111
|
+
const body = {
|
|
112
|
+
// number | A page number within the paginated result set. (optional)
|
|
113
|
+
page: 1,
|
|
114
|
+
// number | Number of results to return per page. (optional)
|
|
115
|
+
pageSize: 50,
|
|
116
|
+
// boolean | Enable/disable pagination. When false, max 500 records returned. (optional)
|
|
117
|
+
paginate: true,
|
|
118
|
+
} satisfies V2OrganisationsDivisionsListRequest;
|
|
119
|
+
|
|
120
|
+
try {
|
|
121
|
+
const data = await api.v2OrganisationsDivisionsList(body);
|
|
122
|
+
console.log(data);
|
|
123
|
+
} catch (error) {
|
|
124
|
+
console.error(error);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Run the test
|
|
129
|
+
example().catch(console.error);
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Parameters
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
| Name | Type | Description | Notes |
|
|
136
|
+
|------------- | ------------- | ------------- | -------------|
|
|
137
|
+
| **page** | `number` | A page number within the paginated result set. | [Optional] [Defaults to `1`] |
|
|
138
|
+
| **pageSize** | `number` | Number of results to return per page. | [Optional] [Defaults to `50`] |
|
|
139
|
+
| **paginate** | `boolean` | Enable/disable pagination. When false, max 500 records returned. | [Optional] [Defaults to `true`] |
|
|
140
|
+
|
|
141
|
+
### Return type
|
|
142
|
+
|
|
143
|
+
[**PaginatedDivisionReadOnlyList**](PaginatedDivisionReadOnlyList.md)
|
|
144
|
+
|
|
145
|
+
### Authorization
|
|
146
|
+
|
|
147
|
+
[oauth2 application](../README.md#oauth2-application)
|
|
148
|
+
|
|
149
|
+
### HTTP request headers
|
|
150
|
+
|
|
151
|
+
- **Content-Type**: Not defined
|
|
152
|
+
- **Accept**: `application/json`
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
### HTTP response details
|
|
156
|
+
| Status code | Description | Response headers |
|
|
157
|
+
|-------------|-------------|------------------|
|
|
158
|
+
| **200** | | - |
|
|
159
|
+
|
|
160
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
## v2OrganisationsDivisionsPartialUpdate
|
|
164
|
+
|
|
165
|
+
> DivisionWrite v2OrganisationsDivisionsPartialUpdate(id, patchedDivisionWrite)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
A division is a child organisation under a parent org, used only when a customer needs to manage genuinely separate business units, locations, or legal entities under one account. The vast majority of organisations operate as a single entity and need no divisions. Only top-level (parent) organisations can have divisions.
|
|
170
|
+
|
|
171
|
+
### Example
|
|
172
|
+
|
|
173
|
+
```ts
|
|
174
|
+
import {
|
|
175
|
+
Configuration,
|
|
176
|
+
DivisionsApi,
|
|
177
|
+
} from '@pescheckit/pescheck-client';
|
|
178
|
+
import type { V2OrganisationsDivisionsPartialUpdateRequest } from '@pescheckit/pescheck-client';
|
|
179
|
+
|
|
180
|
+
async function example() {
|
|
181
|
+
console.log("🚀 Testing @pescheckit/pescheck-client SDK...");
|
|
182
|
+
const config = new Configuration({
|
|
183
|
+
// To configure OAuth2 access token for authorization: oauth2 application
|
|
184
|
+
accessToken: "YOUR ACCESS TOKEN",
|
|
185
|
+
});
|
|
186
|
+
const api = new DivisionsApi(config);
|
|
187
|
+
|
|
188
|
+
const body = {
|
|
189
|
+
// string | A UUID string identifying this organisation.
|
|
190
|
+
id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
191
|
+
// PatchedDivisionWrite (optional)
|
|
192
|
+
patchedDivisionWrite: ...,
|
|
193
|
+
} satisfies V2OrganisationsDivisionsPartialUpdateRequest;
|
|
194
|
+
|
|
195
|
+
try {
|
|
196
|
+
const data = await api.v2OrganisationsDivisionsPartialUpdate(body);
|
|
197
|
+
console.log(data);
|
|
198
|
+
} catch (error) {
|
|
199
|
+
console.error(error);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Run the test
|
|
204
|
+
example().catch(console.error);
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Parameters
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
| Name | Type | Description | Notes |
|
|
211
|
+
|------------- | ------------- | ------------- | -------------|
|
|
212
|
+
| **id** | `string` | A UUID string identifying this organisation. | [Defaults to `undefined`] |
|
|
213
|
+
| **patchedDivisionWrite** | [PatchedDivisionWrite](PatchedDivisionWrite.md) | | [Optional] |
|
|
214
|
+
|
|
215
|
+
### Return type
|
|
216
|
+
|
|
217
|
+
[**DivisionWrite**](DivisionWrite.md)
|
|
218
|
+
|
|
219
|
+
### Authorization
|
|
220
|
+
|
|
221
|
+
[oauth2 application](../README.md#oauth2-application)
|
|
222
|
+
|
|
223
|
+
### HTTP request headers
|
|
224
|
+
|
|
225
|
+
- **Content-Type**: `application/json`, `multipart/form-data`
|
|
226
|
+
- **Accept**: `application/json`
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
### HTTP response details
|
|
230
|
+
| Status code | Description | Response headers |
|
|
231
|
+
|-------------|-------------|------------------|
|
|
232
|
+
| **200** | | - |
|
|
233
|
+
|
|
234
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
## v2OrganisationsDivisionsRetrieve
|
|
238
|
+
|
|
239
|
+
> DivisionReadOnly v2OrganisationsDivisionsRetrieve(id)
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
A division is a child organisation under a parent org, used only when a customer needs to manage genuinely separate business units, locations, or legal entities under one account. The vast majority of organisations operate as a single entity and need no divisions. Only top-level (parent) organisations can have divisions.
|
|
244
|
+
|
|
245
|
+
### Example
|
|
246
|
+
|
|
247
|
+
```ts
|
|
248
|
+
import {
|
|
249
|
+
Configuration,
|
|
250
|
+
DivisionsApi,
|
|
251
|
+
} from '@pescheckit/pescheck-client';
|
|
252
|
+
import type { V2OrganisationsDivisionsRetrieveRequest } from '@pescheckit/pescheck-client';
|
|
253
|
+
|
|
254
|
+
async function example() {
|
|
255
|
+
console.log("🚀 Testing @pescheckit/pescheck-client SDK...");
|
|
256
|
+
const config = new Configuration({
|
|
257
|
+
// To configure OAuth2 access token for authorization: oauth2 application
|
|
258
|
+
accessToken: "YOUR ACCESS TOKEN",
|
|
259
|
+
});
|
|
260
|
+
const api = new DivisionsApi(config);
|
|
261
|
+
|
|
262
|
+
const body = {
|
|
263
|
+
// string | A UUID string identifying this organisation.
|
|
264
|
+
id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
265
|
+
} satisfies V2OrganisationsDivisionsRetrieveRequest;
|
|
266
|
+
|
|
267
|
+
try {
|
|
268
|
+
const data = await api.v2OrganisationsDivisionsRetrieve(body);
|
|
269
|
+
console.log(data);
|
|
270
|
+
} catch (error) {
|
|
271
|
+
console.error(error);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// Run the test
|
|
276
|
+
example().catch(console.error);
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Parameters
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
| Name | Type | Description | Notes |
|
|
283
|
+
|------------- | ------------- | ------------- | -------------|
|
|
284
|
+
| **id** | `string` | A UUID string identifying this organisation. | [Defaults to `undefined`] |
|
|
285
|
+
|
|
286
|
+
### Return type
|
|
287
|
+
|
|
288
|
+
[**DivisionReadOnly**](DivisionReadOnly.md)
|
|
289
|
+
|
|
290
|
+
### Authorization
|
|
291
|
+
|
|
292
|
+
[oauth2 application](../README.md#oauth2-application)
|
|
293
|
+
|
|
294
|
+
### HTTP request headers
|
|
295
|
+
|
|
296
|
+
- **Content-Type**: Not defined
|
|
297
|
+
- **Accept**: `application/json`
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
### HTTP response details
|
|
301
|
+
| Status code | Description | Response headers |
|
|
302
|
+
|-------------|-------------|------------------|
|
|
303
|
+
| **200** | | - |
|
|
304
|
+
|
|
305
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
## v2OrganisationsDivisionsUpdate
|
|
309
|
+
|
|
310
|
+
> DivisionWrite v2OrganisationsDivisionsUpdate(id, divisionWrite)
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
Update an existing division\'s contact, billing, and address details. Override also triggers a webhook on successful PUT and PATCH requests.
|
|
315
|
+
|
|
316
|
+
### Example
|
|
317
|
+
|
|
318
|
+
```ts
|
|
319
|
+
import {
|
|
320
|
+
Configuration,
|
|
321
|
+
DivisionsApi,
|
|
322
|
+
} from '@pescheckit/pescheck-client';
|
|
323
|
+
import type { V2OrganisationsDivisionsUpdateRequest } from '@pescheckit/pescheck-client';
|
|
324
|
+
|
|
325
|
+
async function example() {
|
|
326
|
+
console.log("🚀 Testing @pescheckit/pescheck-client SDK...");
|
|
327
|
+
const config = new Configuration({
|
|
328
|
+
// To configure OAuth2 access token for authorization: oauth2 application
|
|
329
|
+
accessToken: "YOUR ACCESS TOKEN",
|
|
330
|
+
});
|
|
331
|
+
const api = new DivisionsApi(config);
|
|
332
|
+
|
|
333
|
+
const body = {
|
|
334
|
+
// string | A UUID string identifying this organisation.
|
|
335
|
+
id: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
336
|
+
// DivisionWrite
|
|
337
|
+
divisionWrite: ...,
|
|
338
|
+
} satisfies V2OrganisationsDivisionsUpdateRequest;
|
|
339
|
+
|
|
340
|
+
try {
|
|
341
|
+
const data = await api.v2OrganisationsDivisionsUpdate(body);
|
|
342
|
+
console.log(data);
|
|
343
|
+
} catch (error) {
|
|
344
|
+
console.error(error);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
// Run the test
|
|
349
|
+
example().catch(console.error);
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### Parameters
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
| Name | Type | Description | Notes |
|
|
356
|
+
|------------- | ------------- | ------------- | -------------|
|
|
357
|
+
| **id** | `string` | A UUID string identifying this organisation. | [Defaults to `undefined`] |
|
|
358
|
+
| **divisionWrite** | [DivisionWrite](DivisionWrite.md) | | |
|
|
359
|
+
|
|
360
|
+
### Return type
|
|
361
|
+
|
|
362
|
+
[**DivisionWrite**](DivisionWrite.md)
|
|
363
|
+
|
|
364
|
+
### Authorization
|
|
365
|
+
|
|
366
|
+
[oauth2 application](../README.md#oauth2-application)
|
|
367
|
+
|
|
368
|
+
### HTTP request headers
|
|
369
|
+
|
|
370
|
+
- **Content-Type**: `application/json`, `multipart/form-data`
|
|
371
|
+
- **Accept**: `application/json`
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
### HTTP response details
|
|
375
|
+
| Status code | Description | Response headers |
|
|
376
|
+
|-------------|-------------|------------------|
|
|
377
|
+
| **200** | | - |
|
|
378
|
+
|
|
379
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
380
|
+
|