import type EsriError from "../../core/Error.js";
import type Extent from "../../geometry/Extent.js";
import type FeatureEffect from "../../layers/support/FeatureEffect.js";
import type FeatureFilter from "../../layers/support/FeatureFilter.js";
import type FeatureSet from "../../rest/support/FeatureSet.js";
import type Query from "../../rest/support/Query.js";
import type LayerView from "./LayerView.js";
import type { AbortOptions } from "../../core/promiseUtils.js";
import type { QueryProperties } from "../../rest/support/Query.js";
import type { IProxyClientEvents } from "../2d/layers/features/FeaturePipelineWorkerProxy.js";
import type { HighlightLayerViewMixin, HighlightLayerViewMixinProperties } from "./HighlightLayerViewMixin.js";
import type { FeatureEffectProperties } from "../../layers/support/FeatureEffect.js";

export interface StreamLayerViewMixinProperties extends HighlightLayerViewMixinProperties {
  /**
   * The featureEffect can be used to draw attention to features of interest.
   * It allows for the selection of features via a
   * [FeatureEffect#filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureEffect.html#filter), and an
   * [FeatureEffect#includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureEffect.html#includedEffect) and
   * [FeatureEffect#excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureEffect.html#excludedEffect)
   * are applied to those features that respectively pass or fail the filter requirements.
   *
   * If the `featureEffect` is set on the layer, it will be inherited by `layerView.featureEffect` unless the developer overrides it on the layerView. The `layerView.featureEffect`
   * will take precedence over `layer.featureEffect` if both properties are set.
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > FeatureEffect is not supported in the following scenarios:
   * >    * In 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html)
   * >    * When [FeatureReductionCluster](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#featureReduction) is enabled
   * >    * When a map is [printed](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-print.html)
   * > A FeatureEffect set on a layerView cannot persisted in a [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html).
   *
   * @since 4.22
   * @see [StreamLayer#featureEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#featureEffect)
   * @see [Sample - Apply effects to features](https://developers.arcgis.com/javascript/latest/sample-code/featureeffect-geometry/)
   * @see [Sample - Apply drop-shadow effect to a layerView](https://developers.arcgis.com/javascript/latest/sample-code/featureeffect-drop-shadow/)
   * @example
   * // gray out features that fall outside of the 3 mile buffer of the mouse's location
   * // by setting feature effect on excluded features
   * layerView.featureEffect = new FeatureEffect({
   *   filter: new FeatureFilter({
   *     geometry: filterGeometry,
   *     spatialRelationship: "intersects",
   *     distance: 3,
   *     units: "miles"
   *   }),
   *   excludedEffect: "grayscale(100%) opacity(30%)"
   * });
   * @example
   * // Apply a drop-shadow feature effect to the features that intersect the borough boundaries,
   * // while applying blur and brightness effects to the features that are excluded from filter criteria.
   * // The resulting map will make it easier to spot if the residents are more likely to experience deprivation
   * // if they live on a borough boundary.
   * const featureFilter = new FeatureFilter({
   *   where: "BoroughEdge='true'"
   * });
   * layerView.featureEffect = new FeatureEffect({
   *   filter: featureFilter,
   *   includedEffect: "drop-shadow(3px, 3px, 3px, black)",
   *   excludedEffect: "blur(1px) brightness(65%)"
   * });
   */
  featureEffect?: FeatureEffectProperties | null;
}

export interface StreamLayerViewMixinEvents extends IProxyClientEvents {}

/**
 * Represents the [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of a [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html)
 * after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html) in either a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or
 * [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
 *
 * The StreamLayerView is responsible for rendering a [StreamLayer's](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html)
 * features as [graphics](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). The [methods](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#queryExtent)
 * in the StreamLayerView provide developers with the ability to query and highlight graphics in the view. See the
 * code snippets in the [methods](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#queryExtent) below for examples of how to access client-side graphics from the
 * view.
 *
 * It connects to a server that emits geographic features continuously. The stream layer is suitable when you would like
 * to map dynamic streams of data that are unbounded and
 * continuous. When a StreamLayer is added to a map, users are able to see any real-time updates
 * pushed out by the server. For more information, read the documentation of
 * [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html).
 *
 * @since 4.4
 * @see [StreamLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html)
 * @see [Sample - Add StreamLayer to your Map](https://developers.arcgis.com/javascript/latest/sample-code/layers-streamlayer/)
 */
