Kind: Class
Client for interacting with the screenshot-worker API
Methods
| Method | Signature | Returns |
|---|---|---|
submitBatch | submitBatch(request: ScreenshotBatchRequest) | Promise<BatchJobResponse> |
getJobStatus | getJobStatus(jobId: string, organizationId: string) | `Promise<BatchStatusResponse |
waitForCompletion | waitForCompletion(jobId: string, organizationId: string, timeoutMs: number) | Promise<BatchStatusResponse> |
Where it refuses work
ScreenshotWorkerClientstops the work withErrorwhen!response.ok, in 2 places.ScreenshotWorkerClientstops the work withErrorwhenstatus === null.ScreenshotWorkerClientstops the work with an early return whenresponse.status === 404.ScreenshotWorkerClientstops the work with an early return whenstatus.status === 'completed' || status.status === 'failed'.
Was this page helpful?