Skip to content
Types
import type { Diagnostic, IEditorProfileDefinition, IPredefinedProfile, ProfileVariableValueType, IProfileVariable } from "@arcgis/coding-components/components/types.js";

Type definitions

Diagnostic

Type definition
Supertypes
Diagnostic

IEditorProfileDefinition

Type definition

Editor Profile definition used for configuring the editor:

  • presenting to the user the Arcade API
  • validating the expression
  • proposing code completion
  • formatting code

label

Property
Type
string | undefined

Optional label for the profile. Used in the editor when displaying the variables panel.

variables

Property
Type
IProfileVariable[]

The collection of variables that will be passed to the expression at execution time. The variable declarations are used to help the editor provide validation and completion.

apiVersion

Property
Type
string | undefined

The version of the Arcade API that the editor should use during validation and completion.

bundles

Property
Type
BundleType[] | undefined

The Arcade API bundles that the editor should use during validation and completion.

additionalApiItems

Property
Type
ApiItem[] | undefined

A collection of additional Arcade API items that will be provided at runtime.

hiddenApiItems

Property
Type
string[] | undefined

A collection of api item names to hide.

IPredefinedProfile

Type definition

id

Property
Type
ProfileId

The well known profile ID.

disabledVariables

Property
Type
string[] | undefined

The variables that should be disabled for the profile.

definitions

Property
Type
VariableDefinitions

Provides the definitions for the definition based variables (feature, featureSet, featureSetCollection).

hiddenApiItems

Property
Type
string[] | undefined

A collection of api item names to hide.

ProfileVariableValueType

Type definition

The type of value variables supported.

Type
"boolean" | "date" | "dateOnly" | "geometry" | "knowledgeGraph" | "number" | "text" | "time"

IProfileVariable

Type definition

The supported profile variable types.

IProfileVariableBase

Type definition

Properties common to all profile variables.

name

Property
Type
string

Name of the variable

description

Property
Type
string | undefined

Description for the variable

IProfileValue

Type definition

Single value profile variable declaration.

type

readonly Property
Type
ProfileVariableValueType

IProfileDictionary

Type definition

Dictionary profile variable declaration. Properties of a dictionary are profile variables.

type

readonly Property
Type
"dictionary"

properties

Property
Type
IProfileVariable[] | undefined

The dictionary properties. Properties are variables as well.

IProfileArray

Type definition

Dictionary profile variable declaration. Properties of a dictionary are profile variables.

type

readonly Property
Type
"array"

elementType

Property
Type
IProfileVariable | undefined

The type for the array elements.

IProfileFeature

Type definition

Feature profile variable declaration. Features contains values that can be accessed by a name (aka field name or attribute name). Optionally features can have a geometry that can be accessed by a specialized Arcade function.

type

readonly Property
Type
"feature"

definition

Property
Type
FeatureDefinition | undefined

Describes how the editor will find the definition for the feature.

IProfileFeatureSet

Type definition

FeatureSet profile variable declaration. FeatureSet represents a collection of Features. Individual feature or subset of features can be accessed by using specialized Arcade functions.

type

readonly Property
Type
"featureSet"

definition

Property
Type
FeatureSetDefinition | undefined

Describes how the editor will find the definition for the feature set.

IProfileFeatureSetCollection

Type definition

FeatureSetCollection profile variable declaration. FeatureSetCollections are used to represent Feature Services or Web Maps in Arcade expressions. FeatureSetCollections expose two collections of Layers and Tables.

type

readonly Property
Type
"featureSetCollection"

definition

Property
Type
FeatureSetCollectionDefinition | undefined

Describes how the featureSetCollection will find its definition.

IProfileVoxel

Type definition

Voxel profile variable declaration.

type

readonly Property
Type
"voxel"

definition

Property
Type
VoxelDefinition | undefined

Describes how the editor will find the definition for the voxel.

IProfilePixel

Type definition

Pixel profile variable declaration.

