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

    Function pollFireflyJob

    • Polls a Firefly async job until completion

      Type Parameters

      • TResult

      Parameters

      • jobResult: { statusUrl: string }

        The job result containing a statusUrl from the initial async response

      • options: PollFireflyJobOptions<TResult> = {}

        Polling configuration options

      Returns Promise<JobStatus<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 or is canceled

      // Type is automatically inferred as GenerateImagesResponseV3
      const result = await pollJob(imageJob, { axiosRequestConfig: { headers } });

      // Type is automatically inferred as video result type
      const videoResult = await pollJob(videoJob, { axiosRequestConfig: { headers } });