-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(kyc): liveness sessions (#1631)
* feat(kyc): liveness sessions * tiny adjustment * fix validation * feat: add storefront API * feat: KycDocument changes * feat: KycLivenessSession * fix: Apply suggestions from code review Co-authored-by: Alexey Sukhikh <[email protected]> * fix: update customerId Co-authored-by: Alexey Sukhikh <[email protected]> * Fix errors and paths * Update openapi/paths/storefront/kyc-liveness-sessions.yaml Co-authored-by: Chris <[email protected]> * Bump up cli version * Revert cli version * feat(kyc): remove unneeded collection endpoint, make kycRequestId nullable on read * fix: errors * fix: example * fix: remove core APIs * fix: remove request body example, fix a typo * fix: remove capitalization Co-authored-by: Chris <[email protected]> * fix: Apply suggestions from code review Co-authored-by: Nikolay <[email protected]> * fix: style * fix: success status * fix: wording * fix: statuses * feat: remove mutating GET action in favour of POST action * fix: lint * fix: operationId * fix: remove self link * feat: add StorefrontGetKycLivenessSession * fix: paths * fix: add security type and remove unused status code --------- Co-authored-by: junyong <[email protected]> Co-authored-by: Alexey Sukhikh <[email protected]> Co-authored-by: Sebastian Wilczynski <[email protected]> Co-authored-by: Chris <[email protected]> Co-authored-by: Nikolay <[email protected]>
- Loading branch information
1 parent
4906235
commit 5d280e6
Showing
6 changed files
with
170 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
openapi/components/requestBodies/storefront/PostKycLivenessSession.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
required: | ||
- kycRequestId | ||
properties: | ||
kycRequestId: | ||
type: string | ||
description: ID of the KYC request that the liveness session is associated with. | ||
maxLength: 50 | ||
example: kyc_req_0YV7JMJ3DBCGRBR7K9D4HVGPP5 | ||
description: KYC liveness session. | ||
required: true |
66 changes: 66 additions & 0 deletions
66
openapi/components/schemas/StorefrontKycLivenessSession.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
type: object | ||
description: KYC liveness session information. | ||
required: | ||
- customerId | ||
properties: | ||
id: | ||
type: string | ||
readOnly: true | ||
description: ID of the KYC liveness session. | ||
maxLength: 50 | ||
example: kyc_liv_0YV7JMJ3DBCGRBR7K9D4HVGPP5 | ||
customerId: | ||
$ref: ./CustomerId.yaml | ||
readOnly: true | ||
kycRequestId: | ||
type: string | ||
description: ID of the KYC request that the liveness session is associated with. | ||
maxLength: 50 | ||
example: kyc_req_0YV7JMJ3DBCGRBR7K9D4HVGPP5 | ||
sessionId: | ||
type: string | ||
readOnly: true | ||
description: Session ID of the KYC liveness session in the third-party service. | ||
example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21 | ||
status: | ||
description: Status of the session. | ||
type: string | ||
readOnly: true | ||
enum: | ||
- pending | ||
- completed | ||
- failed | ||
- abandoned | ||
x-enumDescriptions: | ||
pending: |- | ||
Session is created, but not processed yet. | ||
This is a temporary state. | ||
completed: |- | ||
Session is completed. | ||
This is a permanent state. | ||
failed: |- | ||
Session has failed. | ||
This is a permanent state. | ||
abandoned: |- | ||
Session was not completed and timed out. | ||
This is a permanent state. | ||
createdTime: | ||
$ref: ./CreatedTime.yaml | ||
updatedTime: | ||
$ref: ./UpdatedTime.yaml | ||
_links: | ||
type: array | ||
description: Related links. | ||
readOnly: true | ||
items: | ||
type: object | ||
properties: | ||
href: | ||
description: Link URL. | ||
type: string | ||
rel: | ||
description: Type of link. | ||
type: string | ||
enum: | ||
- self | ||
- kycRequest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
post: | ||
x-products: | ||
- Storefront | ||
tags: | ||
- KYC documents | ||
summary: Create a KYC liveness session | ||
operationId: StorefrontPostKycLivenessSession | ||
x-sdk-operation-name: create | ||
description: Creates a KYC liveness session. | ||
security: | ||
- CustomerJWT: [] | ||
requestBody: | ||
$ref: ../../components/requestBodies/storefront/PostKycLivenessSession.yaml | ||
description: KYC request resource. | ||
required: true | ||
responses: | ||
'201': | ||
description: KYC liveness session created. | ||
headers: | ||
Location: | ||
$ref: ../../components/headers/Location.yaml | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../../components/schemas/StorefrontKycLivenessSession.yaml | ||
'401': | ||
$ref: ../../components/responses/Unauthorized.yaml | ||
'403': | ||
$ref: ../../components/responses/Forbidden.yaml | ||
'422': | ||
$ref: ../../components/responses/ValidationError.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
parameters: | ||
- $ref: ../../components/parameters/resourceId.yaml | ||
get: | ||
x-products: | ||
- Storefront | ||
tags: | ||
- KYC documents | ||
summary: Retrieve a KYC liveness session | ||
operationId: StorefrontGetKycLivenessSession | ||
x-sdk-operation-name: get | ||
description: Retrieves a KYC liveness session with a specified ID. | ||
security: | ||
- CustomerJWT: [] | ||
responses: | ||
'200': | ||
description: KYC liveness session retrieved. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../../components/schemas/StorefrontKycLivenessSession.yaml | ||
'401': | ||
$ref: ../../components/responses/Unauthorized.yaml | ||
'403': | ||
$ref: ../../components/responses/Forbidden.yaml | ||
'404': | ||
$ref: ../../components/responses/NotFound.yaml |
27 changes: 27 additions & 0 deletions
27
openapi/paths/storefront/kyc-liveness-sessions@{id}@finish.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
parameters: | ||
- $ref: ../../components/parameters/resourceId.yaml | ||
post: | ||
x-products: | ||
- Storefront | ||
tags: | ||
- KYC documents | ||
summary: Finish KYC liveness session | ||
operationId: StorefrontPostKycLivenessSessionFinish | ||
x-sdk-operation-name: finish | ||
description: Attempt to finalize a pending KYC liveness session. | ||
security: | ||
- CustomerJWT: [] | ||
responses: | ||
'200': | ||
description: KYC liveness session finalization attempt successful. | ||
headers: | ||
Location: | ||
$ref: ../../components/headers/Location.yaml | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../../components/schemas/StorefrontKycLivenessSession.yaml | ||
'401': | ||
$ref: ../../components/responses/Unauthorized.yaml | ||
'403': | ||
$ref: ../../components/responses/Forbidden.yaml |