import type FeatureLayer from "../../layers/FeatureLayer.js";
import type SubtypeGroupLayer from "../../layers/SubtypeGroupLayer.js";
import type Network from "../../networks/Network.js";

/**
 * Contains information on versionable items such as type, current gdbVersion, current historic moment, and the featureService url of the versionable item.
 *
 * @since 4.30
 */
export interface VersionAdapter {
  /**
   * Contains items with the `gdbVersion` property.
   *
   * @since 5.0
   */
  versionableItem: FeatureLayer | Network | SubtypeGroupLayer;
  /**
   * The type of versionable item.
   *
   * @since 5.0
   */
  type: "feature-layer" | "subtype-group-layer" | "network";
  /**
   * The current gdbVersion of a versionable item.
   *
   * @since 5.0
   */
  gdbVersion?: string | null;
  /**
   * The current moment of a versionable item.
   *
   * @since 5.0
   */
  historicMoment?: Date | null;
  /**
   * A read only property that contains the [FeatureService](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-featureService-FeatureService.html) url of a versionable item.
   *
   * @since 5.0
   */
  readonly featureServiceUrl: string;
}