Node.js SDKTypes
Step Types
Node.js SDK - Step execution type definitions
StepExecutionStatusType
Possible statuses for a step execution.
type StepExecutionStatusType = 'ENQUEUED' | 'PROCESSING' | 'SUCCESS' | 'ERROR';StepExecutionStatus
Status of a step execution, as returned by the API.
Prop
Type
StepsRunParams
Parameters for running a step. Provide exactly one of file, url, or base64 as the document source.
Prop
Type
Type Guards
isStepExecutionComplete(status)
Returns true if the step execution has reached a terminal state (SUCCESS or ERROR).
isStepExecutionSuccess(status)
Returns true if the step execution completed successfully.
isStepExecutionError(status)
Returns true if the step execution failed with an error.
import { isStepExecutionSuccess } from 'docutray';
const result = await status.wait();
if (isStepExecutionSuccess(result)) {
console.log('Processed data:', result.data);
}