/**
 * Performs an identify operation on the layers of a map service exposed by the ArcGIS
 * Server REST API. Use [IdentifyParameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-IdentifyParameters.html) to set the parameters
 * for the identify operation and [IdentifyResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-IdentifyResult.html) to work with
 * the results.
 *
 * > [!WARNING]
 * >
 * > **Known Limitations**
 * >
 * > The identify operation is currently not supported if attempting to be used
 * > in a 3D [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html)
 *
 * @since 4.19
 * @see [IdentifyParameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-IdentifyParameters.html)
 * @see [IdentifyResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-IdentifyResult.html)
 * @see [Identify - ArcGIS Server REST API](https://developers.arcgis.com/rest/services-reference/identify-map-service-.htm)
 * @see [Sample - Identify](https://developers.arcgis.com/javascript/latest/sample-code/identify/)
 */
import type IdentifyParameters from "./support/IdentifyParameters.js";
import type IdentifyResult from "./support/IdentifyResult.js";
import type { RequestOptions } from "../request/types.js";

/** The results returned from the [identify()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-identify.html#identify) operation. */
export interface IdentifyResults {
  /** An array of objects containing the result features of the Identify task. */
  results: IdentifyResult[];
  /** Included in the response only if the result exceeded the transfer limit. */
  exceededTransferLimit?: boolean;
}

/**
 * Sends a request to the ArcGIS REST map service resource to identify features based on the
 * [IdentifyParameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-IdentifyParameters.html) specified.
 *
 * @param url - URL to the ArcGIS Server REST resource that represents a map service.
 * @param params - Specifies the criteria used to identify the features.
 * @param requestOptions - Additional [options](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#request) to be used for the data request.
 */
export function identify(url: string, params: IdentifyParameters, requestOptions?: RequestOptions): Promise<IdentifyResults>;