type

readonly Property
Type
"pixel"

definition

Property
Type
PixelDefinition | undefined

Describes how the editor will find the definition for the pixel.

IFeatureLikeProfile

Type definition

IPortalItemProperties

Type definition

Describes a portal item.

id

Property
Type
string

The unique portal item id.

portal

Property
Type
{ url: string; } | undefined

The optional portal url. Default: www.arcgis.com.

IPortalItemDefinition

Type definition

WebMap and Service FeatureSetCollection can be defined by a portal item.

portalItem

Property
Type
IPortalItemProperties

Describes a portal item.

IFeatureLayerItemDefinition

Type definition

FeatureLayer can be defined from a Feature Layer portal item.

layerId

Property
Type
number | undefined

The layer id in the feature layer portal item. Default to 0.

IUrlDefinition

Type definition

FeatureLayers and GroupLayers can be created by providing the url to the resource in a feature service.

url

Property
Type
string | null | undefined

The url of the resource.

IFieldsDefinition

Type definition

The most basic way to define a feature or feature set is by passing a collection of fields

Supertypes
Pick<FeatureLayer‚ "fields">

FeatureDefinition

Type definition

FeatureDefinition represents various ways a Feature variable could be defined. Layer instance is the most common way to define a feature, the minimum required is that the layer instance exposes a collection of fields. An object with just fields can be used to define a feature from a collection of fields. An object with a url property can be used to define a feature from a feature service. An object with minimal portal item properties and a layer id can be used to define a feature from a feature layer portal item. For the last two options, a feature layer instance will be created by the editor profile.

VoxelDefinition

Type definition

VoxelDefinition represents various ways a Voxel variable could be defined. Layer instance is the most common way to define a voxel.

PixelDefinition

Type definition

PixelDefinition represents various ways a Pixel variable could be defined.

FeatureSetDefinition

Type definition

FeatureSetDefinition represents the various ways a FeatureSet variable could be defined. See FeatureDefinition for more details.

FeatureSetCollectionDefinition

Type definition

FeatureSetCollectionDefinition represents the various ways a FeatureSetCollection could be defined as a feature service or a web map.

VariableDefinitions

Type definition

A collection of variables that make up a profile definition.

IExtendedPredefinedProfile

Type definition
Supertypes
IPredefinedProfile

additionalVariables

Property
Type
IProfileVariable[] | undefined

IEditorCodeSuggestionGroup

Type definition

label

Property
Type
string

Label for the suggestion group

suggestions

Property
Type
IEditorCodeSuggestion[]

List of suggestions for the group

IEditorCodeSuggestion

Type definition

label

Property
Type
string

A short label for the suggestion. Can be thought as a title

description

Property
Type
string | undefined

A short description that will be showed below the label in the list of suggestions panel

documentation

Property
Type
string | undefined

Markdown string that will be rendered along with the code in the detail panel

code

Property
Type
string

The code for the suggestion. Will be injected in the editor is selected

SidePanelName

Type definition
Type
"api" | "none" | "suggestions" | "variables"

IContextReferences

Type definition

spatialReference

Property
Type
SpatialReference | { wkid: number; } | null | undefined

Spatial reference object used to define the spatial reference for the arcade runtime. By defaults, the spatial reference is set to Web Mercator (wkid: 3857).

timeZone

Property
Type
string | undefined

Defines the default time zone in which to create and display Arcade date types. By default, the time zone is set to "system".

services

Property
Type
ArcadeServices | undefined

Defines the "services" passed to the arcade executor.

IEditorTestContext

Type definition

If a profile doesn't contain a map, the spatial reference of geometries will be defaulted to wkid: 3857. The test context objects allows to set the execution spatial reference for such scenario.

Supertypes
IContextReferences

profileVariableInstances

Property
Type
ProfileVariableInstances

An object of key/value pairs where the key is the name of a profile variable. The key's value must be of type ArcGIS core ProfileVariableInstance.