Node.js SDKResources

Steps

Node.js SDK - Step execution resource

Steps

Resource for running predefined processing steps. Access via client.steps.

Methods

runAsync(params, options?)

Runs a processing step asynchronously with a .wait() method for polling.

const status = await client.steps.runAsync({
  stepId: 'step_abc123',
  url: 'https://example.com/document.pdf',
});

const result = await status.wait();
console.log(result.status); // 'SUCCESS'
console.log(result.data);   // processed result

Parameters: StepsRunParams Returns: Promise<StepExecutionStatus & { wait(): Promise<StepExecutionStatus> }>

getStatus(executionId, options?)

Retrieves the current status of a step execution.

const status = await client.steps.getStatus('exec_abc123');
console.log(status.status);

Parameters: executionId: string Returns: Promise<StepExecutionStatus>

Raw Responses

Access raw HTTP response details via withRawResponse:

const raw = await client.steps.withRawResponse.runAsync({
  stepId: 'step_abc123',
  url: 'https://example.com/document.pdf',
});

console.log(raw.statusCode);

On this page