import EsriExtent from "@arcgis/core/geometry/Extent";
import type EsriBuildingSceneLayer from "@arcgis/core/layers/BuildingSceneLayer";
import type EsriCSVLayer from "@arcgis/core/layers/CSVLayer";
import type EsriFeatureLayer from "@arcgis/core/layers/FeatureLayer";
import type EsriGeoJSONLayer from "@arcgis/core/layers/GeoJSONLayer";
import type EsriImageryLayer from "@arcgis/core/layers/ImageryLayer";
import type EsriImageryTileLayer from "@arcgis/core/layers/ImageryTileLayer";
import type EsriLayer from "@arcgis/core/layers/Layer";
import type EsriPointCloudLayer from "@arcgis/core/layers/PointCloudLayer";
import type EsriSceneLayer from "@arcgis/core/layers/SceneLayer";
import type EsriStreamLayer from "@arcgis/core/layers/StreamLayer";
import type EsriSubtypeGroupLayer from "@arcgis/core/layers/SubtypeGroupLayer";
import type EsriBuildingComponentSublayer from "@arcgis/core/layers/buildingSublayers/BuildingComponentSublayer";
import type EsriSublayer from "@arcgis/core/layers/support/Sublayer";
import type EsriSubtypeSublayer from "@arcgis/core/layers/support/SubtypeSublayer";
import type { FeatureLayerCapabilities as EsriFeatureLayerCapabilities, SublayerLike } from "../support/esri.js";
import type { DefinitionEditor } from "./DefinitionEditor.js";
import { DrawingInfo } from "./DrawingInfo.js";
import type { DynamicDataLayer } from "./DynamicDataLayer.js";
import type { DynamicMapLayer } from "./DynamicMapLayer.js";
import { ElevationInfo } from "./ElevationInfo.js";
import type { Extent } from "./Extent.js";
import { FeatureReduction } from "./FeatureReduction.js";
import { Field as PortalField } from "./Field.js";
import type { RangeInfo } from "./RangeInfo.js";
import { SpatialReference } from "./SpatialReference.js";
import { Template } from "./Template.js";
import { Type } from "./Type.js";
export declare namespace LayerDefinition {
    /**
     * Applies an ArcGIS Portal JSON representation of a layer definition to a
     * Layer object.
     *
     * @param json The layer definition JSON to apply.
     * @param layer The Layer object to apply it to.
     */
    function applyToEsriApiLayer(json: LayerDefinition, layer: EsriFeatureLayer | EsriStreamLayer | EsriImageryLayer | EsriImageryTileLayer | EsriCSVLayer | EsriSceneLayer | EsriBuildingSceneLayer | EsriPointCloudLayer | EsriSublayer | EsriBuildingComponentSublayer | EsriSubtypeGroupLayer | EsriSubtypeSublayer | EsriGeoJSONLayer): Promise<void>;
    /**
     * Creates ArcGIS Portal layer definition JSON from a Layer object.
     *
     * @param layer The Layer object to convert.
     * @param defaultValues Default values that will be used for properties that
     *   are missing in the layer.
     */
    function fromEsriApiLayer(layer: EsriLayer | SublayerLike, defaultValues?: LayerDefinitionDefaults): LayerDefinition;
}
/**
 * Default values for a layer definition.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface LayerDefinitionDefaults {
    /**
     * Whether the layer has attachments.
     */
    hasAttachments?: boolean;
    /**
     * Whether the layer's geometry has M values.
     */
    hasM?: boolean;
    /**
     * Whether the layer's geometry has Z values.
     */
    hasZ?: boolean;
    /**
     * Whether the layer is visible.
     */
    visible?: boolean;
    /**
     * The well-known ID for the layer's spatial reference.
     */
    wkid?: number;
    /**
     * The layer's full extent.
     */
    fullExtent?: EsriExtent;
    /**
     * The layer's minimum scale.
     */
    minScale?: number;
    /**
     * The layer's maximum scale.
     */
    maxScale?: number;
}
/**
 * The LayerDefinition object defines the attribute schema and drawing
 * information for a layer drawn using client-side graphics. This could include
 * a feature collection, a CSV file referenced through the web, or a single
 * layer in an ArcGIS map service. Also used for dynamic layers.
 *
 * See
 * {@link https://developers.arcgis.com/web-map-specification/objects/layerDefinition/}
 * {@link https://developers.arcgis.com/web-scene-specification/objects/layerDefinition/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface LayerDefinition {
    /**
     * Boolean value indicating whether the geometry of the features in the
     * layer can be edited.
     */
    allowGeometryUpdates?: boolean;
    /**
     * A comma-separated string listing which editing operations are allowed on
     * an editable feature service. Available operations include: Create |
     * Delete | Query | Update | Editing.
     */
    capabilities?: string;
    /**
     * String value for the copyright text information for the layer.
     */
    copyrightText?: string;
    /**
     * Numeric value indicating the server version of the layer.
     */
    currentVersion?: number;
    /**
     * Boolean value indicating whether the layer's visibility is turned on.
     */
    defaultVisibility?: boolean;
    /**
     * Stores interactive filters.
     */
    definitionEditor?: DefinitionEditor;
    /**
     * An optional SQL-based definition expression that narrows down the data to
     * be displayed in the layer. Used with ArcGIS Server map services.
     */
    definitionExpression?: string;
    /**
     * String value of the layer as defined in the map service.
     */
    description?: string;
    /**
     * The name of the field that best summarizes the feature. Values from this
     * field are used by default as the titles for pop-up windows.
     */
    displayField?: string;
    /**
     * A drawingInfo object containing drawing, labeling, and transparency
     * information for the layer.
     */
    drawingInfo?: DrawingInfo;
    /**
     * Specifies how graphics are placed on the vertical axis (z). This property
     * may only be used in a SceneView.
     */
    elevationInfo?: ElevationInfo;
    /**
     * The rectangular map extent that should be requested from the service,
     * given in the format [[xmin, ymin],[xmax,ymax]].
     */
    extent?: Extent;
    /**
     * Feature reductions declutter the screen by hiding features that would
     * otherwise intersect with other features on screen.
     */
    featureReduction?: FeatureReduction;
    /**
     * The layer-specific overrides of field properties. Used by
     * SubtypeGroupLayer to modify field information for each subtype. Any field
     * missing from this array should be hidden.
     */
    fieldOverrides?: FieldOverride[];
    /**
     * An array of Field objects containing information about the attribute
     * fields for the feature collection or layer.
     */
    fields?: PortalField[];
    /**
     * Contains floor-awareness information for the layer. See
     * {@link https://developers.arcgis.com/web-map-specification/objects/layerFloorInfo/}.
     */
    floorInfo?: {
        /**
         * The name of the attribute field that contains a floor's level ID used
         * for floor filtering.
         */
        floorField: string;
    };
    /**
     * The type of geometry used in the layer definition. One of the
     * GeometryType constants.
     */
    geometryType?: string;
    /**
     * The unique identifier for a feature or table row within a geodatabase.
     */
    globalIdField?: string;
    /**
     * Indicates whether attachments should be loaded for the layer.
     */
    hasAttachments?: boolean;
    /**
     * Boolean value indicating whether layer has M values.
     */
    hasM?: boolean;
    /**
     * Boolean value indicating whether data changes. True if it does not.
     */
    hasStaticData?: boolean;
    /**
     * Boolean value indicating whether layer has Z values.
     */
    hasZ?: boolean;
    /**
     * String value indicating the HTML popup type. Possible values are listed
     * in the htmlPopupType table below. See {@link HtmlPopupType}.
     */
    htmlPopupType?: HtmlPopupType;
    /**
     * The identifier assigned to the layer.
     */
    id?: string;
    /**
     * Boolean value indicating whether the data is versioned.
     */
    isDataVersioned?: boolean;
    /**
     * Numeric value indicating the maximum number of records that will be
     * returned at once for a query.
     */
    maxRecordCount?: number;
    /**
     * A number representing the maximum scale at which the layer definition
     * will be applied. The number is the scale's denominator; thus, a value of
     * 2400 represents a scale of 1/2,400. A value of 0 indicates that the layer
     * definition will be applied no matter how far you zoom in.
     */
    maxScale?: number;
    /**
     * A number representing the minimum scale at which the layer definition
     * will be applied. The number is the scale's denominator; thus, a value of
     * 2400 represents a scale of 1/2,400.
     */
    minScale?: number;
    /**
     * A string containing a unique name for the layer that could be displayed
     * in a legend.
     */
    name?: string;
    /**
     * Indicates the name of the object ID field in the dataset.
     */
    objectIdField?: string;
    /**
     * Determines the display order of features on the map.
     */
    orderBy?: OrderByClause[];
    /**
     * Dictates whether a client can support having an end user modify symbols
     * on individual features.
     */
    overrideSymbols?: boolean;
    /**
     * Indicates range information.
     */
    rangeInfos?: RangeInfo[];
    /**
     * An object indicating the layerDefinition's layer source. See
     * {@link https://developers.arcgis.com/web-map-specification/objects/source/}
     * {@link https://developers.arcgis.com/web-scene-specification/objects/source/}.
     */
    source?: DynamicDataLayer | DynamicMapLayer;
    /**
     * An object containing the WKID or WKT identifying the spatial reference of
     * the layer's geometry.
     */
    spatialReference?: SpatialReference;
    /**
     * String value indicating the output formats that are supported in a query.
     */
    supportedQueryFormats?: string;
    /**
     * Boolean value indicating whether the layer supports orderByFields in a
     * query operation.
     */
    supportsAdvancedQueries?: boolean;
    /**
     * Boolean value indicating whether the layer supports uploading attachments
     * with the Uploads operation. This can be then used in the Add Attachment
     * and Update Attachment operations.
     */
    supportsAttachmentsByUploadId?: boolean;
    /**
     * Boolean value indicating whether the layer supports the Calculate REST
     * operation when updating features.
     */
    supportsCalculate?: boolean;
    /**
     * Boolean value indicating whether the layer supports rolling back edits
     * made on a feature layer if some of the edits fail.
     */
    supportsRollbackOnFailureParameter?: boolean;
    /**
     * Boolean value indicating whether feature layer query operations support
     * statistical functions.
     */
    supportsStatistics?: boolean;
    /**
     * Boolean value indicating whether the validateSQL operation is supported
     * across a feature service layer.
     */
    supportsValidateSql?: boolean;
    /**
     * An array of template objects describing features that can be created in
     * this layer. Templates are used with map notes, other feature collections,
     * and editable web-based CSV layers. They are not used with ArcGIS feature
     * services, which already have feature templates defined in the service.
     *
     * Templates are defined as a property of the layer definition when there
     * are no types defined; otherwise, templates are defined as properties of
     * the types.
     */
    templates?: Template[];
    /**
     * The time info metadata of the layer. May be set for feature layers inside
     * a feature collection item.
     */
    timeInfo?: LayerTimeInfo;
    /**
     * Indicates whether the layerDefinition applies to a "Feature Layer" or a
     * "Table".
     */
    type?: string;
    /**
     * The name of the field holding the type ID for the features, if types
     * exist for the dataset. Each available type has an ID, and each feature's
     * typeIdField can be read to determine the type for each feature.
     */
    typeIdField?: string;
    /**
     * An array of Type objects available for the dataset. This is used when the
     * typeIdField is populated.
     *
     * Types contain information about the combinations of attributes that are
     * allowed for features in the dataset. Each feature in the dataset can have
     * a type, indicated in its typeIdField.
     */
    types?: Type[];
    /**
     * String value indicating the attribute field that is used to control the
     * visibility of a feature. If applicable, when rendering a feature the
     * client should use this field to control visibility. The field's values
     * are 0 = do not display, 1 = display.
     */
    visibilityField?: string;
}
/**
 * Defines overridden properties on a field for a specific view of the data. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/fieldOverride/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface FieldOverride {
    /**
     * A string containing the overridden field alias.
     */
    alias?: string;
    /**
     * A Boolean determining whether users can edit this field.
     */
    editable?: boolean;
    /**
     * A string containing the field name as defined by the service.
     */
    name?: string;
}
/**
 * Time info if the layer/table supports querying and exporting maps based on
 * time. See
 * {@link https://developers.arcgis.com/web-map-specification/objects/layerTimeInfo/}.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface LayerTimeInfo {
    /**
     * The name of the attribute field that contains the end time information.
     */
    endTimeField?: string;
    /**
     * The default time-related export options for this layer.
     *
     * @deprecated Use "json/*" modules instead.
     */
    exportOptions?: TimeInfoExportOptions;
    /**
     * Indicates whether service has live data.
     */
    hasLiveData?: boolean;
    /**
     * The name of the attribute field that contains the start time information.
     */
    startTimeField?: string;
    /**
     * The time extent for all the data in the layer.
     */
    timeExtent?: [number, number];
    /**
     * Time interval of the data in the layer. Typically used for the TimeSlider
     * when animating the layer.
     */
    timeInterval?: number;
    /**
     * Temporal unit in which the time interval is measured.
     */
    timeIntervalUnits?: TemporalUnit;
    /**
     * Defines information about daylight savings time and the time zone in
     * which data was collected. See
     * {@link https://developers.arcgis.com/web-map-specification/objects/timeReference/}.
     */
    timeReference?: {
        /**
         * Indicates whether the time reference takes into account daylight
         * savings time.
         */
        respectsDaylightSaving: boolean;
        /**
         * The time zone in which the data was captured.
         */
        timeZone?: string;
    };
    /**
     * The field that contains the trackId.
     */
    trackIdField: string;
}
/**
 * The default time-related export options for a layer. See
 * https://developers.arcgis.com/web-map-specification/objects/timeInfoExportOptions/.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface TimeInfoExportOptions {
    /**
     * If true, draw all the features from the beginning of time for that data.
     */
    timeDataCumulative?: boolean;
    /**
     * Time offset value for this layer so that it can be overlaid on the top of
     * a previous or future time period.
     */
    timeOffset?: number;
    /**
     * Temporal unit in which the time offset is measured.
     */
    timeOffsetUnits?: TemporalUnit;
    /**
     * If true, use the time extent specified by the time parameter.
     */
    useTime?: boolean;
}
/**
 * Temporal units in which a time value can be measured.
 *
 * @deprecated Use "json/*" modules instead.
 */
