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, including 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 as the document source.
Prop
Type
Type Guards
isIdentificationComplete(status)
Returns true if the identification has reached a terminal state (SUCCESS or ERROR).
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('Document type:', status.document_type);
}