Node.js SDKTypes
Identify Types
Node.js SDK - Identification type definitions
IdentificationStatusType
Possible statuses for an identification operation.
type IdentificationStatusType = 'ENQUEUED' | 'PROCESSING' | 'SUCCESS' | 'ERROR';DocumentTypeMatch
A document type match with confidence score.
Prop
Type
IdentificationResult
Result of a successful identification with primary and alternative matches.
Prop
Type
IdentificationStatus
Status of an identification operation, as returned by the API.
Prop
Type
IdentifyParams
Parameters for creating an identification request. Provide exactly one of file, url, or base64.
Prop
Type
Type Guards
isIdentificationComplete(status)
Returns true if the identification has reached a terminal state.
isIdentificationSuccess(status)
Returns true if the identification completed successfully.
isIdentificationError(status)
Returns true if the identification failed with an error.
import { isIdentificationSuccess } from 'docutray';
if (isIdentificationSuccess(status)) {
console.log('Type:', status.document_type);
}