/** @packageDocumentation * @module Core */ import { Id64String } from "@bentley/bentleyjs-core"; import { FormatProps } from "@bentley/imodeljs-quantity"; /** * Type of an ECClass ID. * @public */ export declare type ClassId = Id64String; /** * Type of an ECInstance ID. * @public */ export declare type InstanceId = Id64String; /** * A key that uniquely identifies an instance in an iModel * @public */ export interface InstanceKey { /** Full class name in format `SchemaName:ClassName` */ className: string; /** ECInstance ID */ id: InstanceId; } /** @public */ export declare namespace InstanceKey { /** Compare 2 instance keys */ function compare(lhs: InstanceKey, rhs: InstanceKey): number; /** Serialize [[InstanceKey]] to JSON */ function toJSON(json: InstanceKey): InstanceKeyJSON; /** Deserialize [[InstanceKey]] from JSON */ function fromJSON(json: InstanceKeyJSON): { id: string; className: string; }; } /** * A serialized version of [[InstanceKey]] * @public */ export interface InstanceKeyJSON { className: string; id: string; } /** * Information about an ECClass * @public */ export interface ClassInfo { /** ECClass ID */ id: ClassId; /** Full class name in format `SchemaName:ClassName` */ name: string; /** ECClass label */ label: string; } /** @public */ export declare namespace ClassInfo { /** Serialize [[ClassInfo]] to JSON */ function toJSON(info: ClassInfo): ClassInfoJSON; /** Deserialize [[ClassInfo]] from JSON */ function fromJSON(json: ClassInfoJSON): ClassInfo; } /** * A serialized version of [[ClassInfo]] * @public */ export interface ClassInfoJSON { id: string; name: string; label: string; } /** * A serialized and compressed version of [[ClassInfo]] * @public */ export interface CompressedClassInfoJSON { name: string; label: string; } /** * A single choice in enumeration * @public */ export interface EnumerationChoice { /** Label of the choice */ label: string; /** Value of the choice */ value: string | number; } /** * Enumeration information * @public */ export interface EnumerationInfo { /** Available enumeration choices */ choices: EnumerationChoice[]; /** Is the enumeration strict (values only allowed from `choices` list) */ isStrict: boolean; } /** * Kind of quantity information * @public */ export interface KindOfQuantityInfo { /** Full name of KindOfQuantity in format `SchemaName:KindOfQuantityName` */ name: string; /** Label of KindOfQuantity */ label: string; /** * Persistence unit identifier. * @alpha Still not entirely clear how kind of quantities will be handled and what data we'll need */ persistenceUnit: string; /** * Active format that was used to format property value. * @alpha Still not entirely clear how kind of quantities will be handled and what data we'll need */ activeFormat?: FormatProps; } /** * A structure that describes an ECProperty * @public */ export interface PropertyInfo { /** Information about ECProperty class */ classInfo: ClassInfo; /** Name of the ECProperty */ name: string; /** Type name of the ECProperty */ type: string; /** Enumeration info if the property is enumerable */ enumerationInfo?: EnumerationInfo; /** * Kind of quantity information, if any. * @alpha Still not entirely clear how kind of quantities will be handled and what data we'll need */ kindOfQuantity?: KindOfQuantityInfo; /** Extended type name of the ECProperty if it has one */ extendedType?: string; } /** @public */ export declare namespace PropertyInfo { /** Serialize [[PropertyInfo]] to JSON */ function toJSON(info: PropertyInfo): PropertyInfoJSON; /** Serialize [[PropertyInfo]] to compressed JSON */ function toCompressedJSON(propertyInfo: PropertyInfo, classesMap: { [id: string]: CompressedClassInfoJSON; }): PropertyInfoJSON; /** Deserialize [[PropertyInfo]] from JSON */ function fromJSON(json: PropertyInfoJSON): PropertyInfo; } /** * A serialized version of [[PropertyInfo]] * @public */ export interface PropertyInfoJSON { classInfo: TClassInfoJSON; name: string; type: string; enumerationInfo?: EnumerationInfo; kindOfQuantity?: KindOfQuantityInfo; } /** * A structure that describes a related class and the properties of that relationship. * @public */ export interface RelatedClassInfo { /** Information about the source ECClass */ sourceClassInfo: ClassInfo; /** Information about the target ECClass */ targetClassInfo: ClassInfo; /** Is target class handled polymorphically */ isPolymorphicTargetClass: boolean; /** Information about the ECRelationship */ relationshipInfo: ClassInfo; /** Should relationship be followed in a forward direction to access the related class. */ isForwardRelationship: boolean; /** Is relationship handled polymorphically */ isPolymorphicRelationship: boolean; } /** @public */ export declare namespace RelatedClassInfo { /** Serialize [[RelatedClassInfo]] to JSON */ function toJSON(info: RelatedClassInfo): RelatedClassInfoJSON; /** Serialize [[RelatedClassInfo]] to compressed JSON */ function toCompressedJSON(classInfo: RelatedClassInfo, classesMap: { [id: string]: CompressedClassInfoJSON; }): RelatedClassInfoJSON; /** Deserialize [[RelatedClassInfo]] from JSON */ function fromJSON(json: RelatedClassInfoJSON): RelatedClassInfo; /** Deserialize [[RelatedClassInfo]] from compressed JSON */ function fromCompressedJSON(compressedInfoJSON: RelatedClassInfoJSON, classesMap: { [id: string]: CompressedClassInfoJSON; }): RelatedClassInfoJSON; /** Check two [[RelatedClassInfo]] or [[StrippedRelatedClassInfo]] for equality */ function equals(lhs: RelatedClassInfo | StrippedRelatedClassInfo, rhs: RelatedClassInfo | StrippedRelatedClassInfo): boolean; /** Strip given [[RelatedClassInfo]] to [[StrippedRelatedClassInfo]] */ function strip(full: RelatedClassInfo): StrippedRelatedClassInfo; } /** * A serialized version of [[RelatedClassInfo]] * @public */ export interface RelatedClassInfoJSON { sourceClassInfo: TClassInfoJSON; targetClassInfo: TClassInfoJSON; isPolymorphicTargetClass?: boolean; relationshipInfo: TClassInfoJSON; isForwardRelationship: boolean; isPolymorphicRelationship?: boolean; } /** * A structure that describes a related class path. * @public */ export declare type RelationshipPath = RelatedClassInfo[]; /** * Serialized [[RelationshipPath]] * @public */ export declare type RelationshipPathJSON = RelatedClassInfoJSON[]; /** @public */ export declare namespace RelationshipPath { /** Reverse direction of the given [[RelationshipPath]] */ function reverse(path: RelationshipPath): RelationshipPath; /** Check two [[RelationshipPath]] or [[StrippedRelationshipPath]] for equality */ function equals(lhs: Array, rhs: Array): boolean; /** Strip given [[RelationshipPath]] to [[StrippedRelationshipPath]] */ function strip(full: RelationshipPath): StrippedRelationshipPath; } /** * Data structure that contains a subset of [[RelatedClassInfo]] required to * identify the relationship. * @public */ export interface StrippedRelatedClassInfo { sourceClassName: string; targetClassName: string; relationshipName: string; isForwardRelationship: boolean; } /** * Data structure that contains a subset of [[RelationshipPath]] required to * identify the relationship path. * @public */ export declare type StrippedRelationshipPath = StrippedRelatedClassInfo[]; //# sourceMappingURL=EC.d.ts.map