export abstract class StreamLayerViewMixin extends HighlightLayerViewMixin {
  constructor(...args: any[]);
  /**
   * @deprecated
   * Do not directly reference this property.
   * Use EventNames and EventTypes helpers from \@arcgis/core/Evented
   */
  "@eventTypes": StreamLayerViewMixinEvents;
  /**
   * The error that explains an unsuccessful attempt to connect to the
   * stream service or an unexpected disconnection from the stream service.
   */
  get connectionError(): EsriError | null;
  /**
   * The status of the Web Socket connection with the stream service. This property
   * can be watched to see if the connection is lost unexpectedly.
   *
   * Release specific changes:
   * * At version 4.29, [connect()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#connect) and [disconnect()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#disconnect) methods were added.  Consequently, invoking the `disconnect()`
   * method following a `pause` will transition the connection status from `paused` to `disconnected`. Subsequent use of the `connect()` method
   * will then change the connection status to `connected`.
   * * At version 4.26, the `connectionStatus` can be `paused` if the [pause()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#pause) method is called or
   * if the layer becomes {@link views/layers/StreamLayerView#suspended}.
   */
  get connectionStatus(): StreamLayerViewConnectionStatus;
  /**
   * The featureEffect can be used to draw attention to features of interest.
   * It allows for the selection of features via a
   * [FeatureEffect#filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureEffect.html#filter), and an
   * [FeatureEffect#includedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureEffect.html#includedEffect) and
   * [FeatureEffect#excludedEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureEffect.html#excludedEffect)
   * are applied to those features that respectively pass or fail the filter requirements.
   *
   * If the `featureEffect` is set on the layer, it will be inherited by `layerView.featureEffect` unless the developer overrides it on the layerView. The `layerView.featureEffect`
   * will take precedence over `layer.featureEffect` if both properties are set.
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > FeatureEffect is not supported in the following scenarios:
   * >    * In 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html)
   * >    * When [FeatureReductionCluster](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#featureReduction) is enabled
   * >    * When a map is [printed](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-print.html)
   * > A FeatureEffect set on a layerView cannot persisted in a [WebMap](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html).
   *
   * @since 4.22
   * @see [StreamLayer#featureEffect](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-StreamLayer.html#featureEffect)
   * @see [Sample - Apply effects to features](https://developers.arcgis.com/javascript/latest/sample-code/featureeffect-geometry/)
   * @see [Sample - Apply drop-shadow effect to a layerView](https://developers.arcgis.com/javascript/latest/sample-code/featureeffect-drop-shadow/)
   * @example
   * // gray out features that fall outside of the 3 mile buffer of the mouse's location
   * // by setting feature effect on excluded features
   * layerView.featureEffect = new FeatureEffect({
   *   filter: new FeatureFilter({
   *     geometry: filterGeometry,
   *     spatialRelationship: "intersects",
   *     distance: 3,
   *     units: "miles"
   *   }),
   *   excludedEffect: "grayscale(100%) opacity(30%)"
   * });
   * @example
   * // Apply a drop-shadow feature effect to the features that intersect the borough boundaries,
   * // while applying blur and brightness effects to the features that are excluded from filter criteria.
   * // The resulting map will make it easier to spot if the residents are more likely to experience deprivation
   * // if they live on a borough boundary.
   * const featureFilter = new FeatureFilter({
   *   where: "BoroughEdge='true'"
   * });
   * layerView.featureEffect = new FeatureEffect({
   *   filter: featureFilter,
   *   includedEffect: "drop-shadow(3px, 3px, 3px, black)",
   *   excludedEffect: "blur(1px) brightness(65%)"
   * });
   */
  get featureEffect(): FeatureEffect | null | undefined;
  set featureEffect(value: FeatureEffectProperties | null | undefined);
  /**
   * The [attribute](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureFilter.html#where),
   * [FeatureFilter#geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureFilter.html#geometry),
   * and [time extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureFilter.html#timeExtent)
   * filter. Only the features that satisfy the filter are displayed on the view.
   *
   * @since 4.11
   * @see [Sample - Filter features by attributes](https://developers.arcgis.com/javascript/latest/sample-code/featurefilter-attributes/)
   * @see [Sample - Filter features by geometry](https://developers.arcgis.com/javascript/latest/sample-code/layers-scenelayer-feature-masking/)
   * @example
   * // display earthquakes that have
   * // magnitude value of 3 or higher
   * layerView.filter = new FeatureFilter({
   *   where: "mag >= 3",
   * });
   */
  get filter(): FeatureFilter | null | undefined;
  /**
   * Connects to a stream service web socket. The web socket will start streaming new observations.
   * It changes the [connectionStatus](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#connectionStatus) to `connected`.
   *
   * @since 4.29
   * @see [disconnect()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#disconnect)
   */
  connect(): void;
  /**
   * Creates a query parameter object that can be used to fetch features as they are being
   * displayed. It sets the query parameter's [Query#outFields](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html#outFields)
   * property to `["*"]` and [Query#returnGeometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html#returnGeometry) to `true`.
   * The [Query#outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html#outSpatialReference)
   * is set to the spatial reference of the view. Parameters of the [filter](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#filter) currently
   * applied to the layer view are also incorporated in the returned query object. The results will include
   * geometries of features and values for all fields.
   *
   * @returns The query object
   * @since 4.27
   * @example
   * const query = streamLayerView.createQuery();
   * query.where = "status = 'in progress'";
   * csvLayerView.queryFeatures(query).then(function(results) {
   *   console.log(results);
   * })
   * .catch(function(error) {
   *   console.log(error);
   * });
   */
  abstract createQuery(): Query;
  /**
   * Disconnects from a stream service web socket. New observations will not be streamed until [connect()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#connect) method is called.
   * It changes the [connectionStatus](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#connectionStatus) to `disconnected`.
   *
   * @since 4.29
   * @see [connect()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#connect)
   */
  disconnect(): void;
  /**
   * Pauses the connection and stops new observations from being applied until [resume()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#resume) is called.
   * The web socket is open and is still sending data but the layer view will not update.
   * It changes the [connectionStatus](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#connectionStatus) to `paused`.
   *
   * At version 4.29, invoking the [disconnect()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#disconnect) method following a `pause` will transition the [connectionStatus](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#connectionStatus) from `paused` to `disconnected`.
   * Subsequent use of the [connect()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#connect) method will then change the connectionStatus to `connected`.
   *
   * @since 4.26
   * @see [resume()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#resume)
   */
  pause(): void;
  /**
   * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against features available for drawing in the layerView and
   * returns the [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) of features that satisfy the query. If query parameters are
   * not provided, the extent and count of all features available for drawing are returned.
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > Spatial queries have the same limitations as those listed in the [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html)
   * >   documentation.
   * > Spatial queries are not currently supported if the layerView has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html):
   * >   - GDM 2000 (4742) – Malaysia
   * >   - Gusterberg (Ferro) (8042) – Austria/Czech Republic
   * >   - ISN2016 (8086) - Iceland
   * >   - SVY21 (4757) - Singapore
   *
   * @param query - Specifies the attributes, spatial, and temporal filter of the query.
   * When no parameters are passed to this method, all features in the client are returned. To only return features
   * visible in the view, set the `geometry` parameter in the query object to the view's extent.
   * @param options - An object with the following properties.
   * @returns When resolved, returns the extent and count of the features
   * that satisfy the input query. See the object specification table below for details.
   * Property | Type | Description
   * ---------|------|-------------
   * count | Number | The number of features that satisfy the input query.
   * extent | [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html) \| null | The extent of the features that satisfy the query.
   * @since 4.9
   * @example
   * let layer = new StreamLayer({
   *   url: streamLayerUrl  // URL to a stream service
   * });
   *
   * const layerView = await view.whenLayerView(layer);
   * await reactiveUtils.whenOnce(() => !layerView.updating);
   *
   * const results = await layerView.queryExtent()
   * view.goTo(results.extent);  // go to the extent of all the graphics in the layerView
   */
  abstract queryExtent(query?: QueryProperties | null | undefined, options?: AbortOptions): Promise<{
      count: number;
      extent: Extent | null;
  }>;
  /**
   * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against features available for drawing in the layerView
   * and returns the number of features that satisfy the query. If query parameters are not provided,
   * the count of all features available for drawing is returned.
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > Spatial queries have the same limitations as those listed in the [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html)
   * >   documentation.
   * > Spatial queries are not currently supported if the layerView has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html):
   * >   - GDM 2000 (4742) – Malaysia
   * >   - Gusterberg (Ferro) (8042) – Austria/Czech Republic
   * >   - ISN2016 (8086) - Iceland
   * >   - SVY21 (4757) - Singapore
   *
   * @param query - Specifies the attributes, spatial, and temporal filter of the query.
   * When no parameters are passed to this method, all features in the client are returned. To only return features
   * visible in the view, set the `geometry` parameter in the query object to the view's extent.
   * @param options - An object with the following properties.
   * @returns When resolved, returns the number of features satisfying the query.
   * @since 4.9
   * @example
   * view.on("click", function(event){
   *
   *   let query = new Query();
   *   query.geometry = event.mapPoint;  // obtained from a view click event
   *   query.spatialRelationship = "intersects";
   *
   *   view.whenLayerView(layer).then(function(layerView){
   *     reactiveUtils.whenOnce(() => !layerView.updating)
   *     .then(function(){
   *       return layerView.queryFeatureCount(query);
   *     })
   *     .then(function(count){
   *       console.log(count);  // prints the number of the client-side graphics that satisfy the query
   *     });
   *   });
   * });
   * @example
   * view.whenLayerView(layer).then(function(layerView){
   *   return layerView.queryFeatureCount()
   * }).then(function(count){
   *   console.log(count);  // prints the total number of client-side graphics to the console
   * });
   */
  abstract queryFeatureCount(query?: QueryProperties | null | undefined, options?: AbortOptions): Promise<number>;
  /**
   * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against features available for drawing in the layerView
   * and returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html). If query parameters are not provided,
   * all features available for drawing are returned.
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > Spatial queries have the same limitations as those listed in the [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html)
   * >   documentation.
   * > Spatial queries are not currently supported if the layerView has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html):
   * >   - GDM 2000 (4742) – Malaysia
   * >   - Gusterberg (Ferro) (8042) – Austria/Czech Republic
   * >   - ISN2016 (8086) - Iceland
   * >   - SVY21 (4757) - Singapore
   *
   * @param query - Specifies the attributes, spatial, and temporal filter of the query.
   * When no parameters are passed to this method, all features in the client are returned. To only return features
   * visible in the view, set the `geometry` parameter in the query object to the view's extent.
   * @param options - An object with the following properties.
   * @returns When resolved, a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html) containing
   * an array of graphic features is returned.
   * @since 4.9
   * @example
   * const layerView = await view.whenLayerView(layer);
   * await reactiveUtils.whenOnce(() => !layerView.updating);
   *
   * const results = await layerView.queryFeatures(query);
   * console.log(results.features);  // prints the array of client-side graphics to the console
   * @example
   * // returns all the graphics from the layerView
   * const layerView = await view.whenLayerView(layer);
   * await reactiveUtils.whenOnce(() => !layerView.updating);
   *
   * const results = await layerView.queryFeatures()
   * console.log(results.features);  // prints all the client-side graphics to the console
   */
  abstract queryFeatures(query?: QueryProperties | null | undefined, options?: AbortOptions): Promise<FeatureSet>;
  /**
   * If a [TimeInfo#trackIdField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-TimeInfo.html#trackIdField) is specified on the stream service,
   * this method executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against features available for drawing in the layerView and
   * returns a [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html) of the latest observations for each `trackId`
   * that satisfy the query. Otherwise, an [Error](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html) will be thrown when the method is called.
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > Spatial queries have the same limitations as those listed in the [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html)
   * >   documentation.
   * > Spatial queries are not currently supported if the layerView has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html):
   * >   - GDM 2000 (4742) – Malaysia
   * >   - Gusterberg (Ferro) (8042) – Austria/Czech Republic
   * >   - ISN2016 (8086) - Iceland
   * >   - SVY21 (4757) - Singapore
   *
   * @param query - Specifies the attributes, spatial, and temporal filter of the query.
   * When no parameters are passed to this method, all features in the client are returned. To only return features
   * visible in the view, set the `geometry` parameter in the query object to the view's extent.
   * @param options - An object with the following properties.
   * @returns When resolved, returns the [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html) that satisfy the input query.
   * @since 4.9
   * @example
   * let layer = new StreamLayer({
   *   url: streamLayerUrl  // URL to a Stream Service
   * });
   *
   * const layerView = await view.whenLayerView(layer);
   * await reactiveUtils.whenOnce(() => !layerView.updating);
   *
   * const results = await layerView.queryLatestObservations()
   * console.log(results.features);  // prints all the client-side graphics to the console
   */
  abstract queryLatestObservations(query?: Query, options?: AbortOptions): Promise<FeatureSet>;
  /**
   * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against features available for drawing in
   * the layerView and returns array of the ObjectIDs of features that satisfy the input query. If
   * query parameters are not provided, the ObjectIDs of all features available for drawing are returned.
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > Spatial queries have the same limitations as those listed in the [projectOperator](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html)
   * >   documentation.
   * > Spatial queries are not currently supported if the layerView has any of the following [SpatialReferences](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-SpatialReference.html):
   * >   - GDM 2000 (4742) – Malaysia
   * >   - Gusterberg (Ferro) (8042) – Austria/Czech Republic
   * >   - ISN2016 (8086) - Iceland
   * >   - SVY21 (4757) - Singapore
   *
   * @param query - Specifies the attributes, spatial, and temporal filter of the query.
   * When no parameters are passed to this method, all features in the client are returned. To only return features
   * visible in the view, set the `geometry` parameter in the query object to the view's extent.
   * @param options - An object with the following properties.
   * @returns When resolved, returns an array of numbers representing the ObjectIDs of the features
   *                   satisfying the query.
   * @since 4.9
   * @example
   * view.on("click", function(event){
   *
   *   let query = new Query();
   *   query.geometry = event.mapPoint;  // obtained from a view click event
   *   query.spatialRelationship = "intersects";
   *
   *   view.whenLayerView(layer).then(function(layerView){
   *     reactiveUtils.whenOnce(() => !layerView.updating)
   *     .then(function(){
   *       return layerView.queryObjectIds(query);
   *     })
   *     .then(function(ids){
   *       console.log(ids);  // prints the ids of the client-side graphics to the console
   *     });
   *   });
   * });
   * @example
   * // returns all the Ids from the graphics in the layerView
   * view.whenLayerView(layer).then(function(layerView){
   *   return layerView.queryObjectIds()
   * }).then(function(ids){
   *   console.log(ids);  // prints the ids of all the client-side graphics to the console
   * });
   */
  abstract queryObjectIds(query?: QueryProperties | null | undefined, options?: AbortOptions): Promise<number[]>;
  /**
   * Resumes the connection and the new observations will be applied. The layer view will update to show changes.
   * It changes the [connectionStatus](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#connectionStatus) to `connected` if the connection is successful.
   * If the `connectionStatus` is set to `disconnected`, invoking this method will have no impact.
   *
   * @since 4.26
   * @see [pause()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-StreamLayerView.html#pause)
   */
  resume(): void;
}

export type StreamLayerViewConnectionStatus = "connected" | "disconnected" | "paused";

export abstract class StreamLayerView extends StreamLayerViewSuperclass {}
declare const StreamLayerViewSuperclass: & typeof LayerView & typeof StreamLayerViewMixin