@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
131 lines (118 loc) • 5.28 kB
TypeScript
import type FeatureLayer from "../layers/FeatureLayer.js";
import type Field from "../layers/support/Field.js";
import type MapImage from "../layers/support/MapImage.js";
import type ArealUnit from "./support/ArealUnit.js";
import type DataFile from "./support/DataFile.js";
import type FeatureSet from "./support/FeatureSet.js";
import type JobInfo from "./support/JobInfo.js";
import type LinearUnit from "./support/LinearUnit.js";
import type RasterData from "./support/RasterData.js";
import type TimeUnit from "./support/TimeUnit.js";
import type CIMSymbol from "../symbols/CIMSymbol.js";
import type { AbortOptions } from "../core/promiseUtils.js";
/** @since 5.0 */
export type ParameterTypes = ArealUnit | DataFile | Date | FeatureLayer | FeatureSet | Field | LinearUnit | MapImage | RasterData | TimeUnit | boolean | number | string;
/** @since 5.0 */
export type SingleDataType = "areal-unit" | "boolean" | "composite" | "data-file" | "date" | "double" | "feature-record-set-layer" | "field" | "linear-unit" | "long" | "raster-data" | "raster-data-layer" | "record-set" | "string" | "time-unit" | "value-table";
/** @since 5.0 */
export interface SingleParameterValue<T extends SingleDataType, U extends ParameterTypes> {
/** @since 5.0 */
dataType: T;
/** @since 5.0 */
value: U;
}
/** @since 5.0 */
export interface MultipleParameterValue<T extends SingleDataType, U extends ParameterTypes> {
/** @since 5.0 */
dataType: `multi-value-${T}`;
/** @since 5.0 */
value: U[];
}
/** @since 5.0 */
export type ParameterValueTemplate<T extends SingleDataType, U extends ParameterTypes> = SingleParameterValue<T, U> | MultipleParameterValue<T, U>;
/** @since 5.0 */
export type ParameterValue = ParameterValueTemplate<"areal-unit", ArealUnit> | ParameterValueTemplate<"boolean", boolean> | ParameterValueTemplate<"data-file", DataFile> | ParameterValueTemplate<"date", Date> | ParameterValueTemplate<"double", number> | ParameterValueTemplate<"feature-record-set-layer", FeatureSet | DataFile | FeatureLayer> | ParameterValueTemplate<"field", Field> | ParameterValueTemplate<"linear-unit", LinearUnit> | ParameterValueTemplate<"long", number> | ParameterValueTemplate<"raster-data", RasterData | MapImage> | ParameterValueTemplate<"raster-data-layer", RasterData | MapImage> | ParameterValueTemplate<"record-set", FeatureSet | DataFile> | ParameterValueTemplate<"string", string> | ParameterValueTemplate<"time-unit", TimeUnit>;
/**
* Represents the response of the [execute()](https://developers.arcgis.com/javascript/latest/references/core/rest/print/#execute) method.
*
* @since 5.0
*/
export type PrintResponse = DataFile;
/** @since 5.0 */
export type LocationType = "rooftop" | "street";
/** @since 5.0 */
export interface Transformation {
/**
* The well-known ID of the datum transformation to apply to the projection.
* [List of valid IDs for Datum transformations](https://developers.arcgis.com/rest/services-reference/enterprise/using-spatial-references.htm).
*
* @since 5.0
*/
wkid?: number;
/**
* The well-known text that defines a spatial reference.
*
* @since 5.0
*/
wkt?: string;
}
/**
* The response of the [generateSymbol()](https://developers.arcgis.com/javascript/latest/references/core/rest/symbolService/#generateSymbol) method.
*
* @since 5.0
*/
export interface GenerateSymbolResponse {
/**
* The CIMSymbol created from the [generateSymbol()](https://developers.arcgis.com/javascript/latest/references/core/rest/symbolService/#generateSymbol) method.
*
* @since 5.0
*/
symbol: CIMSymbol;
}
/**
* Input parameters for the [generateSymbol()](https://developers.arcgis.com/javascript/latest/references/core/rest/symbolService/#generateSymbol) method.
*
* @since 5.0
*/
export interface GenerateSymbolParameters {
/**
* The SVG image to convert. Can be an SVG string value, form data, or form element.
* When providing the SVG from `FormData` or `HTMLFormElement`, the `name` of the element in the form must be `"svgImage"`. When providing the SVG from a string, the XML namespace (`xmlns`) must be defined.
*
* @since 5.0
*/
svgImage?: string | FormData | HTMLFormElement;
}
/** @since 5.0 */
export interface WaitForJobOptions extends AbortOptions {
/**
* The time in millisecond between remote job status requests.
*
* @default 1000
* @since 5.0
*/
interval?: number;
/**
* Callback function that is called at the specified interval.
* Use this method to monitor job status and messages.
*
* @since 5.0
*/
statusCallback?: (jobInfo: JobInfo) => void;
/**
* An authorization string used to access a resource or service.
*
* @since 5.0
*/
apiKey?: string | null;
}
/** @since 5.0 */
export interface LayerMetadata {
/**
* The [FeatureLayer.uniqueIdFields](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#uniqueIdFields) of the FeatureLayer.
* Specify this parameter, if the [FeatureLayer.uniqueIdFields](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#uniqueIdFields) uses non-numeric unique IDs.
*
* @since 5.0
*/
uniqueIdFields?: string[] | null;
}