@squidcloud/client
    Preparing search index...

    Class JobClient

    Handles job subscriptions and notifications.

    Important: Each jobId must be globally unique and kept private. Anyone who knows a job’s ID can query its status or result.

    Index

    Methods

    • Waits until the specified job finishes, then resolves with its result or throws if the job fails.

      Type Parameters

      • T = any

      Parameters

      • jobId: string

        A unique, private identifier for the job. Do not reuse a jobId across clients—possessing the ID allows anyone to inspect the job’s state.

      Returns Promise<T>

    • Retrieves the current status (and, if completed, the result) of a job.

      Type Parameters

      • T = any

      Parameters

      • jobId: string

        A unique, private identifier for the job. Do not reuse a jobId across clients—possessing the ID allows anyone to inspect the job’s state.

      Returns Promise<undefined | AsyncJob<T>>