/** @packageDocumentation * @module Core */ import { Id64String } from "@bentley/bentleyjs-core"; import { DescriptorOverrides, SelectionInfo } from "./content/Descriptor"; import { FieldDescriptor } from "./content/Fields"; import { DiagnosticsOptionsWithHandler } from "./Diagnostics"; import { Ruleset } from "./rules/Ruleset"; import { RulesetVariable } from "./RulesetVariables"; import { SelectionScopeProps } from "./selection/SelectionScope"; /** * Enumeration of standard request priorities. * @public */ export declare enum RequestPriority { /** Priority for pre-loading requests */ Preload = 0, /** Priority for general requests */ Normal = 1000, /** Max possible priority */ Max } /** * Enumeration of unit systems that can be used when formatting values. * @beta */ export declare enum PresentationUnitSystem { Metric = "metric", BritishImperial = "british-imperial", UsCustomary = "us-customary", UsSurvey = "us-survey" } /** * A generic request options type used for both hierarchy and content requests * @public */ export interface RequestOptions { /** 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. * * @beta */ unitSystem?: PresentationUnitSystem; /** * Optional request priority. Higher priority requests are handled first. * Defaults to [[RequestPriority.Normal]] */ priority?: number; /** @alpha */ diagnostics?: DiagnosticsOptionsWithHandler; } /** * Options for requests that require presentation ruleset. Not * meant to be used directly, see one of the subclasses. * * @public */ export interface RequestOptionsWithRuleset extends RequestOptions { /** Ruleset or id of the ruleset to use when requesting data */ rulesetOrId: Ruleset | string; /** Ruleset variables to use when requesting data */ rulesetVariables?: TRulesetVariable[]; } /** * Base request type for hierarchy requests * @public * @deprecated Use [[ExtendedHierarchyRequestOptions]] */ export interface HierarchyRequestOptions extends RequestOptionsWithRuleset { } /** * Request type for hierarchy requests * @public */ export interface ExtendedHierarchyRequestOptions extends RequestOptionsWithRuleset { /** Key of the parent node to get children for */ parentKey?: TNodeKey; } /** @internal */ export declare const isExtendedHierarchyRequestOptions: (opts: HierarchyRequestOptions | ExtendedHierarchyRequestOptions) => opts is ExtendedHierarchyRequestOptions; /** * Request type for content requests * @public * @deprecated Use [[ContentDescriptorRequestOptions]] or [[ExtendedContentRequestOptions]] */ export interface ContentRequestOptions extends RequestOptionsWithRuleset { } /** * Request type for content descriptor requests * @public */ export interface ContentDescriptorRequestOptions extends RequestOptionsWithRuleset { /** * Content display type. * @see [[DefaultContentDisplayTypes]] */ 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; } /** @internal */ export declare const isContentDescriptorRequestOptions: (opts: ContentRequestOptions | ContentDescriptorRequestOptions) => opts is ContentDescriptorRequestOptions; /** * Request type for content requests * @public */ export interface ExtendedContentRequestOptions extends RequestOptionsWithRuleset { /** Content descriptor or overrides for customizing the returned content */ descriptor: TDescriptor | DescriptorOverrides; /** Input keys for getting the content */ keys: TKeySet; } /** @internal */ export declare const isExtendedContentRequestOptions: (opts: ContentRequestOptions | ExtendedContentRequestOptions) => opts is ExtendedContentRequestOptions; /** * Request type for distinct values' requests * @public */ export interface DistinctValuesRequestOptions extends Paged> { /** Content descriptor for content we're requesting distinct values for or overrides for customizing the returned content */ descriptor: TDescriptor | DescriptorOverrides; /** Input keys for getting the content */ keys: TKeySet; /** Descriptor for a field distinct values are requested for */ fieldDescriptor: FieldDescriptor; } /** * Request type for element properties requests. * @beta */ export interface ElementPropertiesRequestOptions extends RequestOptions { /** ID of the element to get properties for. */ elementId: Id64String; } /** * Request type for label requests * @public * @deprecated Use [[DisplayLabelRequestOptions]] or [[DisplayLabelsRequestOptions]] */ export interface LabelRequestOptions extends RequestOptions { } /** * Request type for label requests * @public */ export interface DisplayLabelRequestOptions extends RequestOptions { /** Key of ECInstance to get label for */ key: TInstanceKey; } /** @internal */ export declare const isDisplayLabelRequestOptions: (opts: LabelRequestOptions | DisplayLabelRequestOptions) => opts is DisplayLabelRequestOptions; /** * Request type for labels requests * @public */ export interface DisplayLabelsRequestOptions extends RequestOptions { /** Keys of ECInstances to get labels for */ keys: TInstanceKey[]; } /** @internal */ export declare const isDisplayLabelsRequestOptions: (opts: LabelRequestOptions | DisplayLabelsRequestOptions) => opts is DisplayLabelsRequestOptions; /** * Request options used for selection scope related requests * @public */ export interface SelectionScopeRequestOptions extends RequestOptions { } /** * Request options used for calculating selection based on picked instance ksy and selection scope * @alpha */ export interface ComputeSelectionRequestOptions extends RequestOptions { elementIds: Id64String[]; scope: SelectionScopeProps; } /** @internal */ export declare function isComputeSelectionRequestOptions(options: ComputeSelectionRequestOptions | SelectionScopeRequestOptions): options is ComputeSelectionRequestOptions; /** * Data structure for comparing presentation data after ruleset or ruleset variable changes. * @public * @deprecated Use [[HierarchyCompareOptions]] */ export declare type PresentationDataCompareOptions = HierarchyCompareOptions; /** * Data structure for comparing a hierarchy after ruleset or ruleset variable changes. * @public */ export interface HierarchyCompareOptions extends RequestOptionsWithRuleset { prev: { rulesetOrId?: Ruleset | string; rulesetVariables?: TRulesetVariable[]; }; expandedNodeKeys?: TNodeKey[]; continuationToken?: { prevHierarchyNode: string; currHierarchyNode: string; }; resultSetSize?: number; } /** * Paging options * @public */ export interface PageOptions { /** Inclusive start 0-based index of the page */ start?: number; /** Maximum size of the page */ size?: number; } /** * A wrapper type that injects [[PageOptions]] into supplied type * @public */ export declare type Paged = TOptions & { /** Optional paging parameters */ paging?: PageOptions; }; //# sourceMappingURL=PresentationManagerOptions.d.ts.map