Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface StorageJobs

Hierarchy

  • StorageJobs

Index

Properties

cancel

cancel: (jobId: string) => Promise<AsObject>

Cancel a job.

param

The id of the job to cancel.

Type declaration

    • Parameters

      • jobId: string

      Returns Promise<AsObject>

get

get: (jobId: string) => Promise<AsObject>

Get the current state of a storage job.

param

The job id to query.

returns

The current state of the storage job.

Type declaration

    • Parameters

      • jobId: string

      Returns Promise<AsObject>

list

list: (opts?: ListOptions) => Promise<AsObject>

Lists StorageJobs according to the provided ListOptions.

param

Optional ListOptions to control the behavior of listing jobs.

returns

An object containing a list of storage jobs.

Type declaration

    • (opts?: ListOptions): Promise<AsObject>
    • Parameters

      • Optional opts: ListOptions

      Returns Promise<AsObject>

storageConfig

storageConfig: (jobId: string) => Promise<AsObject>

Get the storage config associated with the specified storage job id.

param

The cid of the desired storage config.

returns

The storage config associated with the provided job id.

Type declaration

    • Parameters

      • jobId: string

      Returns Promise<AsObject>

summary

summary: (cid?: undefined | string) => Promise<AsObject>

Get a summary of jobs in the user for the specified cids or all cids.

param

An optional cid to get a job summary for, providing no cid means all cids.

returns

An object containing a summary of jobs.

Type declaration

    • (cid?: undefined | string): Promise<AsObject>
    • Parameters

      • Optional cid: undefined | string

      Returns Promise<AsObject>

watch

watch: (handler: (event: AsObject) => void, ...jobs: string[]) => () => void

Listen for job updates for the provided job ids.

param

The callback to receive job updates.

param

A list of job ids to watch.

returns

A function that can be used to cancel watching.

Type declaration

    • (handler: (event: AsObject) => void, ...jobs: string[]): () => void
    • Parameters

      • handler: (event: AsObject) => void
      • Rest ...jobs: string[]

      Returns () => void

        • (): void
        • Returns void

Generated using TypeDoc