Skip to content

TypeScript SDK Reference / VitalSignEnginePlugin

Interface: VitalSignEnginePlugin ​

The main interface of the Vital Sign Engine Plugin. This interface defines the contract for vital sign analysis engines, providing methods to configure, start, and monitor the scanning process.

Properties ​

lastRequest? ​

optional lastRequest: string

The last request sent to the server during a scan. Contains the JSON string of the most recent health analysis request. Access via: vitalSignEngine.healthAnalyzer.lastRequest


lastResponse? ​

optional lastResponse: string

The last response received from the server during a scan. Contains the JSON string of the most recent health analysis response. Access via: vitalSignEngine.healthAnalyzer.lastResponse

Methods ​

configure() ​

configure(config): void

Configure the plugin with the provided settings.

Parameters ​

config ​

VitalSignEngineConfig

Returns ​

void


getHealth() ​

getHealth(options): GetHealthResult

Process a video frame and update scanning progress. Must be called at least 20Hz during scanning.

Parameters ​

options ​

GetHealthOptions

Returns ​

GetHealthResult


isReady() ​

isReady(): Promise<boolean>

Check if the plugin is ready to start scanning.

Returns ​

Promise<boolean>


saveScanDataToS3() ​

saveScanDataToS3(bucket, requestDirectory?, responseDirectory?, shouldEncrypt?): Promise<{ request: any; response: any; }>

Save last request/response data to S3 bucket. Matches native SDK behavior.

Parameters ​

bucket ​

string

S3 bucket name

requestDirectory? ​

string

Directory for request data

responseDirectory? ​

string

Directory for response data

shouldEncrypt? ​

boolean

Whether to encrypt the data before upload

Returns ​

Promise<{ request: any; response: any; }>


sendHealthReport() ​

sendHealthReport(email, healthReport, emailTemplate, source): Promise<void>

Parameters ​

email ​

string[]

healthReport ​

string

emailTemplate ​

EmailTemplate

source ​

string

Returns ​

Promise<void>

Deprecated ​

Send health report via email. For backward compatibility only.


start() ​

start(): Promise<void>

Start a new scanning session.

Returns ​

Promise<void>


stop() ​

stop(): Promise<void>

Stop the current scanning session.

Returns ​

Promise<void>


waitUntilReady() ​

waitUntilReady(): Promise<void>

Wait until the plugin is fully initialized and ready.

Returns ​

Promise<void>