Skip to content

Commit

Permalink
Imported types for idvClient
Browse files Browse the repository at this point in the history
  • Loading branch information
abdalmajeed-yoti committed Dec 17, 2023
1 parent ea6e2f7 commit 28e21d8
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions src/client/idv.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ class IDVClient {
/**
* Creates a IDV session using the supplied session specification
*
* @typedef {import('../idv_service/session/create/session.specification.js')} SessionSpecification
*
* @param {SessionSpecification} sessionSpecification
*
* @typedef {Promise<import('../idv_service/session/create/create.session.result')>} CreateSessionResult
* @typedef {import('../idv_service/session/create/create.session.result')} CreateSessionResult
*
* @returns {CreateSessionResult}
* @returns {Promise<CreateSessionResult>}
*/
createSession(sessionSpecification) {
return this.idvService.createSession(sessionSpecification);
Expand All @@ -44,6 +46,8 @@ class IDVClient {
*
* @param {string} sessionId
*
* @typedef {import('../idv_service/session/retrieve/get.session.result.js')} GetSessionResult
*
* @returns {Promise<GetSessionResult>}
*/
getSession(sessionId) {
Expand All @@ -56,7 +60,7 @@ class IDVClient {
*
* @param {string} sessionId
*
* @returns {Promise}
* @returns {Promise<void>}
*/
deleteSession(sessionId) {
return this.idvService.deleteSession(sessionId);
Expand All @@ -69,6 +73,8 @@ class IDVClient {
* @param {string} sessionId
* @param {string} mediaId
*
* @typedef {import('../data_type/media.js')} Media
*
* @returns {Promise<Media>}
*/
getMediaContent(sessionId, mediaId) {
Expand All @@ -82,7 +88,7 @@ class IDVClient {
* @param {string} sessionId
* @param {string} mediaId
*
* @returns {Promise}
* @returns {Promise<void>}
*/
deleteMediaContent(sessionId, mediaId) {
return this.idvService.deleteMediaContent(sessionId, mediaId);
Expand All @@ -93,6 +99,8 @@ class IDVClient {
*
* @param {boolean} includeNonLatin
*
* @typedef {import('../idv_service/support/supported.documents.response.js')} SupportedDocumentsResponse
*
* @returns {Promise<SupportedDocumentsResponse>}
*/
getSupportedDocuments(includeNonLatin) {
Expand All @@ -102,8 +110,13 @@ class IDVClient {
/**
* Creates a face capture resource
* @param {string} sessionId
*
* @typedef {import('../idv_service/session/create/face_capture/create.face.capture.resource.payload.js')} CreateFaceCaptureResourcePayload
*
* @param {CreateFaceCaptureResourcePayload} createFaceCaptureResourcePayload
*
* @typedef {import('../idv_service/session/retrieve/create.face.capture.resource.response.js')} CreateFaceCaptureResourceResponse
*
* @returns {Promise<CreateFaceCaptureResourceResponse>}
*/
createFaceCaptureResource(sessionId, createFaceCaptureResourcePayload) {
Expand All @@ -117,9 +130,12 @@ class IDVClient {
* Uploads a face capture image
* @param {string} sessionId
* @param {string} resourceId
*
* @typedef {import('../idv_service/session/create/face_capture/upload.face.capture.image.payload.js')} UploadFaceCaptureImagePayload
*
* @param {UploadFaceCaptureImagePayload} uploadFaceCaptureImagePayload
*
* @returns {Promise<CreateFaceCaptureResourceResponse>}
* @returns {Promise<void>}
*/
uploadFaceCaptureImage(sessionId, resourceId, uploadFaceCaptureImagePayload) {
return this.idvService.uploadFaceCaptureImage(
Expand All @@ -134,6 +150,8 @@ class IDVClient {
*
* @param {string} sessionId
*
* @typedef {import('../idv_service/session/retrieve/configuration/session.configuration.response.js')} SessionConfigurationResponse
*
* @returns {Promise<SessionConfigurationResponse>}
*/
getSessionConfiguration(sessionId) {
Expand Down

0 comments on commit 28e21d8

Please sign in to comment.