@inweb/client
    Preparing search index...

    Class Job

    Provides properties and methods for obtaining information about a job on the Open Cloud Server.

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • data: any

        Raw job data received from the server. For more information, see Open Cloud Jobs API.

      • httpClient: IHttpClient

        HTTP client instance used to send requests to the REST API server.

      Returns Job

    Properties

    headers: HeadersInit

    Endpoint-specific HTTP headers for the GET, POST, PUT and DELETE requests. You can add custom headers at any time.

    path: string

    Endpoint API path relative to the REST API server URL.

    Accessors

    • get assemblyId(): string

      The ID of the assembly the job is working on (internal).

      Returns string

    • get authorId(): string

      Job owner ID (the user who created the job). Use Client.getUser() to obtain detailed user information.

      Returns string

    • get createdAt(): string

      Job creation time (UTC) in the format specified in ISO 8601.

      Returns string

    • get data(): any

      Raw job data received from the server. For more information, see Open Cloud Jobs API.

      Returns any

    • get done(): boolean

      true if job is done or failed. See status for more details.

      Returns boolean

    • get fileId(): string

      The ID of the file the job is working on.

      Returns string

    • get id(): string

      Unique job ID.

      Returns string

    • get lastUpdate(): string

      Job last update (UTC) time in the format specified in ISO 8601.

      Returns string

    • get outputFormat(): string

      Job type. Can be one of:

      • geometry - Convert file geometry data to VSFX format.
      • geometryGltf - Convert file geometry data to glTF format.
      • properties - Extract file properties.
      • validation - Validate the IFC file.
      • clash - Create the clash detection report.
      • dwg, obj, gltf, glb, vsf, pdf, 3dpdf - Export file to the specified format.
      • Other custom job name.

      Returns string

    • get parameters(): any

      Parameters with which the job was started. For more information, see Open Cloud Jobs API.

      Returns any

    • get startedAt(): string

      Job starting time (UTC) in the format specified in ISO 8601.

      Returns string

    • get status(): string

      Job status. Can be waiting, inprogress, done, or failed.

      Returns string

    • get statusMessage(): string

      Job status description message.

      Returns string

    Methods

    • Reloads job data from the server.

      Returns Promise<Job>

    • Deletes a job from the server.

      You cannot delete other users' jobs unless you are an administrator.

      You can only delete jobs that are in the waiting status (jobs that have been created but not yet started). Jobs that are currently running (inprogress) or have already completed (done or failed) cannot be deleted.

      Returns Promise<any>

      Returns the raw data of a deleted job. For more information, see Open Cloud Jobs API.

    • Updates job data on the server.

      Only administrators can update job data. If the current logged in user is not an administrator, an exception will be thrown.

      Parameters

      Returns Promise<Job>

    • Waits for job to be done. Job is done when it changes to done or failed status.

      Parameters

      • Optionalparams: {
            interval?: number;
            onCheckout?: (job: Job, ready: boolean) => boolean;
            signal?: AbortSignal;
            timeout?: number;
        }

        An object containing waiting parameters.

        • Optionalinterval?: number

          The time, in milliseconds, the function should delay in between checking job status.

        • OptionalonCheckout?: (job: Job, ready: boolean) => boolean

          Waiting progress callback. Return true to cancel waiting.

        • Optionalsignal?: AbortSignal

          An AbortController signal, which can be used to abort waiting as desired.

        • Optionaltimeout?: number

          The time, in milliseconds that the function should wait for the job. If the job is not done during this time, the TimeoutError exception will be thrown.

      Returns Promise<Job>