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 {
  /** 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. */
  readonly featureServiceUrl: string;
  /** The current gdbVersion of a versionable item. */
  gdbVersion?: string | null;
  /** The current moment of a versionable item. */
  historicMoment?: Date | null;
  /** The type of versionable item. */
  type: "feature-layer" | "subtype-group-layer" | "network";
  /** Contains items with the `gdbVersion` property. */
  versionableItem: FeatureLayer | Network | SubtypeGroupLayer;
}