import type NetworkElement from "./NetworkElement.js"; import type { JSONSupport } from "../../../core/JSONSupport.js"; import type { TraverseType, DirtyStatusFilterType, ErrorStatusFilterType } from "../../../networks/support/typeUtils.js"; export interface TraverseAssociationsParametersProperties extends Partial> { /** * The date/timestamp (in UTC) to execute the function. This could be used to run the function in a moment in the past or in long transaction mode (undo/redo). Applicable to branch versioned datasets only. * * @see [Learn more about branch versioning](https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/data-management-strategies.htm#ESRI_SECTION1_6FA2CFB5F9484FF096740D653C674B5D). */ moment?: (Date | number | string) | null; } /** * TraverseAssociationsParameters describes the optional parameters to execute the * [traverseAssociations](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/traverseAssociations/) function, which returns a list of * [associations](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/Association/) and * [objects](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/TraverseAssociationsResult/#objects) filtered by the parameters set. * * @since 5.2 * @see [Association](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/Association/) * @see [TraverseAssociationsResult](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/TraverseAssociationsResult/) * @see [traverseAssociations](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/traverseAssociations/) * @example * // Define the TraverseAssociationsParameters * const traverseAssociationsParameters = new TraverseAssociationsParameters({ * direction: "ascending", * stopAtFirstSpatial: false, * elements: [ * { * networkSourceId: 10, * globalId: "{456C46BC-C7A2-4963-8670-FE2B6B299758}", * }, * ], * }); * * // Traverse associations * const response = await traverseAssociations(networkServiceUrl, traverseAssociationsParameters); * * // Print out the first association and first object * console.log(response.associations[0]); * console.log(response.objects[0]); */ export default class TraverseAssociationsParameters extends JSONSupport { constructor(properties?: TraverseAssociationsParametersProperties); /** Specifies the direction of the association traversal. */ accessor direction: [ "ascending" | "descending" ] | null | undefined; /** Specifies whether to filter based on the dirty status of the association. Possible values: none | dirty | notDirty */ accessor dirtyStatusFilter: DirtyStatusFilterType | null | undefined; /** The [NetworkElements](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/support/NetworkElement/) for which the association traversal is initiated. */ accessor elements: NetworkElement[] | null | undefined; /** Specifies whether to filter associations based on the error code. Possible values: none | inError | notInError */ accessor errorStatusFilter: ErrorStatusFilterType | null | undefined; /** The geodatabase version to execute the function against. Defaults to `SDE.DEFAULT`, if no version is provided. */ accessor gdbVersion: string | null | undefined; /** Specifies how many hops through the association graph are allowed in either the ascending or descending `direction`. Defaults to MAX_INT. */ accessor maxDepth: number | null | undefined; /** * The date/timestamp (in UTC) to execute the function. This could be used to run the function in a moment in the past or in long transaction mode (undo/redo). Applicable to branch versioned datasets only. * * @see [Learn more about branch versioning](https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/data-management-strategies.htm#ESRI_SECTION1_6FA2CFB5F9484FF096740D653C674B5D). */ get moment(): Date | null | undefined; set moment(value: (Date | number | string) | null | undefined); /** * If `true`, the traversal of associations from nonspatial object to feature will stop when a spatial feature is encountered. * The traversal will stop at the feature and will not traverse to the next nonspatial object. */ accessor stopAtFirstSpatial: boolean | null | undefined; /** * The type of traversal to perform. * * To create a custom traversal the `direction`, `dirtyStatusFilter`, `errorStatusFilter`, `stopAtFirstSpatial`, and `maxDepth` parameters can be used. * When a traversal type is specified using the type parameter other than the default "unspecified", these parameters are ignored. * * **Possible Values** * * Value | Description | * ----- | ----------- | * unspecified | A custom traversal will be performed according to these parameters: `direction`, `dirtyStatusFilter`, `errorStatusFilter`, `stopAtFirstSpatial`, and `maxDepth`. * dirty-area-expansion | Returns associations and objects that have been modified and are marked as dirty. Completes a downward traversal, then an ascending traversal, with an exit filter on the first spatial feature in each direction. * first-containers | Completes an ascending traversal on containment associations, with an exit filter on the first spatial feature. * spatial-parents | Completes an ascending traversal on all association types, with an exit filter on the first spatial feature. * top-containers | Completes an ascending traversal to return associations and objects with no exit filter. * errors-not-modified | Completes a downward traversal to return associations in error, with an exit filter on the first spatial feature. * modified-objects | Completes a downward traversal to return associations that are dirty, with an exit filter on the first spatial feature. */ accessor type: TraverseType[] | null | undefined; }