import type { Diagnostic, IEditorProfileDefinition, IPredefinedProfile, ProfileVariableValueType, IProfileVariable } from "@arcgis/coding-components/components/types.js";Type definitions
IEditorProfileDefinition
Editor Profile definition used for configuring the editor:
- presenting to the user the Arcade API
- validating the expression
- proposing code completion
- formatting code
variables
- 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.
bundles
- Type
- BundleType[] | undefined
The Arcade API bundles that the editor should use during validation and completion.
additionalApiItems
- Type
- ApiItem[] | undefined
A collection of additional Arcade API items that will be provided at runtime.
IPredefinedProfile
definitions
- Type
- VariableDefinitions
Provides the definitions for the definition based variables (feature, featureSet, featureSetCollection).
ProfileVariableValueType
The type of value variables supported.
- Type
- "boolean" | "date" | "dateOnly" | "geometry" | "knowledgeGraph" | "number" | "text" | "time"
IProfileValue
Single value profile variable declaration.
- Supertypes
- IProfileVariableBase
IProfileDictionary
Dictionary profile variable declaration. Properties of a dictionary are profile variables.
- Supertypes
- IProfileVariableBase
properties
- Type
- IProfileVariable[] | undefined
The dictionary properties. Properties are variables as well.
IProfileArray
Dictionary profile variable declaration. Properties of a dictionary are profile variables.
- Supertypes
- IProfileVariableBase
IProfileFeature
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.
- Supertypes
- IProfileVariableBase
definition
- Type
- FeatureDefinition | undefined
Describes how the editor will find the definition for the feature.
IProfileFeatureSet
FeatureSet profile variable declaration. FeatureSet represents a collection of Features. Individual feature or subset of features can be accessed by using specialized Arcade functions.
- Supertypes
- IProfileVariableBase
definition
- Type
- FeatureSetDefinition | undefined
Describes how the editor will find the definition for the feature set.
IProfileFeatureSetCollection
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.
- Supertypes
- IProfileVariableBase
IProfileVoxel
Voxel profile variable declaration.
- Supertypes
- IProfileVariableBase
definition
- Type
- VoxelDefinition | undefined
Describes how the editor will find the definition for the voxel.
IProfilePixel
Pixel profile variable declaration.
- Supertypes
- IProfileVariableBase
definition
- Type
- PixelDefinition | undefined
Describes how the editor will find the definition for the pixel.
IFeatureLikeProfile
- Type
- IProfileFeature | IProfilePixel | IProfileVoxel
IPortalItemDefinition
WebMap and Service FeatureSetCollection can be defined by a portal item.
IFeatureLayerItemDefinition
FeatureLayer can be defined from a Feature Layer portal item.
- Supertypes
- IPortalItemDefinition
IUrlDefinition
FeatureLayers and GroupLayers can be created by providing the url to the resource in a feature service.
IFieldsDefinition
The most basic way to define a feature or feature set is by passing a collection of fields
- Supertypes
- Pick<FeatureLayer‚ "fields">
FeatureDefinition
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
VoxelDefinition represents various ways a Voxel variable could be defined. Layer instance is the most common way to define a voxel.
PixelDefinition
PixelDefinition represents various ways a Pixel variable could be defined.
FeatureSetDefinition
FeatureSetDefinition represents the various ways a FeatureSet variable could be defined. See FeatureDefinition for more details.
FeatureSetCollectionDefinition
FeatureSetCollectionDefinition represents the various ways a FeatureSetCollection could be defined as a feature service or a web map.
- Type
- IPortalItemDefinition | IUrlDefinition | Map | WebMap | WebScene
VariableDefinitions
A collection of variables that make up a profile definition.
- Supertypes
- Record<string‚ FeatureDefinition | FeatureSetCollectionDefinition | FeatureSetDefinition | IProfileVariable[] | undefined>
IExtendedPredefinedProfile
- Supertypes
- IPredefinedProfile
additionalVariables
- Type
- IProfileVariable[] | undefined
IContextReferences
spatialReference
- 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).
services
- Type
- ArcadeServices | undefined
Defines the "services" passed to the arcade executor.
IEditorTestContext
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