@musallam/photoshop-client
    Preparing search index...

    Function pollPhotoshopJob

    • Polls a Photoshop async job until completion

      Type Parameters

      • TResult

      Parameters

      • jobResult: { statusUrl: string }

        The job result containing a jobId from the initial async response

      • options: PollPhotoshopJobOptions<TResult> = {}

        Polling configuration options

      Returns Promise<TResult>

      The final job result when succeeded, with type automatically inferred from the job response

      If max attempts or timeout is reached

      If the job fails

      // Type is automatically inferred as MaskObjectsJobApiResponse
      const result = await pollPhotoshopJob(maskJob, { axiosRequestConfig: { headers } });

      // Type is automatically inferred as document result type
      const docResult = await pollPhotoshopJob(docJob, { axiosRequestConfig: { headers } });