import { ImagePipeline } from "upload-image-plugin/params/ImagePipeline";

export type ParamsFromFile = ParamsFromFileLegacy | ParamsFromFileNew;

export interface ParamsFromFileBase {
  pipeline: ImagePipeline;
}

export interface ParamsFromFileLegacy extends ParamsFromFileBase {
  /**
   * Legacy (used by many existing image crop JSON files).
   *
   * File ID for the original image to transform.
   */
  input: string;
  inputPath: undefined;
}

export interface ParamsFromFileNew extends ParamsFromFileBase {
  input: undefined;
  /**
   * Relative path to the original image to transform.
   */
  inputPath: string;
}
