packageDocumentation module import { Id64String } from "@itwin/core-bentley" ; import { UnitSystemKey } from "@itwin/core-quantity" ; import { SelectionInfo } from "./content/Descriptor" ; import { FieldDescriptor } from "./content/Fields" ; import { DiagnosticsOptionsWithHandler } from "./Diagnostics" ; import { InstanceKey } from "./EC" ; import { Ruleset } from "./rules/Ruleset" ; import { RulesetVariable } from "./RulesetVariables" ; public export interface RequestOptions < TIModel > { /** iModel to request data from */ imodel : TIModel ; /** Optional locale to use when formatting / localizing data */ locale ? : string ; /**
     * Unit system to use when formatting property values with units. Default presentation
     * unit is used if unit system is not specified.
     */ unitSystem ? : UnitSystemKey ; alpha diagnostics ? : DiagnosticsOptionsWithHandler ; } public export interface RequestOptionsWithRuleset < TIModel , TRulesetVariable = RulesetVariable > extends RequestOptions < TIModel > { /** Ruleset or id of the ruleset to use when requesting data */ rulesetOrId : Ruleset | string ; /** Ruleset variables to use when requesting data */ rulesetVariables ? : TRulesetVariable [ ] ; } public export interface HierarchyRequestOptions < TIModel , TNodeKey , TRulesetVariable = RulesetVariable > extends RequestOptionsWithRuleset < TIModel , TRulesetVariable > { /** Key of the parent node to get children for */ parentKey ? : TNodeKey ; } public export interface FilterByInstancePathsHierarchyRequestOptions < TIModel , TRulesetVariable = RulesetVariable > extends RequestOptionsWithRuleset < TIModel , TRulesetVariable > { /** A list of paths from root ECInstance to target ECInstance. */ instancePaths : InstanceKey [ ] [ ] ; /**
     * An optional index (`0 <= markedIndex < instancePaths.length`) to mark one of the instance paths. The
     * path is marked using `NodePathElement.isMarked` flag in the result.
     */ markedIndex ? : number ; } public export interface FilterByTextHierarchyRequestOptions < TIModel , TRulesetVariable = RulesetVariable > extends RequestOptionsWithRuleset < TIModel , TRulesetVariable > { /** Text to filter the hierarchy by. */ filterText : string ; } beta export interface ContentSourcesRequestOptions < TIModel > extends RequestOptions < TIModel > { /** Full names of classes to get content sources for. */ classes : string [ ] ; } public export interface ContentDescriptorRequestOptions < TIModel , TKeySet , TRulesetVariable = RulesetVariable > extends RequestOptionsWithRuleset < TIModel , TRulesetVariable > { see displayType : string ; /** Input keys for getting the content */ keys : TKeySet ; /** Information about the selection event that was the cause of this content request */ selection ? : SelectionInfo ; } public export interface ContentRequestOptions < TIModel , TDescriptor , TKeySet , TRulesetVariable = RulesetVariable > extends RequestOptionsWithRuleset < TIModel , TRulesetVariable > { /** Content descriptor for customizing the returned content */ descriptor : TDescriptor ; /** Input keys for getting the content */ keys : TKeySet ; } public export interface DistinctValuesRequestOptions < TIModel , TDescriptor , TKeySet , TRulesetVariable = RulesetVariable > extends Paged < RequestOptionsWithRuleset < TIModel , TRulesetVariable > > { /** Content descriptor for customizing the returned content */ descriptor : TDescriptor ; /** Input keys for getting the content */ keys : TKeySet ; /** Descriptor for a field distinct values are requested for */ fieldDescriptor : FieldDescriptor ; } beta export type ElementPropertiesRequestOptions < TIModel > = SingleElementPropertiesRequestOptions < TIModel > | MultiElementPropertiesRequestOptions < TIModel > ; beta export interface SingleElementPropertiesRequestOptions < TIModel > extends RequestOptions < TIModel > { /** ID of the element to get properties for. */ elementId : Id64String ; } beta export interface MultiElementPropertiesRequestOptions < TIModel > extends RequestOptions < TIModel > { /** Classes of the elements to get properties for. If `elementClasses` is undefined all classes
     * are used. Classes should be specified in one of these formats: "<schema name or alias>.<class_name>",
     * "<schema name or alias>:<class_name>".
     */ elementClasses ? : string [ ] ; } beta export interface ContentInstanceKeysRequestOptions < TIModel , TKeySet , TRulesetVariable = RulesetVariable > extends Paged < RequestOptionsWithRuleset < TIModel , TRulesetVariable > > { see displayType ? : string ; /** Input keys for getting the content. */ keys : TKeySet ; } public export interface DisplayLabelRequestOptions < TIModel , TInstanceKey > extends RequestOptions < TIModel > { /** Key of ECInstance to get label for */ key : TInstanceKey ; } public export interface DisplayLabelsRequestOptions < TIModel , TInstanceKey > extends RequestOptions < TIModel > { /** Keys of ECInstances to get labels for */ keys : TInstanceKey [ ] ; } public export interface SelectionScopeRequestOptions < TIModel > extends RequestOptions < TIModel > { } public export interface HierarchyCompareOptions < TIModel , TNodeKey , TRulesetVariable = RulesetVariable > extends RequestOptionsWithRuleset < TIModel , TRulesetVariable > { prev : { rulesetOrId ? : Ruleset | string ; rulesetVariables ? : TRulesetVariable [ ] ; } ; expandedNodeKeys ? : TNodeKey [ ] ; continuationToken ? : { prevHierarchyNode : string ; currHierarchyNode : string ; } ; resultSetSize ? : number ; } public export interface PageOptions { /** Inclusive start 0-based index of the page */ start ? : number ; /** Maximum size of the page */ size ? : number ; } public export type Paged < TOptions extends { } > = TOptions & { /** Optional paging parameters */ paging ? : PageOptions ; } ; public export type Prioritized < TOptions extends { } > = TOptions & { /** Optional priority */ priority ? : number ; } ; beta export function isSingleElementPropertiesRequestOptions < TIModel > ( options ) { return ( options as SingleElementPropertiesRequestOptions < TIModel > ) . elementId !== undefined ; }