@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,363 @@
|
|
|
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
|
+
|
|
15
|
+
import * as runtime from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
type VerifyWebhook,
|
|
18
|
+
VerifyWebhookFromJSON,
|
|
19
|
+
VerifyWebhookToJSON,
|
|
20
|
+
} from '../models/VerifyWebhook';
|
|
21
|
+
import {
|
|
22
|
+
type Webhook,
|
|
23
|
+
WebhookFromJSON,
|
|
24
|
+
WebhookToJSON,
|
|
25
|
+
} from '../models/Webhook';
|
|
26
|
+
import {
|
|
27
|
+
type WebhookResponse,
|
|
28
|
+
WebhookResponseFromJSON,
|
|
29
|
+
WebhookResponseToJSON,
|
|
30
|
+
} from '../models/WebhookResponse';
|
|
31
|
+
|
|
32
|
+
export interface CreateWebhook2Request {
|
|
33
|
+
webhook: Webhook;
|
|
34
|
+
xOrganizationId?: string;
|
|
35
|
+
organizationId?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface DeleteWebhook2Request {
|
|
39
|
+
webhookId: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface VerifyWebhook2Request {
|
|
43
|
+
webhookId: string;
|
|
44
|
+
verifyWebhook: VerifyWebhook;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* WebhooksApi - interface
|
|
49
|
+
*
|
|
50
|
+
* @export
|
|
51
|
+
* @interface WebhooksApiInterface
|
|
52
|
+
*/
|
|
53
|
+
export interface WebhooksApiInterface {
|
|
54
|
+
/**
|
|
55
|
+
* Creates request options for createWebhook2 without sending the request
|
|
56
|
+
* @param {Webhook} webhook
|
|
57
|
+
* @param {string} [xOrganizationId] Organization ID (for JWT/Session auth only)
|
|
58
|
+
* @param {string} [organizationId] Organization ID (for JWT/Session auth only)
|
|
59
|
+
* @throws {RequiredError}
|
|
60
|
+
* @memberof WebhooksApiInterface
|
|
61
|
+
*/
|
|
62
|
+
createWebhook2RequestOpts(requestParameters: CreateWebhook2Request): Promise<runtime.RequestOpts>;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* 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.
|
|
66
|
+
* @param {Webhook} webhook
|
|
67
|
+
* @param {string} [xOrganizationId] Organization ID (for JWT/Session auth only)
|
|
68
|
+
* @param {string} [organizationId] Organization ID (for JWT/Session auth only)
|
|
69
|
+
* @param {*} [options] Override http request option.
|
|
70
|
+
* @throws {RequiredError}
|
|
71
|
+
* @memberof WebhooksApiInterface
|
|
72
|
+
*/
|
|
73
|
+
createWebhook2Raw(requestParameters: CreateWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookResponse>>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 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.
|
|
77
|
+
*/
|
|
78
|
+
createWebhook2(requestParameters: CreateWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookResponse>;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Creates request options for deleteWebhook2 without sending the request
|
|
82
|
+
* @param {string} webhookId Webhook ID to delete
|
|
83
|
+
* @throws {RequiredError}
|
|
84
|
+
* @memberof WebhooksApiInterface
|
|
85
|
+
*/
|
|
86
|
+
deleteWebhook2RequestOpts(requestParameters: DeleteWebhook2Request): Promise<runtime.RequestOpts>;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Delete a webhook
|
|
90
|
+
* @param {string} webhookId Webhook ID to delete
|
|
91
|
+
* @param {*} [options] Override http request option.
|
|
92
|
+
* @throws {RequiredError}
|
|
93
|
+
* @memberof WebhooksApiInterface
|
|
94
|
+
*/
|
|
95
|
+
deleteWebhook2Raw(requestParameters: DeleteWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Delete a webhook
|
|
99
|
+
*/
|
|
100
|
+
deleteWebhook2(requestParameters: DeleteWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Creates request options for listWebhooks2 without sending the request
|
|
104
|
+
* @throws {RequiredError}
|
|
105
|
+
* @memberof WebhooksApiInterface
|
|
106
|
+
*/
|
|
107
|
+
listWebhooks2RequestOpts(): Promise<runtime.RequestOpts>;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* List webhooks for the organization
|
|
111
|
+
* @param {*} [options] Override http request option.
|
|
112
|
+
* @throws {RequiredError}
|
|
113
|
+
* @memberof WebhooksApiInterface
|
|
114
|
+
*/
|
|
115
|
+
listWebhooks2Raw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<WebhookResponse>>>;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* List webhooks for the organization
|
|
119
|
+
*/
|
|
120
|
+
listWebhooks2(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<WebhookResponse>>;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Creates request options for verifyWebhook2 without sending the request
|
|
124
|
+
* @param {string} webhookId Webhook ID
|
|
125
|
+
* @param {VerifyWebhook} verifyWebhook
|
|
126
|
+
* @throws {RequiredError}
|
|
127
|
+
* @memberof WebhooksApiInterface
|
|
128
|
+
*/
|
|
129
|
+
verifyWebhook2RequestOpts(requestParameters: VerifyWebhook2Request): Promise<runtime.RequestOpts>;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Verify webhook ownership
|
|
133
|
+
* @param {string} webhookId Webhook ID
|
|
134
|
+
* @param {VerifyWebhook} verifyWebhook
|
|
135
|
+
* @param {*} [options] Override http request option.
|
|
136
|
+
* @throws {RequiredError}
|
|
137
|
+
* @memberof WebhooksApiInterface
|
|
138
|
+
*/
|
|
139
|
+
verifyWebhook2Raw(requestParameters: VerifyWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Verify webhook ownership
|
|
143
|
+
*/
|
|
144
|
+
verifyWebhook2(requestParameters: VerifyWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
145
|
+
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
*
|
|
150
|
+
*/
|
|
151
|
+
export class WebhooksApi extends runtime.BaseAPI implements WebhooksApiInterface {
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Creates request options for createWebhook2 without sending the request
|
|
155
|
+
*/
|
|
156
|
+
async createWebhook2RequestOpts(requestParameters: CreateWebhook2Request): Promise<runtime.RequestOpts> {
|
|
157
|
+
if (requestParameters['webhook'] == null) {
|
|
158
|
+
throw new runtime.RequiredError(
|
|
159
|
+
'webhook',
|
|
160
|
+
'Required parameter "webhook" was null or undefined when calling createWebhook2().'
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const queryParameters: any = {};
|
|
165
|
+
|
|
166
|
+
if (requestParameters['organizationId'] != null) {
|
|
167
|
+
queryParameters['organization_id'] = requestParameters['organizationId'];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
171
|
+
|
|
172
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
173
|
+
|
|
174
|
+
if (requestParameters['xOrganizationId'] != null) {
|
|
175
|
+
headerParameters['X-Organization-Id'] = String(requestParameters['xOrganizationId']);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
179
|
+
// oauth required
|
|
180
|
+
headerParameters["Authorization"] = `Bearer ${await this.configuration.accessToken("oauth2", ["read:api", "create:api", "update:api"])}`;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
let urlPath = `/api/v2/webhooks/`;
|
|
185
|
+
|
|
186
|
+
return {
|
|
187
|
+
path: urlPath,
|
|
188
|
+
method: 'POST',
|
|
189
|
+
headers: headerParameters,
|
|
190
|
+
query: queryParameters,
|
|
191
|
+
body: WebhookToJSON(requestParameters['webhook']),
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* 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.
|
|
197
|
+
*/
|
|
198
|
+
async createWebhook2Raw(requestParameters: CreateWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WebhookResponse>> {
|
|
199
|
+
const requestOptions = await this.createWebhook2RequestOpts(requestParameters);
|
|
200
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
201
|
+
|
|
202
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WebhookResponseFromJSON(jsonValue));
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* 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.
|
|
207
|
+
*/
|
|
208
|
+
async createWebhook2(requestParameters: CreateWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WebhookResponse> {
|
|
209
|
+
const response = await this.createWebhook2Raw(requestParameters, initOverrides);
|
|
210
|
+
return await response.value();
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Creates request options for deleteWebhook2 without sending the request
|
|
215
|
+
*/
|
|
216
|
+
async deleteWebhook2RequestOpts(requestParameters: DeleteWebhook2Request): Promise<runtime.RequestOpts> {
|
|
217
|
+
if (requestParameters['webhookId'] == null) {
|
|
218
|
+
throw new runtime.RequiredError(
|
|
219
|
+
'webhookId',
|
|
220
|
+
'Required parameter "webhookId" was null or undefined when calling deleteWebhook2().'
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const queryParameters: any = {};
|
|
225
|
+
|
|
226
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
227
|
+
|
|
228
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
229
|
+
// oauth required
|
|
230
|
+
headerParameters["Authorization"] = `Bearer ${await this.configuration.accessToken("oauth2", ["read:api", "create:api", "update:api"])}`;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
let urlPath = `/api/v2/webhooks/{webhook_id}/`;
|
|
235
|
+
urlPath = urlPath.replace('{webhook_id}', encodeURIComponent(String(requestParameters['webhookId'])));
|
|
236
|
+
|
|
237
|
+
return {
|
|
238
|
+
path: urlPath,
|
|
239
|
+
method: 'DELETE',
|
|
240
|
+
headers: headerParameters,
|
|
241
|
+
query: queryParameters,
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Delete a webhook
|
|
247
|
+
*/
|
|
248
|
+
async deleteWebhook2Raw(requestParameters: DeleteWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
249
|
+
const requestOptions = await this.deleteWebhook2RequestOpts(requestParameters);
|
|
250
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
251
|
+
|
|
252
|
+
return new runtime.VoidApiResponse(response);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Delete a webhook
|
|
257
|
+
*/
|
|
258
|
+
async deleteWebhook2(requestParameters: DeleteWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
259
|
+
await this.deleteWebhook2Raw(requestParameters, initOverrides);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Creates request options for listWebhooks2 without sending the request
|
|
264
|
+
*/
|
|
265
|
+
async listWebhooks2RequestOpts(): Promise<runtime.RequestOpts> {
|
|
266
|
+
const queryParameters: any = {};
|
|
267
|
+
|
|
268
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
269
|
+
|
|
270
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
271
|
+
// oauth required
|
|
272
|
+
headerParameters["Authorization"] = `Bearer ${await this.configuration.accessToken("oauth2", ["read:api", "create:api", "update:api"])}`;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
let urlPath = `/api/v2/webhooks/list/`;
|
|
277
|
+
|
|
278
|
+
return {
|
|
279
|
+
path: urlPath,
|
|
280
|
+
method: 'GET',
|
|
281
|
+
headers: headerParameters,
|
|
282
|
+
query: queryParameters,
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* List webhooks for the organization
|
|
288
|
+
*/
|
|
289
|
+
async listWebhooks2Raw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<WebhookResponse>>> {
|
|
290
|
+
const requestOptions = await this.listWebhooks2RequestOpts();
|
|
291
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
292
|
+
|
|
293
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(WebhookResponseFromJSON));
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* List webhooks for the organization
|
|
298
|
+
*/
|
|
299
|
+
async listWebhooks2(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<WebhookResponse>> {
|
|
300
|
+
const response = await this.listWebhooks2Raw(initOverrides);
|
|
301
|
+
return await response.value();
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Creates request options for verifyWebhook2 without sending the request
|
|
306
|
+
*/
|
|
307
|
+
async verifyWebhook2RequestOpts(requestParameters: VerifyWebhook2Request): Promise<runtime.RequestOpts> {
|
|
308
|
+
if (requestParameters['webhookId'] == null) {
|
|
309
|
+
throw new runtime.RequiredError(
|
|
310
|
+
'webhookId',
|
|
311
|
+
'Required parameter "webhookId" was null or undefined when calling verifyWebhook2().'
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
if (requestParameters['verifyWebhook'] == null) {
|
|
316
|
+
throw new runtime.RequiredError(
|
|
317
|
+
'verifyWebhook',
|
|
318
|
+
'Required parameter "verifyWebhook" was null or undefined when calling verifyWebhook2().'
|
|
319
|
+
);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
const queryParameters: any = {};
|
|
323
|
+
|
|
324
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
325
|
+
|
|
326
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
327
|
+
|
|
328
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
329
|
+
// oauth required
|
|
330
|
+
headerParameters["Authorization"] = `Bearer ${await this.configuration.accessToken("oauth2", ["read:api", "create:api", "update:api"])}`;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
let urlPath = `/api/v2/webhooks/{webhook_id}/verify/`;
|
|
335
|
+
urlPath = urlPath.replace('{webhook_id}', encodeURIComponent(String(requestParameters['webhookId'])));
|
|
336
|
+
|
|
337
|
+
return {
|
|
338
|
+
path: urlPath,
|
|
339
|
+
method: 'POST',
|
|
340
|
+
headers: headerParameters,
|
|
341
|
+
query: queryParameters,
|
|
342
|
+
body: VerifyWebhookToJSON(requestParameters['verifyWebhook']),
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Verify webhook ownership
|
|
348
|
+
*/
|
|
349
|
+
async verifyWebhook2Raw(requestParameters: VerifyWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
350
|
+
const requestOptions = await this.verifyWebhook2RequestOpts(requestParameters);
|
|
351
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
352
|
+
|
|
353
|
+
return new runtime.VoidApiResponse(response);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Verify webhook ownership
|
|
358
|
+
*/
|
|
359
|
+
async verifyWebhook2(requestParameters: VerifyWebhook2Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
360
|
+
await this.verifyWebhook2Raw(requestParameters, initOverrides);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
}
|
|
@@ -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';
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Custom JWT serializer that includes organization information in the token.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface CustomTokenObtainPair
|
|
20
|
+
*/
|
|
21
|
+
export interface CustomTokenObtainPair {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CustomTokenObtainPair
|
|
26
|
+
*/
|
|
27
|
+
email: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CustomTokenObtainPair
|
|
32
|
+
*/
|
|
33
|
+
password: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the CustomTokenObtainPair interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfCustomTokenObtainPair(value: any): value is CustomTokenObtainPair {
|
|
40
|
+
if (!('email' in value) || value['email'] === undefined) return false;
|
|
41
|
+
if (!('password' in value) || value['password'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function CustomTokenObtainPairFromJSON(json: any): CustomTokenObtainPair {
|
|
46
|
+
return CustomTokenObtainPairFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function CustomTokenObtainPairFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomTokenObtainPair {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'email': json['email'],
|
|
56
|
+
'password': json['password'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function CustomTokenObtainPairToJSON(json: any): CustomTokenObtainPair {
|
|
61
|
+
return CustomTokenObtainPairToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function CustomTokenObtainPairToJSONTyped(value?: CustomTokenObtainPair | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'email': value['email'],
|
|
72
|
+
'password': value['password'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
@@ -0,0 +1,177 @@
|
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface DivisionReadOnly
|
|
20
|
+
*/
|
|
21
|
+
export interface DivisionReadOnly {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof DivisionReadOnly
|
|
26
|
+
*/
|
|
27
|
+
readonly id: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof DivisionReadOnly
|
|
32
|
+
*/
|
|
33
|
+
name?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof DivisionReadOnly
|
|
38
|
+
*/
|
|
39
|
+
readonly parent: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {Date}
|
|
43
|
+
* @memberof DivisionReadOnly
|
|
44
|
+
*/
|
|
45
|
+
readonly createdAt: Date;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {Date}
|
|
49
|
+
* @memberof DivisionReadOnly
|
|
50
|
+
*/
|
|
51
|
+
readonly updatedAt: Date;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof DivisionReadOnly
|
|
56
|
+
*/
|
|
57
|
+
city?: string | null;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof DivisionReadOnly
|
|
62
|
+
*/
|
|
63
|
+
address?: string | null;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof DivisionReadOnly
|
|
68
|
+
*/
|
|
69
|
+
postal?: string | null;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof DivisionReadOnly
|
|
74
|
+
*/
|
|
75
|
+
phone?: string | null;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {string}
|
|
79
|
+
* @memberof DivisionReadOnly
|
|
80
|
+
*/
|
|
81
|
+
contactName?: string | null;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {string}
|
|
85
|
+
* @memberof DivisionReadOnly
|
|
86
|
+
*/
|
|
87
|
+
contactEmail?: string | null;
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @type {string}
|
|
91
|
+
* @memberof DivisionReadOnly
|
|
92
|
+
*/
|
|
93
|
+
invoiceEmail?: string | null;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {boolean}
|
|
97
|
+
* @memberof DivisionReadOnly
|
|
98
|
+
*/
|
|
99
|
+
useParentOnEmail?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {boolean}
|
|
103
|
+
* @memberof DivisionReadOnly
|
|
104
|
+
*/
|
|
105
|
+
useParentOnBilling?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @type {boolean}
|
|
109
|
+
* @memberof DivisionReadOnly
|
|
110
|
+
*/
|
|
111
|
+
useParentOnReport?: boolean;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Check if a given object implements the DivisionReadOnly interface.
|
|
116
|
+
*/
|
|
117
|
+
export function instanceOfDivisionReadOnly(value: any): value is DivisionReadOnly {
|
|
118
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
119
|
+
if (!('parent' in value) || value['parent'] === undefined) return false;
|
|
120
|
+
if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined)) return false;
|
|
121
|
+
if ((!('updatedAt' in value) && !('updated_at' in value)) || (value['updatedAt'] === undefined && value['updated_at'] === undefined)) return false;
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function DivisionReadOnlyFromJSON(json: any): DivisionReadOnly {
|
|
126
|
+
return DivisionReadOnlyFromJSONTyped(json, false);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export function DivisionReadOnlyFromJSONTyped(json: any, ignoreDiscriminator: boolean): DivisionReadOnly {
|
|
130
|
+
if (json == null) {
|
|
131
|
+
return json;
|
|
132
|
+
}
|
|
133
|
+
return {
|
|
134
|
+
|
|
135
|
+
'id': json['id'],
|
|
136
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
137
|
+
'parent': json['parent'],
|
|
138
|
+
'createdAt': (new Date(json['created_at'])),
|
|
139
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
140
|
+
'city': json['city'] == null ? undefined : json['city'],
|
|
141
|
+
'address': json['address'] == null ? undefined : json['address'],
|
|
142
|
+
'postal': json['postal'] == null ? undefined : json['postal'],
|
|
143
|
+
'phone': json['phone'] == null ? undefined : json['phone'],
|
|
144
|
+
'contactName': json['contact_name'] == null ? undefined : json['contact_name'],
|
|
145
|
+
'contactEmail': json['contact_email'] == null ? undefined : json['contact_email'],
|
|
146
|
+
'invoiceEmail': json['invoice_email'] == null ? undefined : json['invoice_email'],
|
|
147
|
+
'useParentOnEmail': json['use_parent_on_email'] == null ? undefined : json['use_parent_on_email'],
|
|
148
|
+
'useParentOnBilling': json['use_parent_on_billing'] == null ? undefined : json['use_parent_on_billing'],
|
|
149
|
+
'useParentOnReport': json['use_parent_on_report'] == null ? undefined : json['use_parent_on_report'],
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function DivisionReadOnlyToJSON(json: any): DivisionReadOnly {
|
|
154
|
+
return DivisionReadOnlyToJSONTyped(json, false);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function DivisionReadOnlyToJSONTyped(value?: Omit<DivisionReadOnly, 'id'|'parent'|'created_at'|'updated_at'> | null, ignoreDiscriminator: boolean = false): any {
|
|
158
|
+
if (value == null) {
|
|
159
|
+
return value;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return {
|
|
163
|
+
|
|
164
|
+
'name': value['name'],
|
|
165
|
+
'city': value['city'],
|
|
166
|
+
'address': value['address'],
|
|
167
|
+
'postal': value['postal'],
|
|
168
|
+
'phone': value['phone'],
|
|
169
|
+
'contact_name': value['contactName'],
|
|
170
|
+
'contact_email': value['contactEmail'],
|
|
171
|
+
'invoice_email': value['invoiceEmail'],
|
|
172
|
+
'use_parent_on_email': value['useParentOnEmail'],
|
|
173
|
+
'use_parent_on_billing': value['useParentOnBilling'],
|
|
174
|
+
'use_parent_on_report': value['useParentOnReport'],
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
|