Skip to content

Api

Thin client for the job system endpoints (/jobs) and the upload-once endpoint (POST /profiles/files) that feeds them.

Functions

cancelJob()

function cancelJob(id): Promise<Job>;

Defined in: src/shared/jobs/api.ts:65

Cancels a queued or running job.

Parameters

Parameter Type Description
id string The job id.

Returns

Promise\<Job>

The updated job.


deleteJob()

function deleteJob(id): Promise<void>;

Defined in: src/shared/jobs/api.ts:75

Deletes a finished job (its record, not its produced files).

Parameters

Parameter Type Description
id string The job id.

Returns

Promise\<void>

Resolves when deleted.


getJob()

function getJob(id): Promise<Job>;

Defined in: src/shared/jobs/api.ts:35

Fetches a single job.

Parameters

Parameter Type Description
id string The job id.

Returns

Promise\<Job>

The job.


listJobChildren()

function listJobChildren(id): Promise<Job[]>;

Defined in: src/shared/jobs/api.ts:25

Lists a batch parent's per-file child jobs (empty for a single-op job).

Parameters

Parameter Type Description
id string The parent job id.

Returns

Promise\<Job[]>

The child jobs, in submit order.


listJobs()

function listJobs(activeOnly?): Promise<Job[]>;

Defined in: src/shared/jobs/api.ts:15

Lists the active profile's top-level jobs.

Parameters

Parameter Type Default value Description
activeOnly? boolean false Restrict to queued / running jobs.

Returns

Promise\<Job[]>

The jobs, newest first.


submitBatch()

function submitBatch(req): Promise<Job>;

Defined in: src/shared/jobs/api.ts:55

Submits a batch job that runs one operation across several profile files.

Parameters

Parameter Type Description
req BatchSubmitRequest The batch submission.

Returns

Promise\<Job>

The created parent job.


submitJob()

function submitJob(req): Promise<Job>;

Defined in: src/shared/jobs/api.ts:45

Submits a job against an already-uploaded profile file.

Parameters

Parameter Type Description
req SubmitJobRequest The submission.

Returns

Promise\<Job>

The created job.


uploadProfileFile()

function uploadProfileFile(
  file,
  type,
  onProgress,
  onComplete,
  folder?,
): Promise<UploadedFile>;

Defined in: src/shared/jobs/api.ts:89

Uploads a file as a profile file (no processing), for later job submission.

Parameters

Parameter Type Description
file File The file to upload.
type string | undefined Optional file-type tag.
onProgress (percent) => void Upload progress callback.
onComplete () => void Called when the upload hits 100%.
folder? string Optional group label (e.g. a folder name).

Returns

Promise\<UploadedFile>

The stored file.