export type TemporalUnit = "esriTimeUnitsCenturies" | "esriTimeUnitsDays" | "esriTimeUnitsDecades" | "esriTimeUnitsHours" | "esriTimeUnitsMilliseconds" | "esriTimeUnitsMinutes" | "esriTimeUnitsMonths" | "esriTimeUnitsSeconds" | "esriTimeUnitsUnknown" | "esriTimeUnitsWeeks" | "esriTimeUnitsYears";
/**
 * The HTML popup type for the LayerDefinition.
 *
 * @deprecated Use "json/*" modules instead.
 */
export type HtmlPopupType = "esriServerHTMLPopupTypeAsHTMLText" | "esriServerHTMLPopupTypeAsURL" | "esriServerHTMLPopupTypeNone";
/**
 * A clause in a layer definition's `orderBy` property.
 *
 * @deprecated Use "json/*" modules instead.
 */
export interface OrderByClause {
    /**
     * The number or date field whose values will be used to sort features.
     */
    field?: string;
    /**
     * The [Arcade
     * expression](https://developers.arcgis.com/javascript/latest/arcade/)
     * whose return value will be used to sort features. (Currently undocumented
     * by ESRI's Webmap Spec).
     *
     * [Read
     * more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-OrderedLayer.html#orderBy).
     */
    valueExpression?: string;
    /**
     * The sort order.
     */
    order?: "asc" | "desc";
}
/**
 * Layer definition capabilities constants.
 */
export declare namespace LayerDefinitionCapabilities {
    /**
     * Allows new features to be added.
     *
     * @deprecated Use "json/*" modules instead.
     */
    const ADD = "Add";
    /**
     * Allows features to be deleted.
     *
     * @deprecated Use "json/*" modules instead.
     */
    const DELETE = "Delete";
    /**
     * Allows features to be edited.
     *
     * @deprecated Use "json/*" modules instead.
     */
    const EDITING = "Editing";
    /**
     * Allows features to be queried.
     *
     * @deprecated Use "json/*" modules instead.
     */
    const QUERY = "Query";
    /**
     * Allows features to be queried.
     *
     * @deprecated Use "json/*" modules instead.
     */
    const UPDATE = "Update";
    /**
     * Converts an Esri JavaScript API capabilities object to the equivalent
     * Portal JSON capabilities string.
     *
     * @deprecated Use "json/*" modules instead.
     * @param capabilities The capabilities to convert.
     */
    function fromEsriApiFeatureLayerCapabilities(capabilities: EsriFeatureLayerCapabilities): string;
}
