import type Graphic from "../../Graphic.js";
import type PopupTemplate from "../../PopupTemplate.js";
import type FormTemplate from "../../form/FormTemplate.js";
import type SpatialReference from "../../geometry/SpatialReference.js";
import type SubtypeGroupLayer from "../SubtypeGroupLayer.js";
import type Domain from "./Domain.js";
import type FeatureTemplate from "./FeatureTemplate.js";
import type Field from "./Field.js";
import type FieldsIndex from "./FieldsIndex.js";
import type LabelClass from "./LabelClass.js";
import type Relationship from "./Relationship.js";
import type ClassBreaksRenderer from "../../renderers/ClassBreaksRenderer.js";
import type SimpleRenderer from "../../renderers/SimpleRenderer.js";
import type UniqueValueRenderer from "../../renderers/UniqueValueRenderer.js";
import type AttachmentInfo from "../../rest/query/support/AttachmentInfo.js";
import type AttachmentQuery from "../../rest/support/AttachmentQuery.js";
import type FeatureSet from "../../rest/support/FeatureSet.js";
import type Query from "../../rest/support/Query.js";
import type AttributeTableTemplate from "../../tables/AttributeTableTemplate.js";
import type { ClonableMixin } from "../../core/Clonable.js";
import type { IdentifiableMixin, IdentifiableMixinProperties } from "../../core/Identifiable.js";
import type { Loadable, LoadableMixinProperties } from "../../core/Loadable.js";
import type { MultiOriginJSONSupportMixin } from "../../core/MultiOriginJSONSupport.js";
import type { FeatureLayerCapabilities, FeatureTitleOptions } from "../types.js";
import type { EditOptions, Edits, EditsResult, FeatureEditResult } from "../graphics/editingSupport.js";
import type { RequestOptions } from "../../request/types.js";
import type { AttachmentQueryProperties } from "../../rest/support/AttachmentQuery.js";
import type { QueryProperties } from "../../rest/support/Query.js";
import type { RelationshipQueryProperties } from "../../rest/support/RelationshipQuery.js";
import type { CreatePopupTemplateOptions } from "../../support/popupUtils.js";
import type { AttributeTableTemplateProperties } from "../../tables/AttributeTableTemplate.js";
import type { FormTemplateProperties } from "../../form/FormTemplate.js";
import type { LabelClassProperties } from "./LabelClass.js";
import type { PopupTemplateProperties } from "../../PopupTemplate.js";
import type { UniqueValueRendererProperties } from "../../renderers/UniqueValueRenderer.js";
import type { ClassBreaksRendererProperties } from "../../renderers/ClassBreaksRenderer.js";
import type { SimpleRendererProperties } from "../../renderers/SimpleRenderer.js";
import type { FeatureTemplateProperties } from "./FeatureTemplate.js";

