SyncsnapServer API
Import:import { SyncsnapServer } from "syncsnap";
Constructor
process.env.SYNCSNAP_TOKEN and the default SyncSnap API base URL.
Methods
createJob()
{ id, projectId, status, createdAt, updatedAt }.
getJob(jobId)
getUploadUrl(jobId, options)
getDownloadUrl(jobId, options?)
waitForJobCompletion(jobId, options?)
completed or failed, or until timeout/abort.
WaitForJobOptions:
| Option | Type | Default | Description |
|---|---|---|---|
intervalMs | number | 2000 | Poll interval in ms. |
timeoutMs | number | 120000 | Timeout in ms. |
onPoll | (job: Job) => void | — | Called on each poll. |
signal | AbortSignal | — | Abort to stop polling. |