import type { JSONSupport } from "../../core/JSONSupport.js";

export interface GraphObjectProperties extends Partial<Pick<GraphObject, "properties">> {}

/**
 * This is the parent class of all objects that can be represented on a graph structure or graph query - [Entity](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-Entity.html),
 * [Relationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-Relationship.html), [Path](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-Path.html), and anonymous object.
 * An anonymous object is any object that is not specifically an `entity`, `relationship`, or `path`.
 *
 * @since 4.25
 * @see [GraphNamedObject](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-GraphNamedObject.html)
 * @see [Relationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-Relationship.html)
 * @see [Entity](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-Entity.html)
 */
export default class GraphObject extends JSONSupport {
  constructor(properties?: GraphObjectProperties);
  /**
   * The properties of the graph object. For [entities](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-Entity.html) and [relationships](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-Relationship.html)
   * the properties are specified by its [entity type](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-EntityType.html) or [relationship type](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-RelationshipType.html).
   * The values of the properties are specific to the object.
   *
   * @example
   * //example of properties structure that includes geometry
   * "properties": {
   *   "shape": {
   *     "declaredClass": "esri.geometry.Point",
   *     "cache": {},
   *     "hasM": false,
   *     "hasZ": false,
   *     "latitude": 53.589000000000009,
   *     "longitude": -0.9633,
   *     "type": "point",
   *     "extent": null,
   *     "spatialReference": {
   *       "wkid": 4326
   *     },
   *     "x": -0.9633,
   *     "y": 53.589000000000009
   *   },
   *   "Name": "Suncommon",
   *   "Employee_Count": 400,
   *   "Address": "123 Broadway, New York, New York",
   *   "EnergyType": "solar"
   * }
   * @example
   * //two entities of different entity types with different properties
   * [{
   *   "declaredClass": "esri.rest.knowledgeGraph.Entity",
   *   "properties": {
   *     "Name": "Suncommon",
   *     "Employee_Count": 400,
   *     "energyType": "solar"
   *   },
   *   "typeName": "Company",
   *   "id": "1256"
   * },
   * {
   *   "declaredClass": "esri.rest.knowledgeGraph.Entity",
   *   "properties": {
   *     "Name": "Empire State Building",
   *     "height": 1454,
   *     "heightUnits": "feet",
   *     "city": "New York"
   *   },
   *   "typeName": "Building",
   *   "id": "B7889541"
   * }]
   * @example
   * //two relationships of different relationship types with different properties
   * [{
   *   "declaredClass": "esri.rest.Relationship.Relationship",
   *   "properties": {
   *     "start_date": "2020-04-17",
   *     "employee_id": "4589",
   *     "office": "152 Building A"
   *   },
   *   "typeName": "Employed_by",
   *   "id": "B7889541"
   * },
   * {
   *   "declaredClass": "esri.rest.Relationship.Relationship",
   *   "properties": {
   *     "quantity": 125000,
   *     "frequency": "bi-weekly",
   *     "contact_person": "Betty White"
   *   },
   *   "typeName": "buys_part",
   *   "id": "B7889541"
   * }]
   */
  accessor properties: Record<string, any>;
}