export interface SubtypeSublayerProperties extends LoadableMixinProperties, IdentifiableMixinProperties, Partial<Pick<SubtypeSublayer, "editingEnabled" | "id" | "labelsVisible" | "legendEnabled" | "listMode" | "maxScale" | "minScale" | "opacity" | "parent" | "popupEnabled" | "subtypeCode" | "title" | "visible">> {
  /**
   * This property is used to configure the associated layer's [FeatureTable](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html). It is meant to configure how the columns display within the table in regard to visibility, column order, and sorting.
   *
   * > [!WARNING]
   * >
   * > This property differs from the table's [FeatureTable's tableTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-support-TableTemplate.html) property. The `TableTemplate` provides more fine-grained control over how the table is rendered within the application by offering more advanced configurations such as custom cell rendering, column formatting, and more. `TableTemplate` is useful for application-level development that remains within an application. Use the `attributeTableTemplate` property to access the table's settings across different applications. By using this property, the settings can be saved within a webmap or layer. Please refer to the [AttributeTableTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-tables-AttributeTableTemplate.html) and [TableTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-support-TableTemplate.html) documentation for more information.
   *
   * @since 4.31
   */
  attributeTableTemplate?: AttributeTableTemplateProperties | null;
  /**
   * The [template](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-FormTemplate.html) used in an associated layer's [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html). All of the properties and field configurations set on the layer's [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html) are handled via the [FormTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-FormTemplate.html).
   *
   * @see [Sample - Update Feature Attributes](https://developers.arcgis.com/javascript/latest/sample-code/editing-groupedfeatureform/)
   * @example
   * // Create the Field Elements to pass into the template
   * const fieldElement1 = new FieldElement({
   *   fieldName: "firstname",
   *   label: "First name",
   *   description: "First name of emergency contact"
   * });
   *
   * const fieldElement2 = new FieldElement({
   *   fieldName: "lastname",
   *   label: "Last name",
   *   description: "Last name of emergency contact"
   * });
   *
   * // Create the form's template
   * const formTemplate = new FormTemplate({
   *   title: "Emergency information",
   *   description: "In case of emergency, update any additional information needed",
   *   elements: [fieldElement1, fieldElement2] // pass in array of field elements from above
   * });
   *
   * // Pass the template to the layer
   * subtypeSublayer.formTemplate = formTemplate;
   *
   * // Pass the layer to the FeatureForm
   * const form = new FeatureForm({
   *   container: "form", // html div referencing the form
   *   layer: subtypeSublayer
   * });
   */
  formTemplate?: FormTemplateProperties | null;
  /**
   * The label definition for this layer, specified as an array of
   * [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify
   * labeling properties for the layer such as label expression, placement, and size.
   *
   * Multiple Label classes with different `where` clauses can be used to define several
   * labels with varying styles on the same feature. Likewise, multiple label classes
   * may be used to label different types of features (for example blue labels
   * for lakes and green labels for parks).
   *
   * See the [Labeling guide page](https://developers.arcgis.com/javascript/latest/labeling/) for more information and known limitations.
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only support displaying one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) per feature.
   *
   * @see [Sample: Add multiple label classes to a layer](https://developers.arcgis.com/javascript/latest/sample-code/labels-multiple-classes/)
   * @see [Sample: Multi-line labels](https://developers.arcgis.com/javascript/latest/sample-code/labels-multiline/)
   * @see [Sample: Flat vs. volumetric 3D symbol layers](https://developers.arcgis.com/javascript/latest/sample-code/symbols-points-3d/)
   * @example
   * const statesLabelClass = new LabelClass({
   *   labelExpressionInfo: { expression: "$feature.NAME" },
   *   symbol: {
   *     type: "text",  // autocasts as new TextSymbol()
   *     color: "black",
   *     haloSize: 1,
   *     haloColor: "white"
   *   }
   * });
   *
   * subtypeSubLayer.labelingInfo = [ statesLabelClass ];
   */
  labelingInfo?: LabelClassProperties[] | null;
  /**
   * The popup template for the layer. When set on the layer, the `popupTemplate`
   * allows users to access attributes and display their values in the
   * view's Popup when a feature is selected
   * using text and/or charts.
   *
   * A default popup template is automatically used if no `popupTemplate` has been defined when
   * [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled)
   * is set to `true`.
   *
   * @see [createPopupTemplate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#createPopupTemplate)
   * @see [SceneView.popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#popup)
   * @see [View2D.popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#popup)
   */
  popupTemplate?: PopupTemplateProperties | null;
  /**
   * The renderer assigned to the layer. The renderer defines how to
   * visualize each feature in the layer. Depending on the renderer type,
   * features may be visualized with the same symbol, or with varying symbols
   * based on the values of provided attribute fields or functions.
   *
   * @example
   * // all features in the layer will be visualized with
   * // a 6pt black marker symbol and a thin, white outline
   * layer.renderer = {
   *   type: "simple",  // autocasts as new SimpleRenderer()
   *   symbol: {
   *     type: "simple-marker",  // autocasts as new SimpleMarkerSymbol()
   *     size: 6,
   *     color: "black",
   *     outline: {  // autocasts as new SimpleLineSymbol()
   *       width: 0.5,
   *       color: "white"
   *     }
   *   }
   * };
   */
  renderer?: (SimpleRendererProperties & { type: "simple" }) | (ClassBreaksRendererProperties & { type: "class-breaks" }) | (UniqueValueRendererProperties & { type: "unique-value" }) | null;
  /**
   * An array of feature templates defined in the feature layer.
   * See [ArcGIS Pro subtypes document](https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/an-overview-of-subtypes.htm).
   */
  templates?: FeatureTemplateProperties[] | null;
}

/**
 * Represents a sublayer in a [SubtypeGroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SubtypeGroupLayer.html). Each SubtypeSublayer
 * is not a standalone service, but rather each sublayer corresponds to one subtype in the source feature service. This pattern allows
 * each sublayer to be symbolized independently of one another, without requiring an individual service per sublayer. This relationship differs from
 * the relationship between the [MapImageLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html) and its sublayers. In the case with the MapImageLayer, its sublayers
 * represent individual map services.
 *
 * The SubtypeSublayers are identified by their unique [subtypeCode](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#subtypeCode). You can configure the properties of each sublayer while
 * initializing the SubtypeGroupLayer
 *
 * @since 4.20
 * @see [SubtypeGroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SubtypeGroupLayer.html)
 * @see [Sample - Intro to SubtypeGroupLayer](https://developers.arcgis.com/javascript/latest/sample-code/layers-subtypegrouplayer/)
 * @example
 * // Only includes one SubtypeSublayer from the SubtypeGroupLayer
 * let layer = new SuptypeGroupLayer({
 *   url: "https://sampleserver7.arcgisonline.com/server/rest/services/UtilityNetwork/NapervilleElectric/FeatureServer/0",
 *   sublayers: [{  // autocasts as a Collection of SubtypeSublayers
 *     subtypeCode: 14,
 *     visible: true,
 *     renderer: {
 *       type: "simple",  // autocasts as a SimpleRenderer()
 *       symbol: {
 *         type: "simple-marker",  // autocasts as a SimpleMarkerSymbol()
 *         style: "circle",
 *         color: [120, 120, 120, 255],
 *         size: 6
 *       }
 *     }
 *   }]
 * });
 */
