/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

import { ultraBlurGetColors } from "../funcs/ultraBlurGetColors.js";
import { ultraBlurGetImage } from "../funcs/ultraBlurGetImage.js";
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
import * as operations from "./models/operations/index.js";
import { unwrapAsync } from "./types/fp.js";

export class UltraBlur extends ClientSDK {
  /**
   * Get UltraBlur Colors
   *
   * @remarks
   * Retrieves the four colors extracted from an image for clients to use to generate an ultrablur image.
   */
  async getColors(
    request: operations.GetColorsRequest,
    options?: RequestOptions,
  ): Promise<operations.GetColorsResponse> {
    return unwrapAsync(ultraBlurGetColors(
      this,
      request,
      options,
    ));
  }

  /**
   * Get UltraBlur Image
   *
   * @remarks
   * Retrieves a server-side generated UltraBlur image based on the provided color inputs. Clients should always call this via the photo transcoder endpoint.
   */
  async getImage(
    request: operations.GetImageRequest,
    options?: RequestOptions,
  ): Promise<operations.GetImageResponse> {
    return unwrapAsync(ultraBlurGetImage(
      this,
      request,
      options,
    ));
  }
}
