Get verdict for a file * @throws {VaasInvalidStateError} If connect() has not been called and awaited. Signifies caller error. * @throws {VaasAuthenticationError} Authentication failed. * @throws {VaasConnectionClosedError} Connection was closed. Call connect() to reconnect. * @throws {V
(
fileBuffer: Uint8Array,
ct: CancellationToken = CancellationToken.fromMilliseconds(
this.defaultTimeoutFileReq,
),
)
| 148 | * @throws {VaasTimeoutError} Timeout. Retry request. |
| 149 | */ |
| 150 | public async forFile( |
| 151 | fileBuffer: Uint8Array, |
| 152 | ct: CancellationToken = CancellationToken.fromMilliseconds( |
| 153 | this.defaultTimeoutFileReq, |
| 154 | ), |
| 155 | ): Promise<VaasVerdict> { |
| 156 | const request = this.forRequest(fileBuffer).then((response) => response); |
| 157 | return timeout(request, ct.timeout()); |
| 158 | } |
| 159 | |
| 160 | /** Get verdict for a list of files |
| 161 | * @throws {VaasInvalidStateError} If connect() has not been called and awaited. Signifies caller error. |
no test coverage detected