export default class SubtypeSublayer extends SubtypeSublayerSuperclass {
  constructor(properties?: SubtypeSublayerProperties);
  /**
   * This property is used to configure the associated layer's [FeatureTable](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html). It is meant to configure how the columns display within the table in regard to visibility, column order, and sorting.
   *
   * > [!WARNING]
   * >
   * > This property differs from the table's [FeatureTable's tableTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-support-TableTemplate.html) property. The `TableTemplate` provides more fine-grained control over how the table is rendered within the application by offering more advanced configurations such as custom cell rendering, column formatting, and more. `TableTemplate` is useful for application-level development that remains within an application. Use the `attributeTableTemplate` property to access the table's settings across different applications. By using this property, the settings can be saved within a webmap or layer. Please refer to the [AttributeTableTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-tables-AttributeTableTemplate.html) and [TableTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-support-TableTemplate.html) documentation for more information.
   *
   * @since 4.31
   */
  get attributeTableTemplate(): AttributeTableTemplate | null | undefined;
  set attributeTableTemplate(value: AttributeTableTemplateProperties | null | undefined);
  /**
   * Describes the layer's supported capabilities.
   *
   * @since 4.27
   */
  get capabilities(): FeatureLayerCapabilities | null | undefined;
  /**
   * Determines if the layer is editable.
   *
   * @default true
   * @see [applyEdits()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#applyEdits)
   */
  accessor editingEnabled: boolean;
  /** Describes effective capabilities of the layer taking in to consideration privileges of the currently signed-in user. */
  get effectiveCapabilities(): FeatureLayerCapabilities | null | undefined;
  /**
   * Indicates whether the layer is editable taking in to consideration privileges of the
   * currently signed-in user and whether the parent subtype group layer is editable or not.
   *
   * @since 4.26
   */
  get effectiveEditingEnabled(): boolean;
  /**
   * An array of fields in the layer. Each field represents an attribute
   * that may contain a value for each feature in the layer. For example,
   * a field named `POP_2015`, stores information about total population as a
   * numeric value for each feature; this value represents the total number
   * of people living within the geographic bounds of the feature.
   *
   * @example
   * // define each field's schema
   * const fields = [
   *  new Field({
   *    name: "ObjectID",
   *    alias: "ObjectID",
   *    type: "oid"
   *  }), new Field({
   *    name: "description",
   *    alias: "Description",
   *    type: "string"
   *  }), new Field ({
   *    name: "title",
   *    alias: "Title",
   *    type: "string"
   *  })
   * ];
   *
   * // See the sample snippet for the source property
   * const layer = new SubtypeSublayer({
   *   // Object ID field is inferred from the fields array
   *   fields: fields
   * });
   */
  get fields(): Field[];
  /**
   * A convenient property that can be used to make case-insensitive lookups for a field by name.
   * It can also provide a list of the [date fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FieldsIndex.html#dateFields) in a layer.
   *
   * @example
   * // lookup a field by name. name is case-insensitive
   * const field = layer.fieldsIndex.get("someField");
   *
   * if (field) {
   *   console.log(field.name); // SomeField
   * }
   */
  get fieldsIndex(): FieldsIndex<Field>;
  /**
   * The [template](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-FormTemplate.html) used in an associated layer's [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html). All of the properties and field configurations set on the layer's [FeatureForm](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html) are handled via the [FormTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-FormTemplate.html).
   *
   * @see [Sample - Update Feature Attributes](https://developers.arcgis.com/javascript/latest/sample-code/editing-groupedfeatureform/)
   * @example
   * // Create the Field Elements to pass into the template
   * const fieldElement1 = new FieldElement({
   *   fieldName: "firstname",
   *   label: "First name",
   *   description: "First name of emergency contact"
   * });
   *
   * const fieldElement2 = new FieldElement({
   *   fieldName: "lastname",
   *   label: "Last name",
   *   description: "Last name of emergency contact"
   * });
   *
   * // Create the form's template
   * const formTemplate = new FormTemplate({
   *   title: "Emergency information",
   *   description: "In case of emergency, update any additional information needed",
   *   elements: [fieldElement1, fieldElement2] // pass in array of field elements from above
   * });
   *
   * // Pass the template to the layer
   * subtypeSublayer.formTemplate = formTemplate;
   *
   * // Pass the layer to the FeatureForm
   * const form = new FeatureForm({
   *   container: "form", // html div referencing the form
   *   layer: subtypeSublayer
   * });
   */
  get formTemplate(): FormTemplate | null | undefined;
  set formTemplate(value: FormTemplateProperties | null | undefined);
  /**
   * The geometry type of features in the layer. All features must be of the same type.
   *
   * @since 4.27
   */
  get geometryType(): SubtypeGroupLayer["geometryType"] | null | undefined;
  /**
   * The name of an `guid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#fields) containing
   * a unique value or identifier for each feature in the layer.
   *
   * @see [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#fields)
   * @see [Add an array of client-side features](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#client-side)
   */
  get globalIdField(): string | null | undefined;
  /** The unique ID assigned to the layer. */
  accessor id: string;
  /**
   * The label definition for this layer, specified as an array of
   * [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html). Use this property to specify
   * labeling properties for the layer such as label expression, placement, and size.
   *
   * Multiple Label classes with different `where` clauses can be used to define several
   * labels with varying styles on the same feature. Likewise, multiple label classes
   * may be used to label different types of features (for example blue labels
   * for lakes and green labels for parks).
   *
   * See the [Labeling guide page](https://developers.arcgis.com/javascript/latest/labeling/) for more information and known limitations.
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only support displaying one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) per feature.
   *
   * @see [Sample: Add multiple label classes to a layer](https://developers.arcgis.com/javascript/latest/sample-code/labels-multiple-classes/)
   * @see [Sample: Multi-line labels](https://developers.arcgis.com/javascript/latest/sample-code/labels-multiline/)
   * @see [Sample: Flat vs. volumetric 3D symbol layers](https://developers.arcgis.com/javascript/latest/sample-code/symbols-points-3d/)
   * @example
   * const statesLabelClass = new LabelClass({
   *   labelExpressionInfo: { expression: "$feature.NAME" },
   *   symbol: {
   *     type: "text",  // autocasts as new TextSymbol()
   *     color: "black",
   *     haloSize: 1,
   *     haloColor: "white"
   *   }
   * });
   *
   * subtypeSubLayer.labelingInfo = [ statesLabelClass ];
   */
  get labelingInfo(): LabelClass[] | null | undefined;
  set labelingInfo(value: LabelClassProperties[] | null | undefined);
  /**
   * Indicates whether to display labels for this layer. If `true`, labels will
   * appear as defined in the [labelingInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#labelingInfo) property.
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) only support displaying one [LabelClass](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html) per feature.
   *
   * @default true
   */
  accessor labelsVisible: boolean;
  /**
   * Indicates whether the layer will be included in the legend.
   *
   * @default true
   */
  accessor legendEnabled: boolean;
  /**
   * Indicates how the layer should display in the [LayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html) widget.
   * The possible values are listed below.
   *
   * Value | Description
   * ------|------------
   *  show | The layer is visible in the table of contents.
   *  hide | The layer is hidden in the table of contents.
   *
   * @default "show"
   */
  accessor listMode: "show" | "hide";
  /**
   * The maximum scale (most zoomed in) at which the layer is visible in the view.
   * If the map is zoomed in beyond this scale, the layer will not be visible.
   * A value of 0 means the layer does not have a maximum scale.
   * The maxScale value should always be smaller than the [minScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#minScale) value, and greater than or equal to the service specification.
   *
   * @default 0
   */
  accessor maxScale: number;
  /**
   * The minimum scale (most zoomed out) at which the layer is visible in the view.
   * If the map is zoomed out beyond this scale, the layer will not be visible.
   * A value of 0 means the layer does not have a minimum scale.
   * The minScale value should always be larger than the [maxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#maxScale) value, and lesser than or equal to the service specification.
   *
   * @default 0
   */
  accessor minScale: number;
  /**
   * The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#fields) containing
   * a unique value or identifier for each feature in the layer.
   *
   * @see [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#fields)
   * @see [Add an array of client-side features](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#client-side)
   */
  get objectIdField(): string;
  /**
   * The opacity of the layer. This value can range between `1` and `0`, where `0` is 100 percent
   * transparent and `1` is completely opaque.
   *
   * @default 1
   * @example
   * // Makes the layer 50% transparent
   * layer.opacity = 0.5;
   */
  accessor opacity: number;
  /** The [SubtypeGroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SubtypeGroupLayer.html) to which the sublayer belongs. */
  accessor parent: SubtypeGroupLayer | null | undefined;
  /**
   * Indicates whether to display popups when features in the layer are clicked. The layer needs to have a [popupTemplate](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#popupTemplate) to define what
   * information should be displayed in the popup. Alternatively, a default popup template may be automatically used if
   * [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled) is set to `true`.
   *
   * @default true
   * @see [createPopupTemplate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#createPopupTemplate)
   * @see [SceneView.popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#popup)
   * @see [View2D.popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#popup)
   */
  accessor popupEnabled: boolean;
  /**
   * The popup template for the layer. When set on the layer, the `popupTemplate`
   * allows users to access attributes and display their values in the
   * view's Popup when a feature is selected
   * using text and/or charts.
   *
   * A default popup template is automatically used if no `popupTemplate` has been defined when
   * [Popup.defaultPopupTemplateEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#defaultPopupTemplateEnabled)
   * is set to `true`.
   *
   * @see [createPopupTemplate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#createPopupTemplate)
   * @see [SceneView.popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#popup)
   * @see [View2D.popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#popup)
   */
  get popupTemplate(): PopupTemplate | null | undefined;
  set popupTemplate(value: PopupTemplateProperties | null | undefined);
  /**
   * Array of [relationships](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html) set up for the layer. Each object in the array describes the layer's
   * [Relationship](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Relationship.html) with another layer or table.
   *
   * @since 4.31
   * @see [queryRelatedFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#queryRelatedFeatures)
   * @example
   * // print out layer's relationship length and each relationship info to console
   * layer.when(function () {
   *   console.log("layer relationships", layer.relationships.length);
   *
   *   layer.relationships.forEach(function (relationship) {
   *     console.log("relationship id:", relationship.id)
   *     console.log("relationship cardinality:", relationship.cardinality)
   *     console.log("relationship key field:", relationship.keyField)
   *     console.log("relationship name:", relationship.name)
   *     console.log("relationship relatedTableId:", relationship.relatedTableId)
   *   });
   * });
   */
  get relationships(): Relationship[] | null | undefined;
  /**
   * The renderer assigned to the layer. The renderer defines how to
   * visualize each feature in the layer. Depending on the renderer type,
   * features may be visualized with the same symbol, or with varying symbols
   * based on the values of provided attribute fields or functions.
   *
   * @example
   * // all features in the layer will be visualized with
   * // a 6pt black marker symbol and a thin, white outline
   * layer.renderer = {
   *   type: "simple",  // autocasts as new SimpleRenderer()
   *   symbol: {
   *     type: "simple-marker",  // autocasts as new SimpleMarkerSymbol()
   *     size: 6,
   *     color: "black",
   *     outline: {  // autocasts as new SimpleLineSymbol()
   *       width: 0.5,
   *       color: "white"
   *     }
   *   }
   * };
   */
  get renderer(): SimpleRenderer | ClassBreaksRenderer | UniqueValueRenderer | null | undefined;
  set renderer(value: (SimpleRendererProperties & { type: "simple" }) | (ClassBreaksRendererProperties & { type: "class-breaks" }) | (UniqueValueRendererProperties & { type: "unique-value" }) | null | undefined);
  /**
   * The spatial reference of the layer. When creating the layer from a
   * [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#url), the spatial reference is read from the service.
   */
  get spatialReference(): SpatialReference;
  /**
   * The unique identifier representing the [SubtypeSublayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html)
   * created from the [SubtypeGroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SubtypeGroupLayer.html).
   */
  accessor subtypeCode: number;
  /** The name of the field which holds the id of the [subtypes](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SubtypeGroupLayer.html#subtypes). */
  get subtypeField(): string;
  /**
   * An array of feature templates defined in the feature layer.
   * See [ArcGIS Pro subtypes document](https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/an-overview-of-subtypes.htm).
   */
  get templates(): FeatureTemplate[] | null | undefined;
  set templates(value: FeatureTemplateProperties[] | null | undefined);
  /**
   * The title of the layer used to identify it in places such as the [Legend](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-legend/).
   * The title is set to the subtype description of layer.
   */
  accessor title: string | null | undefined;
  get type(): "subtype-sublayer";
  /**
   * The absolute URL of the REST endpoint of the feature service. The URL may either point to a
   * resource on ArcGIS Enterprise or ArcGIS Online. The service url points to the service url
   * of the [SubtypeGroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SubtypeGroupLayer.html). All `SubtypeSublayers` that belong to the same
   * `SubtypeGroupLayer` will share the same value for the url.
   */
  get url(): string | null | undefined;
  /**
   * Indicates if the layer is visible in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html). When `false`,
   * the layer may still be added to a [Map](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html)
   * instance that is referenced in a view, but its features will not be visible in the view.
   *
   * @default true
   * @example
   * // The layer is no longer visible in the view
   * layer.visible = false;
   */
  accessor visible: boolean;
  /**
   * Adds an attachment to a feature. This operation is available only if the layer's [capabilities.data.supportsAttachment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#capabilities) is `true`.
   *
   * @param feature - Feature to associate with the added attachment.
   * @param attachment - HTML form that contains a file upload field specifying the file to be added as an attachment.
   * @returns When resolved, a [FeatureEditResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-graphics-editingSupport.html#FeatureEditResult)
   * object is returned.
   * @see [capabilities.data.supportsAttachment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#capabilities)
   * @example
   * view.when(function () {
   *   view.on("click", function (event) {
   *
   *     view.hitTest(event).then(function (response) {
   *       const feature = response.results[0].graphic;
   *
   *       // The form is defined as below in the html.
   *       // For enterprise services:
   *       // 1. File input name must be "attachment"
   *       // <form id="attachmentForm">
   *       //   Select a file: <input type="file" name="attachment">
   *       // </form>
   *       const attachmentForm = document.getElementById("attachmentForm");
   *       const formData = new FormData(attachmentForm);
   *
   *       // For enterprise services - add input with name:f and value:json
   *       formData.append("f","json");
   *       const form = new FormData();
   *       form.set("attachment", file);
   *       form.append("f","json")
   *       let form = document.getElementById("myForm");
   *
   *       // Add an attachment to the clicked feature.
   *       // The attachment is taken from the form.
   *       layer.addAttachment(feature, form).then(function (result) {
   *         console.log("attachment added: ", result);
   *       })
   *       .catch(function (err) {
   *         console.log("attachment adding failed: ", err);
   *       });
   *     });
   *   });
   * });
   */
  addAttachment(feature: Graphic, attachment: HTMLFormElement | FormData): Promise<FeatureEditResult>;
  /**
   * Applies edits to features in a layer. New features can be created and existing features can be updated or deleted. Feature geometries and/or attributes may be modified.
   * Attachments can also be added, updated or deleted.
   *
   * > [!WARNING]
   * >
   * > When calling the applyEdits method on a service that does not have [vertical coordinate system](https://pro.arcgis.com/en/pro-app/help/mapping/properties/vertical-coordinate-systems.htm) information,
   * > the z-values of the geometries in the `edits` object will automatically be converted to match the spatial reference of the layer.
   * > Example: The service has a horizontal spatial reference with `feet` units, and `applyEdits()` is called with z-values based on `meter` units,
   * > then the method will automatically convert the z values from `meter` to `feet` units.
   *
   * @param edits - Object containing features and attachments to be added, updated or deleted.
   * @param options - Additional edit options to specify when editing features or attachments.
   * @returns When resolved, an [EditsResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-graphics-editingSupport.html#EditsResult)
   * object is returned.
   * @see [Sample - Edit features](https://developers.arcgis.com/javascript/latest/sample-code/editing-applyedits/)
   * @example
   * function addFeature(geometry) {
   *   const attributes = {};
   *   attributes["Description"] = "This is the description";
   *   attributes["Address"] = "380 New York St";
   *
   *   // Date.now() returns number of milliseconds elapsed
   *   // since 1 January 1970 00:00:00 UTC.
   *   attributes["Report_Date"] = Date.now();
   *
   *   const addFeature =  new Graphic({
   *     geometry: geometry,
   *     attributes: attributes
   *   });
   *
   *   const deleteFeatures = [
   *     { objectId: 467 },
   *     { objectId: 500 }
   *   ];
   *
   *   // or specify globalIds of features to be deleted
   *   // const deleteFeature = [
   *   //  { globalId: "18633204-1801-4d35-a73a-174563608ad9" }
   *   // ];
   *
   *   const promise = subtypeSublayer.applyEdits({
   *     addFeatures: [addFeature],
   *     deleteFeatures: deleteFeatures
   *   });
   * }
   */
  applyEdits(edits: Edits, options?: EditOptions): Promise<EditsResult>;
  /**
   * Creates a popup template for the layer, populated with all the fields of the layer.
   *
   * @param options - Options for creating the popup template.
   * @returns The popup template, or `null` if the layer does not
   * have any fields.
   */
  createPopupTemplate(options?: CreatePopupTemplateOptions): PopupTemplate | null | undefined;
  /**
   * Creates query parameters that can be used to fetch features that
   * satisfy the layer's current filters, and definitions.
   *
   * @returns The query object representing the layer's definition expression
   * and other configurations.
   * @example
   * // this snippet shows the query parameter object that is returned
   * // from SubtypeSublayer.createQuery().
   * const queryParams = new Query();
   * queryParams.outFields = ["*"];
   * queryParams.where = "1=1";
   * @example
   * // Get a query object for the layer's current configuration
   * // queryParams.outFields will be set to ["*"] to get values
   * // for all available fields.
   * const queryParams = layer.createQuery();
   * // set a geometry for filtering features by a region of interest
   * queryParams.geometry = extentForRegionOfInterest;
   * // Add to the layer's current definitionExpression
   * queryParams.where = queryParams.where + " AND TYPE = 'Extreme'";
   *
   * // query the layer with the modified params object
   * layer.queryFeatures(queryParams).then(function(results){
   *   // prints the array of result graphics to the console
   *   console.log(results.features);
   * });
   */
  createQuery(): Query;
  /**
   * Deletes attachments from a feature. This operation is available only if the layer's
   * [capabilities.data.supportsAttachment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#capabilities) is set to `true`.
   *
   * @param feature - Feature containing attachments to be deleted.
   * @param attachmentIds - Ids of the attachments to be deleted.
   * @returns When resolved, a [FeatureEditResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-graphics-editingSupport.html#FeatureEditResult)
   * object is returned.  FeatureEditResult indicates whether or not the edit was successful. If successful, the `objectId` of the result is the Id of
   * the new attachment. If unsuccessful, it also includes an error `name` and error `message`.
   * @since 4.26
   * @see [capabilities.data.supportsAttachment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#capabilities)
   */
  deleteAttachments(feature: Graphic, attachmentIds: number[]): Promise<FeatureEditResult[]>;
  /**
   * Returns the title of a [feature](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html). The feature title is generated based on the following conditions for a `SubtypeSublayer`.
   * - If the feature has a popup title configured, then the popup title will be returned.
   * - Otherwise, the [objectId](#objectIdField) of the associated feature will be returned.
   *
   * @param graphic - The [graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html) for which to generate a title.
   * @param options - Additional options that control how the title is generated.
   * @returns When resolved, returns the feature's title string.
   * @method getFeatureTitle
   * @since 4.34
   */
  getFeatureTitle(graphic: Graphic, options?: FeatureTitleOptions): Promise<string>;
  /**
   * Returns the [Field](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html) instance for a field name (case-insensitive).
   *
   * @param fieldName - Name of the field.
   * @returns the matching field or `undefined`
   * @see [fields](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#fields)
   */
  getField(fieldName: string): Field | null | undefined;
  /**
   * Returns the [Domain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Domain.html) associated with the given field name. The domain can be either a
   * [CodedValueDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-CodedValueDomain.html) or [RangeDomain](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-RangeDomain.html).
   *
   * @param fieldName - Name of the field.
   * @returns The Domain object associated with the given field name for the given feature.
   * @example
   * // Get a range domain associated with the first feature
   * // returned from queryFeatures().
   * subtypeSublayer.queryFeatures(query).then(function(results){
   *   const domain = subtypeSublayer.getFieldDomain("Height");
   *   console.log("domain", domain)
   * });
   */
  getFieldDomain(fieldName: string): Domain | null | undefined;
  /**
   * Query information about attachments associated with features. It will return an error if the layer's
   * [capabilities.data.supportsAttachment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#capabilities) property is `false`.
   * Attachments for multiple features can be queried if the layer's
   * [capabilities.operations.supportsQueryAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#capabilities) is `true`.
   *
   * > [!WARNING]
   * >
   * > **Known Limitations**
   * >
   * > When the layer's [capabilities.operations.supportsQueryAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#capabilities) property is
   * > `false`, [AttachmentQuery.objectIds](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-AttachmentQuery.html#objectIds) property only accepts a single
   * > `objectId`.
   *
   * @param attachmentQuery - Specifies the attachment parameters for query.
   * @param options - An object with the following properties.
   * @returns When resolved, returns an object containing
   * [AttachmentInfos](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-query-support-AttachmentInfo.html) grouped by the source
   * feature objectIds.
   * @since 4.26
   * @see [capabilities.data.supportsAttachment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#capabilities)
   * @see [capabilities.operations.supportsQueryAttachments](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#capabilities)
   * @example
   * subtypeGroupLayer.when(function () {
   *   // queryObjectIds for all features within the layer
   *   subtypeGroupLayer.queryObjectIds().then(function (objectIds) {
   *     // Define parameters for querying attachments,
   *     // query features where objectIds are less than 735,
   *     // and only query jpeg attachments for these features.
   *     let attachmentQuery = {
   *       objectIds: objectIds,
   *       definitionExpression: "OBJECTID < 735",
   *       attachmentTypes: ["image/jpeg"]
   *     };
   *
   *     // Only pass in one objectId for attachmentQuery.objectIds
   *     // if the layer's capabilities.operations.supportsQueryAttachments is false
   *     subtypeGroupLayer.queryAttachments(attachmentQuery).then(function (attachments) {
   *       // Print out all returned attachment infos to the console.
   *       attachmentQuery.objectIds.forEach(function (objectId) {
   *         if (attachments[objectId]) {
   *           let attachment = attachments[objectId];
   *           console.group("attachment for", objectId);
   *           attachment.forEach(function (item) {
   *             console.log("attachment id", item.id);
   *             console.log("content type", item.contentType);
   *             console.log("name", item.name);
   *             console.log("size", item.size);
   *             console.log("url", item.url);
   *             console.groupEnd();
   *           });
   *         }
   *       });
   *     })
   *     .catch(function (error) {
   *       console.log("attachment query error", error);
   *     })
   *   });
   * });
   */
  queryAttachments(attachmentQuery: AttachmentQuery | AttachmentQueryProperties, options?: RequestOptions): Promise<Record<string, AttachmentInfo[]>>;
  /**
   * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against the service and returns the number of features that satisfy the query. If no parameters are specified,
   * then the total number of features satisfying the layer's configuration/filters is returned.
   *
   * @param query - Specifies the attributes and spatial 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 the number of features satisfying the query.
   * @example
   * // returns a count of all features in the layer
   * await count = layer.queryFeatureCount();
   * console.log("Feature count: ", count);
   */
  queryFeatureCount(query?: QueryProperties | null | undefined, options?: RequestOptions): Promise<number>;
  /**
   * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against the feature service and returns a
   * [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html) once the promise resolves.
   * A [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html) contains an array of [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html)
   * features.
   * > [!WARNING]
   * >
   * > When querying a service with z-values and no [vertical coordinate system](https://pro.arcgis.com/en/pro-app/help/mapping/properties/vertical-coordinate-systems.htm) information,
   * > the z-values will automatically be converted to match the [Query.outSpatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html#outSpatialReference) units.
   * > Example: The service has a horizontal spatial reference using `feet` units and the query is made with `outSpatialReference`
   * > based on `meter` units, then [queryFeatures()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#queryFeatures) automatically converts the values from `feet` to `meter` units.
   *
   * @param query - Specifies the attributes and spatial
   * filter of the query. If no parameters are specified, then all features satisfying the layer's
   * configuration/filters are returned.
   * @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.
   * @see [Query and filter guide](https://developers.arcgis.com/javascript/latest/query-filter/)
   * @example
   * const subtypeGroupLayer = new SubtypeGroupLayer({
   *   url: fsUrl  // points to a Feature Service layer url
   * });
   *
   * // obtain a sublayer by a subtype code
   * const sublayer = subtypeGroupLayer.findSublayerForSubtypeCode(2);
   *
   * // query all features from the layer and only return
   * // attributes specified in outFields.
   * const query = { // autocasts as Query
   *   where: "1=1", // select all features
   *   returnGeometry: false,
   *   outFields: ["State_Name", "City_Name", "pop2010"]
   * };
   *
   * layer.queryFeatures(query).then(function(results){
   *   console.log(results.features);  // prints the array of features to the console
   * });
   */
  queryFeatures(query?: QueryProperties | null | undefined, options?: RequestOptions): Promise<FeatureSet>;
  /**
   * Executes a [Query](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html) against the service and returns an array of Object IDs for features that satisfy the input query.
   * If no parameters are specified, then the Object IDs of all features satisfying the layer's configuration/filters are returned.
   *
   * @param query - Specifies the attributes and spatial 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 object IDs of the features
   *                   satisfying the query.
   * @example
   * // Queries for all the Object IDs of features
   * await result = subtypeSublayer.queryObjectIds();
   * // prints the array of Object IDs to the console
   * console.log(result);
   */
  queryObjectIds(query?: QueryProperties | null | undefined, options?: RequestOptions): Promise<number[]>;
  /**
   * Executes a [RelationshipQuery](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RelationshipQuery.html) against the feature service and
   * returns [FeatureSets](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html) grouped by source layer or table objectIds.
   *
   * @param relationshipQuery - Specifies relationship parameters
   * for querying related features or records from a layer or a table.
   * @param options - An object with the following properties.
   * @returns When resolved, returns [FeatureSets](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html) grouped
   * by source layer/table objectIds. Each [FeatureSet](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html) contains an array of [Graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html)
   * features including the values of the fields requested by the user.
   * @since 4.31
   * @see [relationships property](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#relationships)
   * @see [Sample - Query Related Features](https://developers.arcgis.com/javascript/latest/sample-code/query-related-features/)
   * @example
   * const objectIds = [385, 416];
   *
   * // relationship query parameter
   * const query = {
   *   outFields: ["*"],
   *   relationshipId: relationshipId,
   *   objectIds: objectIds
   * }
   *
   * // query related features for given objectIds
   * sublayer.queryRelatedFeatures(query).then(function (result) {
   *   objectIds.forEach(function (objectId) {
   *     // print out the attributes of related features if the result
   *     // is returned for the specified objectId
   *     if (result[objectId]) {
   *       console.group("relationship for feature:", objectId)
   *       result[objectId].features.forEach(function (feature) {
   *         console.log("attributes", JSON.stringify(feature.attributes));
   *       });
   *       console.groupEnd();
   *     }
   *   });
   * }).catch(function (error) {
   *   console.log("error from queryRelatedFeatures", error);
   * });
   */
  queryRelatedFeatures(relationshipQuery: RelationshipQueryProperties, options?: RequestOptions): Promise<Record<string, FeatureSet>>;
  /**
   * Executes a [RelationshipQuery](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-RelationshipQuery.html) against the feature service and
   * when resolved, it returns an `object` containing key value pairs. Key in this case is the `objectId`
   * of the feature and value is the number of related features associated with the feature.
   *
   * @param relationshipQuery - Specifies relationship parameters
   * for querying related features or records from a layer or a table.
   * @param options - An object with the following properties.
   * @returns When resolved, returns a hashmap containing key value pairs. Key in this case is the `objectId`
   * of the feature and value is the number of related features.
   * @since 4.31
   * @see [relationships property](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#relationships)
   * @see [Sample - Query Related Features](https://developers.arcgis.com/javascript/latest/sample-code/query-related-features/)
   * @example
   * const objectIds = [385, 416];
   *
   * // relationship query parameter
   * const query = {
   *   outFields: ["*"],
   *   relationshipId: relationshipId,
   *   objectIds: objectIds
   * }
   *
   * // query related features for given objectIds
   * sublayer.queryRelatedFeaturesCount(query).then(function (count) {
   *   console.log("queryRelatedFeaturesCount", count);
   *   // this will print out
   *   // {385: 91, 416: 23}
   * }).catch(function (error) {
   *   console.log("error from queryRelatedFeatures", error);
   * });
   */
  queryRelatedFeaturesCount(relationshipQuery: RelationshipQueryProperties, options?: RequestOptions): Promise<Record<string, number>>;
  /**
   * Updates an existing attachment for a feature. This operation is available only if the layer's
   * [capabilities.data.supportsAttachment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#capabilities) is set to `true`.
   *
   * @param feature - The feature containing the attachment to be updated.
   * @param attachmentId - Id of the attachment to be updated.
   * @param attachment - HTML form that contains a file upload field pointing to the file to be added as an attachment.
   * @returns When resolved, a [FeatureEditResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-graphics-editingSupport.html#FeatureEditResult)
   * object is returned. FeatureEditResult indicates whether or not the edit was successful. If successful, the `objectId` of the result is the Id of
   * the new attachment. If unsuccessful, it also includes an error `name` and error `message`.
   * @since 4.26
   * @see [capabilities.data.supportsAttachment](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#capabilities)
   */
  updateAttachment(feature: Graphic, attachmentId: number, attachment: HTMLFormElement | FormData): Promise<FeatureEditResult>;
}
declare const SubtypeSublayerSuperclass: typeof Loadable & typeof IdentifiableMixin & typeof ClonableMixin & typeof MultiOriginJSONSupportMixin