import type GraphObject from "./GraphObject.js";
import type { GraphObjectProperties } from "./GraphObject.js";

export interface GraphNamedObjectProperties extends GraphObjectProperties, Partial<Pick<GraphNamedObject, "id" | "typeName">> {}

/**
 * The parent class for an [Entity](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraph/Entity/) or [Relationship](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraph/Relationship/) that is defined in the graph schema.
 * Specifies the shared properties between entities and relationships.
 *
 * @since 4.25
 * @see [GraphObject](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraph/GraphObject/)
 * @see [Entity](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraph/Entity/)
 * @see [Relationship](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraph/Relationship/)
 */
export default abstract class GraphNamedObject extends GraphObject {
  constructor(properties?: GraphNamedObjectProperties);
  /** The unique ID of the object. */
  accessor id: string;
  /**
   * Specifies the name for all similar types of objects ([entities](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraph/Entity/) or [relationships](https://developers.arcgis.com/javascript/latest/references/core/rest/knowledgeGraph/Relationship/)) defined in the knowledge graph.
   * For example, all 'employee' entities in a knowledge graph of an organization might have the typeName 'employee'.
   */
  accessor typeName: string;
}