@itwin/core-backend 5.0.0-dev.82 → 5.0.0-dev.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -461,7 +461,6 @@ export declare abstract class InformationReferenceElement extends InformationCon
461
461
  protected constructor(props: ElementProps, iModel: IModelDb);
462
462
  }
463
463
  /** A Subject is an information element that describes what this repository (or part thereof) is about.
464
- * See [how to create a Subject element]($docs/learning/backend/CreateElements.md#Subject).
465
464
  * @public
466
465
  */
467
466
  export declare class Subject extends InformationReferenceElement {
@@ -1 +1 @@
1
- {"version":3,"file":"Element.d.ts","sourceRoot":"","sources":["../../src/Element.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAqB,UAAU,EAAQ,OAAO,EAAE,UAAU,EAA+B,MAAM,qBAAqB,CAAC;AAC5H,OAAO,EACL,gBAAgB,EAAe,IAAI,EAAE,cAAc,EAAY,mBAAmB,EAAE,sBAAsB,EAAE,mBAAmB,EAC/H,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,qBAAqB,EAC3E,iBAAiB,EAAE,mBAAmB,EAAU,gCAAgC,EAAE,cAAc,EAC9I,UAAU,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAClI,mBAAmB,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,WAAW,EAAE,wBAAwB,EAC5G,UAAU,EAAE,kBAAkB,EAAE,YAAY,EAAE,cAAc,EAAE,0BAA0B,EAAE,YAAY,EACvG,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAW,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,yBAAyB,EAAE,M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AW;CA2B7H"}
@@ -554,7 +554,6 @@ class InformationReferenceElement extends InformationContentElement {
554
554
  }
555
555
  exports.InformationReferenceElement = InformationReferenceElement;
556
556
  /** A Subject is an information element that describes what this repository (or part thereof) is about.
557
- * See [how to create a Subject element]($docs/learning/backend/CreateElements.md#Subject).
558
557
  * @public
559
558
  */
560
559
  class Subject extends InformationReferenceElement {
@@ -1 +1 @@
1
- {"version":3,"file":"Element.js","sourceRoot":"","sources":["../../src/Element.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;AAEH,sDAA4H;AAC5H,oDAO4B;AAC5B,wDAAsE;AACtE,qCAAkC;AAGlC,mCAA4F;AAC5F,qEAA+D;AAC/D,gDAAwE;AAuExE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAa,OAAQ,SAAQ,eAAM;IAC1B,MAAM,KAAc,SAAS,KAAa,OAAO,SAAS,CAAC,CAAC,CAAC;IACpE,gBAAgB;IACT,MAAM,KAAc,mBAAmB,KAAK,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAEjG,6GAA6G;IAC7F,KAAK,CAAa;IAClC,yEAAyE;IAClE,IAAI,CAAO;IAClB,uDAAuD;IAChD,MAAM,CAAkB;IAC/B,wJAAwJ;IACjJ,cAAc,CAAc;IACnC,gHAAgH;IACzG,SAAS,CAAU;IAC1B,uHAAuH;IACvG,cAAc,CAAyB;IAEvD,YAAsB,KAAmB,EAAE,MAAgB;QACzD,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,kBAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAE,0EAA0E;QAClH,IAAI,CAAC,KAAK,GAAG,4BAAc,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,GAAG,4BAAc,CAAC,QAAQ,CAAC,KA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,GAAG,IAAI,+BAAgB,EAAE,CAAC;QAC1C,KAAK,MAAM,KAAK,IAAI,KAAK,EAAE,CAAC;YAC1B,MAAM,OAAO,GAAG,OAAO,CAAC,mBAAmB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC3D,IAAI,CAAC,mBAAI,CAAC,OAAO,CAAC,OAAO,CAAC;gBACxB,SAAS;YAEX,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;YACxB,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACxB,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,gBAAgB,EAAE,CAAC;gBAC7C,UAAU,CAAC,KAAK,EAAE,CAAC;gBACnB,KAAK,MAAM,QAAQ,IAAI,4BAAc,CAAC,eAAe,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;oBACxF,MAAM,QAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;oBACvD,IAAI,mBAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;wBACxB,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;gBAChC,CAAC;gBAED,OAAO,CAAC,UAAU,GAAG,gCAAiB,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YACjE,CAAC;QACH,CAAC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;CACF;AA/ED,wCA+EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Elements\n */\n\nimport { CompressedId64Set, GuidString, Id64, Id64Set, Id64String, JsonUtils, OrderedId64Array } from \"@itwin/core-bentley\";\nimport {\n AxisAlignedBox3d, BisCodeSpec, Code, CodeScopeProps, CodeSpec, ConcreteEntityTypes, DefinitionElementProps, ElementAlignedBox3d,\n ElementProps, EntityMetaData, EntityReferenceSet, GeometricElement2dProps, GeometricElement3dProps, GeometricElementProps,\n GeometricModel2dProps, GeometricModel3dProps, GeometryPartProps, GeometryStreamProps, IModel, InformationPartitionElementProps, LineStyleProps,\n ModelProps, PhysicalElementProps, PhysicalTypeProps, Placement2d, Placement3d, RelatedElement, RenderSchedule, RenderTimelineProps,\n RepositoryLinkProps, SectionDrawingLocationProps, SectionDrawingProps, SectionType, SheetBorderTemplateProps,\n SheetProps, SheetTemplateProps, SubjectProps, TypeDefinition, TypeDefinitionElementProps, UrlLinkProps,\n} from \"@itwin/core-common\";\nimport { ClipVector, Range3d, Transform } from \"@itwin/core-geometry\";\nimport { Entity } from \"./Entity\";\nimport { IModelDb } from \"./IModelDb\";\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\nimport { DefinitionModel, DrawingModel, PhysicalModel, SectionDrawingModel } from \"./Model\";\nimport { SubjectOwnsSubjects } from \"./NavigationRelationship\";\nimport { _elementWasCreated, _verifyChannel } from \"./internal/Symbols\";\n\n/** Argument for the `Element.onXxx` static methods\n * @beta\n */\nexport interface OnElementArg {\n /** The iModel for the Element affected by this method. */\n iModel: IModelDb;\n}\n\n/** Argument for `Element.onInsert` and `Element.onUpdate` static methods.\n * @beta\n */\nexport interface OnElementPropsArg extends OnElementArg {\n /** The properties of the Element affected by this method.\n * @note the properties may be modified. If so the modified values will be inserted/updated.\n */\n props: ElementProps;\n}\n\n/** Argument for the `Element.onXxx` static methods that notify of operations to an existing Element supplying its Id, ModelId and FederationGuid.\n * @beta\n */\nexport interface OnElementIdArg extends OnElementArg {\n /** The Id of the Element affected by this method */\n id: Id64String;\n /** The ModelId of the element affected by this method */\n model: Id64String;\n /** The federationGuid of the element affected by this method */\n federationGuid: GuidString;\n}\n\n/** Argument for the `Element.onChildXxx` static methods\n * @beta\n */\nexport interface OnChildElementArg extends OnElementArg {\n parentId: Id64String;\n}\n\n/** Argument for the `Element.onChildXxx` static methods that supply the properties of the child Element to be inserted or updated.\n * @beta\n */\nexport interface OnChildElementPropsArg extends OnChildElementArg {\n /** The new properties of the child Element for this method. */\n childProps: Readonly<ElementProps>;\n}\n\n/** Argument for the `Element.onChildXxx` static methods that only supply the Id of the child Element.\n * @beta\n */\nexport interface OnChildElementIdArg extends OnChildElementArg {\n /** The Id of the child element for this method */\n childId: Id64String;\n}\n\n/** Argument for the `Element.onSubModelInsert` static method\n * @beta\n */\nexport interface OnSubModelPropsArg extends OnElementArg {\n /** The properties of the prospective sub-model */\n subModelProps: ModelProps;\n}\n\n/** Argument for several `Element.onSubModelXxx` static methods\n * @beta\n */\nexport interface OnSubModelIdArg extends OnElementArg {\n /** The modelId of the sub Model */\n subModelId: Id64String;\n}\n\n/** The smallest individually identifiable building block for modeling the real world in an iModel.\n * Each element represents an [[Entity]] in the real world. Sets of Elements (contained in [[Model]]s) are used to model\n * other Elements that represent larger scale real world entities. Using this recursive modeling strategy,\n * Elements can represent entities at any scale. Elements can represent physical things or abstract concepts\n * or simply be information records.\n *\n * Every Element has a 64-bit id (inherited from Entity) that uniquely identifies it within an iModel. Every Element also\n * has a [[code]] that identifies its meaning in the real world. Additionally, Elements may have a [[federationGuid]]\n * to hold a GUID, if the element was assigned that GUID by some other federated database. The iModel database enforces\n * uniqueness of id, code, and federationGuid.\n *\n * The Element class provides `static` methods like [[onInsert]], [[onUpdated]], [[onCloned]], and [[onChildAdded]] that enable\n * it to customize persistence operations. For example, the base implementations of [[onInsert]], [[onUpdate]], and [[onDelete]]\n * validate that the appropriate [locks]($docs/learning/backend/ConcurrencyControl.md), [codes]($docs/learning/backend/CodeService.md),\n * and [channel permissions]($docs/learning/backend/Channel.md) are obtained before a change to the element is written to the iModel.\n * A subclass of Element that overrides any of these methods **must** call the `super` method as well. An application that supplies its\n * own Element subclasses should register them at startup via [[ClassRegistry.registerModule]] or [[ClassRegistry.register]].\n *\n * See:\n * * [Element Fundamentals]($docs/bis/guide/fundamentals/element-fundamentals.md)\n * * [Working with schemas and elements in TypeScript]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\n * * [Creating elements]($docs/learning/backend/CreateElements.md)\n * @public\n */\nexport class Element extends Entity {\n public static override get className(): string { return \"Element\"; }\n /** @internal */\n public static override get protectedOperations() { return [\"onInsert\", \"onUpdate\", \"onDelete\"]; }\n\n /** The ModelId of the [Model]($docs/bis/guide/fundamentals/model-fundamentals.md) containing this element */\n public readonly model: Id64String;\n /** The [Code]($docs/bis/guide/fundamentals/codes.md) for this element */\n public code: Code;\n /** The parent element, if present, of this element. */\n public parent?: RelatedElement;\n /** A [FederationGuid]($docs/bis/guide/fundamentals/element-fundamentals.md#federationguid) assigned to this element by some other federated database */\n public federationGuid?: GuidString;\n /** A [user-assigned label]($docs/bis/guide/fundamentals/element-fundamentals.md#userlabel) for this element. */\n public userLabel?: string;\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this element. */\n public readonly jsonProperties: { [key: string]: any };\n\n protected constructor(props: ElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.code = Code.fromJSON(props.code); // TODO: Validate props.code - don't silently fail if it is the wrong type\n this.model = RelatedElement.idFromJson(props.model);\n this.parent = RelatedElement.fromJSON(props.parent);\n this.federationGuid = props.federationGuid;\n this.userLabel = props.userLabel;\n this.jsonProperties = { ...props.jsonProperties }; // make sure we have our own copy\n }\n\n /** Called before a new Element is inserted.\n * @note throw an exception to disallow the insert\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element to be inserted\n * @beta\n */\n protected static onInsert(arg: OnElementPropsArg): void {\n const { iModel, props } = arg;\n const operation = \"insert\";\n iModel.channels[_verifyChannel](arg.props.model);\n iModel.locks.checkSharedLock(props.model, \"model\", operation); // inserting requires shared lock on model\n if (props.parent) // inserting requires shared lock on parent, if present\n iModel.locks.checkSharedLock(props.parent.id, \"parent\", operation);\n iModel.codeService?.verifyCode(arg);\n }\n\n /** Called after a new Element was inserted.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element that was inserted\n * @beta\n */\n protected static onInserted(arg: OnElementIdArg): void {\n const locks = arg.iModel.locks;\n if (locks && !locks.holdsExclusiveLock(arg.model))\n locks[_elementWasCreated](arg.id);\n }\n\n /** Called before an Element is updated.\n * @note throw an exception to disallow the update\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element to be updated\n * @beta\n */\n protected static onUpdate(arg: OnElementPropsArg): void {\n const { iModel, props } = arg;\n iModel.channels[_verifyChannel](props.model);\n iModel.locks.checkExclusiveLock(props.id!, \"element\", \"update\"); // eslint-disable-line @typescript-eslint/no-non-null-assertion\n iModel.codeService?.verifyCode(arg);\n }\n\n /** Called after an Element was updated.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element that was updated\n * @beta\n */\n protected static onUpdated(_arg: OnElementIdArg): void { }\n\n /** Called before an Element is deleted.\n * @note throw an exception to disallow the delete\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element to be deleted\n * @beta\n */\n protected static onDelete(arg: OnElementIdArg): void {\n arg.iModel.channels[_verifyChannel](arg.model);\n arg.iModel.locks.checkExclusiveLock(arg.id, \"element\", \"delete\");\n }\n\n /** Called after an Element was deleted.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element that was deleted\n * @beta\n */\n protected static onDeleted(_arg: OnElementIdArg): void { }\n\n /** Called when an element with an instance of this class as its parent is about to be deleted.\n * @note throw an exception if the element should not be deleted\n * @note implementers should not presume that the element was deleted if this method does not throw,\n * since the delete may fail for other reasons. Instead, rely on [[onChildDeleted]] for that purpose.\n * @note `this` is the class of the parent Element whose child will be deleted\n * @beta\n */\n protected static onChildDelete(_arg: OnChildElementIdArg): void { }\n\n /** Called after an element with an instance of this class as its parent was successfully deleted.\n * @note `this` is the class of the parent Element whose child was deleted\n * @beta\n */\n protected static onChildDeleted(_arg: OnChildElementIdArg): void { }\n\n /** Called when a *new element* with an instance of this class as its parent is about to be inserted.\n * @note throw an exception if the element should not be inserted\n * @note `this` is the class of the prospective parent Element.\n * @beta\n */\n protected static onChildInsert(_arg: OnChildElementPropsArg): void { }\n\n /** Called after a *new element* with an instance of this class as its parent was inserted.\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildInserted(_arg: OnChildElementIdArg): void { }\n\n /** Called when an element with an instance of this class as its parent is about to be updated.\n * @note throw an exception if the element should not be updated\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildUpdate(_arg: OnChildElementPropsArg): void { }\n\n /** Called after an element with an instance of this the class as its parent was updated.\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildUpdated(_arg: OnChildElementIdArg): void { }\n\n /** Called when an *existing element* is about to be updated so that an instance of this class will become its new parent.\n * @note throw an exception if the element should not be added\n * @note `this` is the class of the prospective parent Element.\n * @beta\n */\n protected static onChildAdd(_arg: OnChildElementPropsArg): void { }\n\n /** Called after an *existing element* has been updated so that an instance of this class is its new parent.\n * @note `this` is the class of the new parent Element.\n * @beta\n */\n protected static onChildAdded(_arg: OnChildElementIdArg): void { }\n\n /** Called when an element with an instance of this class as its parent is about to be updated change to a different parent.\n * @note throw an exception if the element should not be dropped\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildDrop(_arg: OnChildElementIdArg): void { }\n\n /** Called after an element with an instance of this class as its previous parent was updated to have a new parent.\n * @note `this` is the class of the previous parent Element.\n * @beta\n */\n protected static onChildDropped(_arg: OnChildElementIdArg): void { }\n\n /** Called when an instance of this class is being *sub-modeled* by a new Model.\n * @note throw an exception if model should not be inserted\n * @note `this` is the class of Element to be sub-modeled.\n * @beta\n */\n protected static onSubModelInsert(_arg: OnSubModelPropsArg): void { }\n\n /** Called after an instance of this class was *sub-modeled* by a new Model.\n * @note `this` is the class of Element that is now sub-modeled.\n * @beta\n */\n protected static onSubModelInserted(_arg: OnSubModelIdArg): void { }\n\n /** Called when a sub-model of an instance of this class is being deleted.\n * @note throw an exception if model should not be deleted\n * @note `this` is the class of Element that is sub-modeled.\n * @beta\n */\n protected static onSubModelDelete(_arg: OnSubModelIdArg): void { }\n\n /** Called after a sub-model of an instance of this class was deleted.\n * @note `this` is the class of Element that was sub-modeled.\n * @beta\n */\n protected static onSubModelDeleted(_arg: OnSubModelIdArg): void { }\n\n /** Called during the iModel transformation process after an Element from the source iModel was *cloned* for the target iModel.\n * The transformation process automatically handles remapping BisCore properties and those that are properly described in ECSchema.\n * This callback is only meant to be overridden if there are other Ids in non-standard locations that need to be remapped or other data that needs to be fixed up after the clone.\n * @param _context The context that persists any remapping between the source iModel and target iModel.\n * @param _sourceProps The ElementProps for the source Element that was cloned.\n * @param _targetProps The ElementProps that are a result of the clone. These can be further modified.\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onCloned(_context: IModelElementCloneContext, _sourceProps: ElementProps, _targetProps: ElementProps): void { }\n\n /** Called when a *root* element in a subgraph is changed and before its outputs are processed.\n * This special callback is made when:\n * * the element is part of an [[ElementDrivesElement]] graph, and\n * * the element has no inputs, and\n * * none of the element's outputs have been processed.\n * @see [[ElementDrivesElement]] for more on element dependency graphs.\n * @beta\n */\n protected static onBeforeOutputsHandled(_id: Id64String, _iModel: IModelDb): void { }\n\n /** Called on an element in a graph after all of its inputs have been processed and before its outputs are processed.\n * This callback is made when:\n * * the specified element is part of an [[ElementDrivesElement]] graph, and\n * * there was a direct change to some element upstream in the dependency graph.\n * * all upstream elements in the graph have been processed.\n * * none of the downstream elements have been processed.\n * This method is not called if none of the element's inputs were changed.\n * @see [[ElementDrivesElement]] for more on element dependency graphs.\n * @beta\n */\n protected static onAllInputsHandled(_id: Id64String, _iModel: IModelDb): void { }\n\n public override toJSON(): ElementProps {\n const val = super.toJSON() as ElementProps;\n\n if (Code.isValid(this.code))\n val.code = this.code;\n\n val.model = this.model;\n if (undefined !== this.userLabel) // NOTE: blank string should be included in JSON\n val.userLabel = this.userLabel;\n if (this.federationGuid)\n val.federationGuid = this.federationGuid;\n if (this.parent)\n val.parent = this.parent;\n\n if (Object.keys(this.jsonProperties).length > 0)\n val.jsonProperties = this.jsonProperties;\n\n return val;\n }\n\n /** Collect the Ids of this element's *references* at this level of the class hierarchy.\n * @deprecated in 3.x. use [[collectReferenceIds]] instead, the use of the term *predecessors* was confusing and became inaccurate when the transformer could handle cycles\n * @beta\n */\n protected collectPredecessorIds(predecessorIds: EntityReferenceSet): void {\n return this.collectReferenceIds(predecessorIds);\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addModel(this.model); // The modeledElement is a reference\n if (this.code.scope && Id64.isValidId64(this.code.scope))\n referenceIds.addElement(this.code.scope); // The element that scopes the code is a reference\n if (this.parent)\n referenceIds.addElement(this.parent.id); // A parent element is a reference\n }\n\n /** Get the Ids of this element's *references*. A *reference* is any element whose id is stored in the EC data of this element\n * This is important for cloning operations but can be useful in other situations as well.\n * @beta\n * @deprecated in 3.x. use [[getReferenceIds]] instead, the use of the term *predecessors* was confusing and became inaccurate when the transformer could handle cycles\n */\n public getPredecessorIds(): Id64Set {\n return this.getReferenceIds();\n }\n\n /** A *required reference* is an element that had to be inserted before this element could have been inserted.\n * This is the list of property keys on this element that store references to those elements\n * @note This should be overridden (with `super` called) at each level of the class hierarchy that introduces required references.\n * @note any property listed here must be added to the reference ids in [[collectReferenceIds]]\n * @beta\n */\n public static readonly requiredReferenceKeys: ReadonlyArray<string> = [\"parent\", \"model\"];\n\n /** A map of every [[requiredReferenceKeys]] on this class to their entity type.\n * @note This should be overridden (with `super` called) at each level of the class hierarchy that introduces required references.\n * @alpha\n */\n public static readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n parent: ConcreteEntityTypes.Element,\n model: ConcreteEntityTypes.Model,\n };\n\n /** Get the class metadata for this element. */\n public getClassMetaData(): EntityMetaData | undefined { return this.iModel.classMetaDataRegistry.find(this.classFullName); }\n\n private getAllUserProperties(): any {\n if (!this.jsonProperties.UserProps)\n this.jsonProperties.UserProps = new Object();\n\n return this.jsonProperties.UserProps;\n }\n\n /** Get a set of JSON user properties by namespace */\n public getUserProperties(namespace: string) { return this.getAllUserProperties()[namespace]; }\n\n /** Change a set of user JSON properties of this Element by namespace. */\n public setUserProperties(nameSpace: string, value: any) { this.getAllUserProperties()[nameSpace] = value; }\n\n /** Remove a set of JSON user properties, specified by namespace, from this Element */\n public removeUserProperties(nameSpace: string) { delete this.getAllUserProperties()[nameSpace]; }\n\n /** Get a JSON property of this element, by namespace */\n public getJsonProperty(nameSpace: string): any { return this.jsonProperties[nameSpace]; }\n public setJsonProperty(nameSpace: string, value: any) { this.jsonProperties[nameSpace] = value; }\n\n /** Get a display label for this Element. By default returns userLabel if present, otherwise code value. */\n public getDisplayLabel(): string { return this.userLabel ?? this.code.value; }\n\n /** Get a list of HTML strings that describe this Element for the tooltip. Strings will be listed on separate lines in the tooltip.\n * Any instances of the pattern `%{tag}` will be replaced by the localized value of tag.\n */\n public getToolTipMessage(): string[] {\n const addKey = (key: string) => `<b>%{iModelJs:Element.${key}}:</b> `; // %{iModelJs:Element.xxx} is replaced with localized value of xxx in frontend.\n const msg: string[] = [];\n const display = this.getDisplayLabel();\n msg.push(display ? display : `${addKey(\"Id\") + this.id}, ${addKey(\"Type\")}${this.className}`);\n\n if (this instanceof GeometricElement)\n msg.push(addKey(\"Category\") + this.iModel.elements.getElement(this.category).getDisplayLabel());\n\n msg.push(addKey(\"Model\") + this.iModel.elements.getElement(this.model).getDisplayLabel());\n return msg;\n }\n\n /**\n * Insert this Element into the iModel.\n * @see [[IModelDb.Elements.insertElement]]\n * @note For convenience, the value of `this.id` is updated to reflect the resultant element's id.\n * However when `this.federationGuid` is not present or undefined, a new Guid will be generated and stored on the resultant element. But\n * the value of `this.federationGuid` is *not* updated. Generally, it is best to re-read the element after inserting (e.g. via [[IModelDb.Elements.getElement]])\n * if you intend to continue working with it. That will ensure its values reflect the persistent state.\n */\n public insert() {\n return this.id = this.iModel.elements.insertElement(this.toJSON());\n }\n /** Update this Element in the iModel. */\n public update() { this.iModel.elements.updateElement(this.toJSON()); }\n /** Delete this Element from the iModel. */\n public delete() { this.iModel.elements.deleteElement(this.id); }\n}\n\n/** An abstract base class to model real world entities that intrinsically have geometry.\n * @public\n */\nexport abstract class GeometricElement extends Element {\n public static override get className(): string { return \"GeometricElement\"; }\n /** The Id of the [[Category]] for this GeometricElement. */\n public category: Id64String;\n /** The GeometryStream for this GeometricElement. */\n public geom?: GeometryStreamProps;\n /** The origin, orientation, and bounding box of this GeometricElement. */\n public abstract get placement(): Placement2d | Placement3d;\n\n protected constructor(props: GeometricElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.category = Id64.fromJSON(props.category);\n this.geom = props.geom;\n }\n\n /** Type guard for instanceof [[GeometricElement3d]] */\n public is3d(): this is GeometricElement3d { return this instanceof GeometricElement3d; }\n /** Type guard for instanceof [[GeometricElement2d]] */\n public is2d(): this is GeometricElement2d { return this instanceof GeometricElement2d; }\n /** Get the [Transform]($geometry) from the Placement of this GeometricElement */\n public getPlacementTransform(): Transform { return this.placement.transform; }\n public calculateRange3d(): AxisAlignedBox3d { return this.placement.calculateRange(); }\n\n public override toJSON(): GeometricElementProps {\n const val = super.toJSON() as GeometricElementProps;\n val.category = this.category;\n if (this.geom)\n val.geom = this.geom;\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.category);\n // TODO: GeometryPartIds?\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"category\"];\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n category: ConcreteEntityTypes.Element,\n };\n}\n\n/** An abstract base class to model real world entities that intrinsically have 3d geometry.\n * See [how to create a GeometricElement3d]($docs/learning/backend/CreateElements.md#GeometricElement3d).\n * @public\n */\nexport abstract class GeometricElement3d extends GeometricElement {\n public static override get className(): string { return \"GeometricElement3d\"; }\n public placement: Placement3d;\n public typeDefinition?: TypeDefinition;\n\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.placement = Placement3d.fromJSON(props.placement);\n if (props.typeDefinition)\n this.typeDefinition = TypeDefinition.fromJSON(props.typeDefinition);\n }\n\n public override toJSON(): GeometricElement3dProps {\n const val = super.toJSON() as GeometricElement3dProps;\n val.placement = this.placement;\n if (undefined !== this.typeDefinition)\n val.typeDefinition = this.typeDefinition;\n\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.typeDefinition)\n referenceIds.addElement(this.typeDefinition.id);\n }\n}\n\n/** A 3d Graphical Element\n * @public\n */\nexport abstract class GraphicalElement3d extends GeometricElement3d {\n public static override get className(): string { return \"GraphicalElement3d\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** An abstract base class to model information entities that intrinsically have 2d geometry.\n * @public\n */\nexport abstract class GeometricElement2d extends GeometricElement {\n public static override get className(): string { return \"GeometricElement2d\"; }\n public placement: Placement2d;\n public typeDefinition?: TypeDefinition;\n\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.placement = Placement2d.fromJSON(props.placement);\n if (props.typeDefinition)\n this.typeDefinition = TypeDefinition.fromJSON(props.typeDefinition);\n }\n\n public override toJSON(): GeometricElement2dProps {\n const val = super.toJSON() as GeometricElement2dProps;\n val.placement = this.placement;\n if (undefined !== this.typeDefinition)\n val.typeDefinition = this.typeDefinition;\n\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.typeDefinition)\n referenceIds.addElement(this.typeDefinition.id);\n }\n}\n\n/** An abstract base class for 2d Geometric Elements that are used to convey information within graphical presentations (like drawings).\n * @public\n */\nexport abstract class GraphicalElement2d extends GeometricElement2d {\n public static override get className(): string { return \"GraphicalElement2d\"; }\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** 2d element used to annotate drawings and sheets.\n * @public\n */\nexport class AnnotationElement2d extends GraphicalElement2d {\n public static override get className(): string { return \"AnnotationElement2d\"; }\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** 2d element used to persist graphics for use in drawings.\n * @public\n */\nexport class DrawingGraphic extends GraphicalElement2d {\n public static override get className(): string { return \"DrawingGraphic\"; }\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** An Element that occupies real world space. Its coordinates are in the project space of its iModel.\n * @public\n */\nexport abstract class SpatialElement extends GeometricElement3d {\n public static override get className(): string { return \"SpatialElement\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** An Element that is spatially located, has mass, and can be *touched*.\n * @public\n */\nexport abstract class PhysicalElement extends SpatialElement {\n public static override get className(): string { return \"PhysicalElement\"; }\n /** If defined, the [[PhysicalMaterial]] that makes up this PhysicalElement. */\n public physicalMaterial?: RelatedElement;\n protected constructor(props: PhysicalElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.physicalMaterial = RelatedElement.fromJSON(props.physicalMaterial);\n }\n\n public override toJSON(): PhysicalElementProps {\n const val = super.toJSON() as PhysicalElementProps;\n val.physicalMaterial = this.physicalMaterial?.toJSON();\n return val;\n }\n}\n\n/** Identifies a *tracked* real world location but has no mass and cannot be *touched*.\n * @public\n */\nexport abstract class SpatialLocationElement extends SpatialElement {\n public static override get className(): string { return \"SpatialLocationElement\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A Volume Element is a Spatial Location Element that is restricted to defining a volume.\n * @public\n */\nexport class VolumeElement extends SpatialLocationElement {\n public static override get className(): string { return \"VolumeElement\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A SectionDrawingLocation element identifies the location of a [[SectionDrawing]] in the context of a [[SpatialModel]],\n * enabling [HyperModeling]($hypermodeling).\n * @note The associated ECClass was added to the BisCore schema in version 1.0.11.\n * @public\n */\nexport class SectionDrawingLocation extends SpatialLocationElement {\n /** The Id of the [[ViewDefinition]] to which this location refers. */\n public sectionView: RelatedElement;\n\n public static override get className(): string { return \"SectionDrawingLocation\"; }\n\n public constructor(props: SectionDrawingLocationProps, iModel: IModelDb) {\n super(props, iModel);\n this.sectionView = RelatedElement.fromJSON(props.sectionView) ?? RelatedElement.none;\n }\n\n public override toJSON(): SectionDrawingLocationProps {\n return {\n ...super.toJSON(),\n sectionView: this.sectionView.toJSON(),\n };\n }\n}\n\n/** Information Content Element is an abstract base class for modeling pure information entities. Only the\n * core framework should directly subclass from Information Content Element. Domain and application developers\n * should start with the most appropriate subclass of Information Content Element.\n * @public\n */\nexport abstract class InformationContentElement extends Element {\n public static override get className(): string { return \"InformationContentElement\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** Element used in conjunction with bis:ElementDrivesElement relationships to bundle multiple inputs before\n * driving the output element.\n * @beta\n */\nexport abstract class DriverBundleElement extends InformationContentElement {\n public static override get className(): string { return \"DriverBundleElement\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** Information Reference is an abstract base class for modeling entities whose main purpose is to reference something else.\n * @public\n */\nexport abstract class InformationReferenceElement extends InformationContentElement {\n public static override get className(): string { return \"InformationReferenceElement\"; }\n\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A Subject is an information element that describes what this repository (or part thereof) is about.\n * See [how to create a Subject element]($docs/learning/backend/CreateElements.md#Subject).\n * @public\n */\nexport class Subject extends InformationReferenceElement {\n public static override get className(): string { return \"Subject\"; }\n public description?: string;\n protected constructor(props: SubjectProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n }\n\n public override toJSON(): SubjectProps { // This override only specializes the return type\n return super.toJSON() as SubjectProps; // Entity.toJSON takes care of auto-handled properties\n }\n /** Create a Code for a Subject given a name that is meant to be unique within the scope of its parent Subject.\n * @param iModelDb The IModelDb\n * @param parentSubjectId The Id of the parent Subject that provides the scope for names of its child Subjects.\n * @param codeValue The child Subject name\n */\n public static createCode(iModelDb: IModelDb, parentSubjectId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.subject);\n return new Code({ spec: codeSpec.id, scope: parentSubjectId, value: codeValue });\n }\n /** Create a Subject\n * @param iModelDb The IModelDb\n * @param parentSubjectId The new Subject will be a child of this Subject\n * @param name The name (codeValue) of the Subject\n * @param description The optional description of the Subject\n * @returns The newly constructed Subject\n * @throws [[IModelError]] if there is a problem creating the Subject\n */\n public static create(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, description?: string): Subject {\n const subjectProps: SubjectProps = {\n classFullName: this.classFullName,\n model: IModel.repositoryModelId,\n parent: new SubjectOwnsSubjects(parentSubjectId),\n code: this.createCode(iModelDb, parentSubjectId, name),\n description,\n };\n return new Subject(subjectProps, iModelDb);\n }\n\n /** Insert a Subject\n * @param iModelDb Insert into this IModelDb\n * @param parentSubjectId The new Subject will be inserted as a child of this Subject\n * @param name The name (codeValue) of the Subject\n * @param description The optional description of the Subject\n * @returns The Id of the newly inserted Subject\n * @throws [[IModelError]] if there is a problem inserting the Subject\n */\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, description?: string): Id64String {\n const subject = this.create(iModelDb, parentSubjectId, name, description);\n return iModelDb.elements.insertElement(subject.toJSON());\n }\n}\n\n/** An InformationContentElement that identifies the content of a document.\n * The realized form of a document is called a DocumentCarrier (different class than Document).\n * For example, a will is a legal document. The will published into a PDF file is an ElectronicDocumentCopy.\n * The will printed onto paper is a PrintedDocumentCopy.\n * In this example, the Document only identifies, names, and tracks the content of the will.\n * @public\n */\nexport abstract class Document extends InformationContentElement {\n public static override get className(): string { return \"Document\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A document that represents a drawing, that is, a two-dimensional graphical representation of engineering data. A Drawing element is usually modelled by a [[DrawingModel]].\n * @public\n */\nexport class Drawing extends Document {\n public static override get className(): string { return \"Drawing\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** The name of the DrawingModel class modeled by this element type. */\n protected static get drawingModelFullClassName(): string { return DrawingModel.classFullName; }\n\n /** Create a Code for a Drawing given a name that is meant to be unique within the scope of the specified DocumentListModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DocumentListModel that contains the Drawing and provides the scope for its name.\n * @param codeValue The Drawing name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.drawing);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /** Insert a Drawing element and a DrawingModel that breaks it down.\n * @param iModelDb Insert into this iModel\n * @param documentListModelId Insert the new Drawing into this DocumentListModel\n * @param name The name of the Drawing.\n * @returns The Id of the newly inserted Drawing element and the DrawingModel that breaks it down (same value).\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, documentListModelId: Id64String, name: string): Id64String {\n const drawingProps: ElementProps = {\n classFullName: this.classFullName,\n model: documentListModelId,\n code: this.createCode(iModelDb, documentListModelId, name),\n };\n const drawingId: Id64String = iModelDb.elements.insertElement(drawingProps);\n const model: DrawingModel = iModelDb.models.createModel({\n classFullName: this.drawingModelFullClassName,\n modeledElement: { id: drawingId },\n });\n return iModelDb.models.insertModel(model.toJSON());\n }\n}\n\n/** A document that represents a section drawing, that is, a graphical documentation derived from a planar\n * section of a spatial view. A SectionDrawing element is modelled by a [[SectionDrawingModel]] or a [[GraphicalModel3d]].\n * A [[SectionDrawingLocation]] can associate the drawing with a spatial location, enabling [HyperModeling]($hypermodeling).\n * @public\n */\nexport class SectionDrawing extends Drawing {\n /** The type of section used to generate the drawing. */\n public sectionType: SectionType;\n /** The spatial view from which the section was generated. */\n public spatialView: RelatedElement;\n /** A transform from the section drawing model's coordinates to spatial coordinates. */\n public drawingToSpatialTransform?: Transform;\n /** If the section drawing is placed onto a [[Sheet]] via a [[ViewAttachment]], a transform from the sheet's coordinates to spatial coordinates. */\n public sheetToSpatialTransform?: Transform;\n /** If the section drawing is placed onto a [[Sheet]] via a [[ViewAttachment]], the clip to apply to the sheet graphics when drawn in the context\n * of the spatial view.\n * @note The ClipVector is defined in spatial coordinates.\n */\n public drawingBoundaryClip?: ClipVector;\n /** If true, when displaying the section drawing as a [DrawingViewState]($frontend), the [[spatialView]] will also be displayed. */\n public displaySpatialView: boolean;\n\n public static override get className(): string { return \"SectionDrawing\"; }\n\n protected static override get drawingModelFullClassName(): string { return SectionDrawingModel.classFullName; }\n\n protected constructor(props: SectionDrawingProps, iModel: IModelDb) {\n super(props, iModel);\n this.sectionType = JsonUtils.asInt(props.sectionType, SectionType.Section);\n this.spatialView = RelatedElement.fromJSON(props.spatialView) ?? RelatedElement.none;\n this.displaySpatialView = JsonUtils.asBool(props.jsonProperties?.displaySpatialView);\n\n const json = props.jsonProperties;\n if (!json)\n return;\n\n if (json.drawingToSpatialTransform)\n this.drawingToSpatialTransform = Transform.fromJSON(json.drawingToSpatialTransform);\n\n if (json.sheetToSpatialTransform)\n this.sheetToSpatialTransform = Transform.fromJSON(json.sheetToSpatialTransform);\n\n if (json.drawingBoundaryClip)\n this.drawingBoundaryClip = ClipVector.fromJSON(json.drawingBoundaryClip);\n }\n\n public override toJSON(): SectionDrawingProps {\n const props: SectionDrawingProps = {\n ...super.toJSON(),\n sectionType: this.sectionType,\n spatialView: this.spatialView.toJSON(),\n };\n\n if (!props.jsonProperties)\n props.jsonProperties = {};\n\n props.jsonProperties.displaySpatialView = this.displaySpatialView ? true : undefined;\n props.jsonProperties.drawingToSpatialTransform = this.drawingToSpatialTransform?.toJSON();\n props.jsonProperties.sheetToSpatialTransform = this.sheetToSpatialTransform?.toJSON();\n props.jsonProperties.drawingBoundaryClip = this.drawingBoundaryClip?.toJSON();\n\n return props;\n }\n}\n\n/** The template for a SheetBorder\n * @public\n */\nexport class SheetBorderTemplate extends Document {\n public static override get className(): string { return \"SheetBorderTemplate\"; }\n public height?: number;\n public width?: number;\n protected constructor(props: SheetBorderTemplateProps, iModel: IModelDb) {\n super(props, iModel);\n this.height = props.height;\n this.width = props.width;\n }\n}\n\n/** The template for a [[Sheet]]\n * @public\n */\nexport class SheetTemplate extends Document {\n public static override get className(): string { return \"SheetTemplate\"; }\n public height?: number;\n public width?: number;\n public border?: Id64String;\n\n protected constructor(props: SheetTemplateProps, iModel: IModelDb) {\n super(props, iModel);\n this.height = props.height;\n this.width = props.width;\n this.border = props.border;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.border)\n referenceIds.addElement(this.border);\n }\n}\n\n/** A digital representation of a *sheet of paper*. Modeled by a [[SheetModel]].\n * @public\n */\nexport class Sheet extends Document {\n public static override get className(): string { return \"Sheet\"; }\n public height: number;\n public width: number;\n public scale?: number;\n public sheetTemplate?: Id64String;\n\n protected constructor(props: SheetProps, iModel: IModelDb) {\n super(props, iModel);\n this.height = JsonUtils.asDouble(props.height);\n this.width = JsonUtils.asDouble(props.width);\n this.scale = props.scale;\n this.sheetTemplate = props.sheetTemplate ? Id64.fromJSON(props.sheetTemplate) : undefined;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.sheetTemplate)\n referenceIds.addElement(this.sheetTemplate);\n }\n\n /** Create a Code for a Sheet given a name that is meant to be unique within the scope of the specified DocumentListModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DocumentListModel that contains the Sheet and provides the scope for its name.\n * @param codeValue The Sheet name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.sheet);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Information Record Element is an abstract base class for modeling information records. Information Record\n * Element is the default choice if no other subclass of Information Content Element makes sense.\n * @public\n */\nexport abstract class InformationRecordElement extends InformationContentElement {\n public static override get className(): string { return \"InformationRecordElement\"; }\n\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A Definition Element holds configuration-related information that is meant to be referenced / shared.\n * @public\n */\nexport abstract class DefinitionElement extends InformationContentElement {\n public static override get className(): string { return \"DefinitionElement\"; }\n /** If true, don't show this DefinitionElement in user interface lists. */\n public isPrivate: boolean;\n\n protected constructor(props: DefinitionElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.isPrivate = true === props.isPrivate;\n }\n\n public override toJSON(): DefinitionElementProps {\n const val = super.toJSON() as DefinitionElementProps;\n val.isPrivate = this.isPrivate;\n return val;\n }\n}\n\n/** This abstract class unifies DefinitionGroup and DefinitionContainer for relationship endpoint purposes.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\n * @public\n */\nexport abstract class DefinitionSet extends DefinitionElement {\n public static override get className(): string { return \"DefinitionSet\"; }\n}\n\n/** A DefinitionContainer exclusively owns a set of DefinitionElements contained within its sub-model (of type DefinitionModel).\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\n * @public\n */\nexport class DefinitionContainer extends DefinitionSet {\n public static override get className(): string { return \"DefinitionContainer\"; }\n /** Create a DefinitionContainer\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionContainer element.\n * @param code The Code for this DefinitionContainer.\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\n * @returns The newly constructed DefinitionContainer\n * @note There is not a predefined CodeSpec for DefinitionContainer elements, so it is the responsibility of the domain or application to create one.\n * @throws [[IModelError]] if there is a problem creating the DefinitionContainer\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): DefinitionContainer {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code,\n isPrivate,\n };\n return new DefinitionContainer(elementProps, iModelDb);\n }\n /** Insert a DefinitionContainer and its sub-model.\n * @param iModelDb Insert into this IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionContainer element.\n * @param code The Code for this DefinitionContainer.\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\n * @returns The Id of the newly inserted DefinitionContainer and its newly inserted sub-model (of type DefinitionModel).\n * @note There is not a predefined CodeSpec for DefinitionContainer elements, so it is the responsibility of the domain or application to create one.\n * @throws [[IModelError]] if there is a problem inserting the DefinitionContainer\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): Id64String {\n const containerElement = this.create(iModelDb, definitionModelId, code, isPrivate);\n const containerElementId = iModelDb.elements.insertElement(containerElement.toJSON());\n const containerSubModelProps: ModelProps = {\n classFullName: DefinitionModel.classFullName,\n modeledElement: { id: containerElementId },\n isPrivate,\n };\n iModelDb.models.insertModel(containerSubModelProps);\n return containerElementId;\n }\n}\n\n/** A non-exclusive set of DefinitionElements grouped using the DefinitionGroupGroupsDefinitions relationship.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\n * @public\n */\nexport class DefinitionGroup extends DefinitionSet {\n public static override get className(): string { return \"DefinitionGroup\"; }\n /** Create a DefinitionGroup\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionGroup element.\n * @param code The Code for this DefinitionGroup\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\n * @returns The newly constructed DefinitionGroup\n * @note There is not a predefined CodeSpec for DefinitionGroup elements, so it is the responsibility of the domain or application to create one.\n * @throws [[IModelError]] if there is a problem creating the DefinitionGroup\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): DefinitionGroup {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code,\n isPrivate,\n };\n return new DefinitionGroup(elementProps, iModelDb);\n }\n}\n\n/** Defines a set of properties (the *type*) that may be associated with an element.\n * @public\n */\nexport abstract class TypeDefinitionElement extends DefinitionElement {\n public static override get className(): string { return \"TypeDefinitionElement\"; }\n public recipe?: RelatedElement;\n\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.recipe = this.recipe;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.recipe)\n referenceIds.addElement(this.recipe.id);\n }\n}\n\n/** Defines a recipe for generating instances from a definition.\n * @beta\n */\nexport abstract class RecipeDefinitionElement extends DefinitionElement {\n public static override get className(): string { return \"RecipeDefinitionElement\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** Defines a set of properties (the *type*) that can be associated with a Physical Element. A Physical\n * Type has a strong correlation with something that can be ordered from a catalog since all instances\n * share a common set of properties.\n * @public\n */\nexport abstract class PhysicalType extends TypeDefinitionElement {\n public static override get className(): string { return \"PhysicalType\"; }\n /** If defined, the [[PhysicalMaterial]] that makes up this PhysicalType. */\n public physicalMaterial?: RelatedElement;\n protected constructor(props: PhysicalTypeProps, iModel: IModelDb) {\n super(props, iModel);\n this.physicalMaterial = RelatedElement.fromJSON(props.physicalMaterial);\n }\n\n public override toJSON(): PhysicalTypeProps {\n const val = super.toJSON() as PhysicalTypeProps;\n val.physicalMaterial = this.physicalMaterial?.toJSON();\n return val;\n }\n /** Create a Code for a PhysicalType element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the PhysicalType element and provides the scope for its name.\n * @param codeValue The PhysicalType name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalType);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Defines a set of properties (the *type*) that can be associated with a spatial location.\n * @public\n */\nexport abstract class SpatialLocationType extends TypeDefinitionElement {\n public static override get className(): string { return \"SpatialLocationType\"; }\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a SpatialLocationType element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the SpatialLocationType element and provides the scope for its name.\n * @param codeValue The SpatialLocationType name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.spatialLocationType);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A TemplateRecipe3d is a DefinitionElement that has a sub-model that contains the 3d template elements.\n * @beta\n */\nexport class TemplateRecipe3d extends RecipeDefinitionElement {\n public static override get className(): string { return \"TemplateRecipe3d\"; }\n\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a TemplateRecipe3d given a name that is meant to be unique within the scope of its Model.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\n * @param codeValue The name of the TemplateRecipe3d element.\n */\n public static createCode(iModelDb: IModelDb, definitionModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.templateRecipe3d);\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: codeValue });\n }\n\n /** Create a TemplateRecipe3d\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\n * @param name The name (Code.value) of the TemplateRecipe3d\n * @returns The newly constructed TemplateRecipe3d\n * @throws [[IModelError]] if there is a problem creating the TemplateRecipe3d\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): TemplateRecipe3d {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n isPrivate,\n };\n return new TemplateRecipe3d(elementProps, iModelDb);\n }\n /** Insert a TemplateRecipe3d and a PhysicalModel (sub-model) that will contain the 3d template elements.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\n * @param name The name (Code.value) of the TemplateRecipe3d\n * @returns The Id of the newly inserted TemplateRecipe3d and the PhysicalModel that sub-models it.\n * @throws [[IModelError]] if there is a problem inserting the TemplateRecipe3d or its sub-model.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): Id64String {\n const element = this.create(iModelDb, definitionModelId, name, isPrivate);\n const modeledElementId: Id64String = iModelDb.elements.insertElement(element.toJSON());\n const modelProps: GeometricModel3dProps = {\n classFullName: PhysicalModel.classFullName,\n modeledElement: { id: modeledElementId },\n isTemplate: true,\n };\n return iModelDb.models.insertModel(modelProps); // will be the same value as modeledElementId\n }\n}\n\n/** Defines a set of properties (the *type*) that can be associated with a 2D Graphical Element.\n * @public\n */\nexport abstract class GraphicalType2d extends TypeDefinitionElement {\n public static override get className(): string { return \"GraphicalType2d\"; }\n\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a GraphicalType2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the GraphicalType2d element and provides the scope for its name.\n * @param codeValue The GraphicalType2d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.graphicalType2d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A recipe that uses a 2D template for creating new instances.\n * @beta\n */\nexport class TemplateRecipe2d extends RecipeDefinitionElement {\n public static override get className(): string { return \"TemplateRecipe2d\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a TemplateRecipe2d given a name that is meant to be unique within the scope of its Model.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\n * @param codeValue The name of the TemplateRecipe2d element.\n */\n public static createCode(iModelDb: IModelDb, definitionModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.templateRecipe2d);\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: codeValue });\n }\n\n /** Create a TemplateRecipe2d\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\n * @param name The name (Code.value) of the TemplateRecipe2d\n * @returns The newly constructed TemplateRecipe2d\n * @throws [[IModelError]] if there is a problem creating the TemplateRecipe2d\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): TemplateRecipe2d {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n isPrivate,\n };\n return new TemplateRecipe2d(elementProps, iModelDb);\n }\n /** Insert a TemplateRecipe2d and a DrawingModel (sub-model) that will contain the 2d template elements.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\n * @param name The name (Code.value) of the TemplateRecipe2d\n * @returns The Id of the newly inserted TemplateRecipe2d and the PhysicalModel that sub-models it.\n * @throws [[IModelError]] if there is a problem inserting the TemplateRecipe2d or its sub-model.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): Id64String {\n const element = this.create(iModelDb, definitionModelId, name, isPrivate);\n const modeledElementId: Id64String = iModelDb.elements.insertElement(element.toJSON());\n const modelProps: GeometricModel2dProps = {\n classFullName: DrawingModel.classFullName,\n modeledElement: { id: modeledElementId },\n isTemplate: true,\n };\n return iModelDb.models.insertModel(modelProps); // will be the same value as modeledElementId\n }\n}\n\n/** An abstract base class for elements that establishes a particular modeling perspective for its parent Subject.\n * Instances are always sub-modeled by a specialization of Model of the appropriate modeling perspective.\n * @see [iModel Information Hierarchy]($docs/bis/guide/data-organization/top-of-the-world), [[Subject]], [[Model]]\n * @public\n */\nexport abstract class InformationPartitionElement extends InformationContentElement {\n public static override get className(): string { return \"InformationPartitionElement\"; }\n /** A human-readable string describing the intent of the partition. */\n public description?: string;\n\n protected constructor(props: InformationPartitionElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n }\n\n public override toJSON(): InformationPartitionElementProps { // This override only specializes the return type\n return super.toJSON() as InformationPartitionElementProps; // Entity.toJSON takes care of auto-handled properties\n }\n /** Create a code that can be used for any subclass of InformationPartitionElement.\n * @param iModelDb The IModelDb\n * @param parentSubjectId The Id of the parent Subject that provides the scope for names of its child InformationPartitionElements.\n * @param codeValue The InformationPartitionElement name\n */\n public static createCode(iModel: IModelDb, parentSubjectId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.informationPartitionElement);\n return new Code({ spec: codeSpec.id, scope: parentSubjectId, value: codeValue });\n }\n}\n\n/** A DefinitionPartition element establishes a *Definition* modeling perspective for its parent Subject.\n * A DefinitionPartition is always sub-modeled by a DefinitionModel.\n * @see [[DefinitionModel]]\n * @public\n */\nexport class DefinitionPartition extends InformationPartitionElement {\n public static override get className(): string { return \"DefinitionPartition\"; }\n}\n\n/** A DocumentPartition element establishes a *Document* modeling perspective for its parent Subject.\n * A DocumentPartition is always sub-modeled by a DocumentListModel.\n * @see [[DocumentListModel]]\n * @public\n */\nexport class DocumentPartition extends InformationPartitionElement {\n public static override get className(): string { return \"DocumentPartition\"; }\n}\n\n/** A GroupInformationPartition element establishes a *Group Information* modeling perspective for its parent Subject.\n * A GroupInformationPartition is always sub-modeled by a GroupInformationModel.\n * @see [[GroupInformationModel]]\n * @public\n */\nexport class GroupInformationPartition extends InformationPartitionElement {\n public static override get className(): string { return \"GroupInformationPartition\"; }\n}\n\n/** A GraphicalPartition3d element establishes a *3D Graphical* modeling perspective for its parent Subject.\n * A GraphicalPartition3d is always sub-modeled by a GraphicalModel3d.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.8\n * @see [[GraphicalModel3d]]\n * @public\n */\nexport class GraphicalPartition3d extends InformationPartitionElement {\n public static override get className(): string { return \"GraphicalPartition3d\"; }\n}\n\n/** An InformationRecordPartition element establishes a *Information Record* modeling perspective for its parent Subject.\n * A InformationRecordPartition is always sub-modeled by an InformationRecordModel.\n * @see [[InformationRecordModel]]\n * @public\n */\nexport class InformationRecordPartition extends InformationPartitionElement {\n public static override get className(): string { return \"InformationRecordPartition\"; }\n}\n\n/** A LinkPartition element establishes a *Link* modeling perspective for its parent Subject. A LinkPartition is always sub-modeled by a LinkModel.\n * @see [[LinkModel]]\n * @public\n */\nexport class LinkPartition extends InformationPartitionElement {\n public static override get className(): string { return \"LinkPartition\"; }\n}\n\n/** A PhysicalPartition element establishes a *Physical* modeling perspective for its parent Subject. A PhysicalPartition is always sub-modeled by a PhysicalModel.\n * @see [[PhysicalModel]]\n * @public\n */\nexport class PhysicalPartition extends InformationPartitionElement {\n public static override get className(): string { return \"PhysicalPartition\"; }\n}\n\n/** A SpatialLocationPartition element establishes a *SpatialLocation* modeling perspective for its parent Subject.\n * A SpatialLocationPartition is always sub-modeled by a SpatialLocationModel.\n * @see [[SpatialLocationModel]]\n * @public\n */\nexport class SpatialLocationPartition extends InformationPartitionElement {\n public static override get className(): string { return \"SpatialLocationPartition\"; }\n}\n\n/** A SheetIndexPartition element establishes a [[SheetIndex]] modeling perspective for its parent [[Subject]].\n * A SheetIndexPartition is always sub-modeled by a [[SheetIndexModel]].\n * @beta\n */\nexport class SheetIndexPartition extends InformationPartitionElement {\n public static override get className(): string { return \"SheetIndexPartition\"; }\n}\n\n/** Group Information is an abstract base class for modeling entities whose main purpose is to reference a group of related elements.\n * @public\n */\nexport abstract class GroupInformationElement extends InformationReferenceElement {\n public static override get className(): string { return \"GroupInformationElement\"; }\n}\n\n/** An information element that specifies a link.\n * @public\n */\nexport abstract class LinkElement extends InformationReferenceElement {\n public static override get className(): string { return \"LinkElement\"; }\n /** Create a Code for a LinkElement given a name that is meant to be unique within the scope of the specified Model.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the Model that contains the LinkElement and provides the scope for its name.\n * @param codeValue The LinkElement name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.linkElement);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** An information element that specifies a URL link.\n * @public\n */\nexport class UrlLink extends LinkElement {\n public static override get className(): string { return \"UrlLink\"; }\n public description?: string;\n public url?: string;\n\n protected constructor(props: UrlLinkProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n this.url = props.url;\n }\n\n public override toJSON(): UrlLinkProps {\n const val = super.toJSON() as UrlLinkProps;\n val.description = this.description;\n val.url = this.url;\n return val;\n }\n}\n\n/** Represents a folder-like structure that organizes repositories (typically files) in an external system.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @alpha\n */\nexport class FolderLink extends UrlLink {\n public static override get className(): string { return \"FolderLink\"; }\n}\n\n/** An information element that links to a repository.\n * @public\n */\nexport class RepositoryLink extends UrlLink {\n public static override get className(): string { return \"RepositoryLink\"; }\n public repositoryGuid?: GuidString;\n /** @note This property was added to the BisCore schema in version 1.0.13 */\n public format?: string;\n\n protected constructor(props: RepositoryLinkProps, iModel: IModelDb) {\n super(props, iModel);\n this.repositoryGuid = props.repositoryGuid;\n this.format = props.format;\n }\n\n public override toJSON(): RepositoryLinkProps {\n const val = super.toJSON() as RepositoryLinkProps;\n val.repositoryGuid = this.repositoryGuid;\n val.format = this.format;\n return val;\n }\n}\n\n/** An information element that links to an embedded file.\n * @public\n */\nexport class EmbeddedFileLink extends LinkElement {\n public static override get className(): string { return \"EmbeddedFileLink\"; }\n}\n\n/** A real world entity is modeled as a Role Element when a set of external circumstances define an important\n * role (one that is worth tracking) that is not intrinsic to the entity playing the role. For example,\n * a person can play the role of a teacher or a rock can play the role of a boundary marker.\n * @public\n */\nexport abstract class RoleElement extends Element {\n public static override get className(): string { return \"RoleElement\"; }\n}\n\n/** A Definition Element that specifies a collection of geometry that is meant to be reused across Geometric\n * Element instances. Leveraging Geometry Parts can help reduce file size and improve display performance.\n * @public\n */\nexport class GeometryPart extends DefinitionElement {\n public static override get className(): string { return \"GeometryPart\"; }\n public geom?: GeometryStreamProps;\n public bbox: ElementAlignedBox3d;\n\n protected constructor(props: GeometryPartProps, iModel: IModelDb) {\n super(props, iModel);\n this.geom = props.geom;\n this.bbox = Range3d.fromJSON(props.bbox);\n }\n\n public override toJSON(): GeometryPartProps {\n const val = super.toJSON() as GeometryPartProps;\n val.geom = this.geom;\n val.bbox = this.bbox;\n return val;\n }\n\n /** Create a Code for a GeometryPart element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the GeometryPart element and provides the scope for its name.\n * @param codeValue The GeometryPart name\n * @note GeometryPart elements are not required to be named (have a non-empty Code).\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.geometryPart);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** The definition element for a line style\n * @public\n */\nexport class LineStyle extends DefinitionElement {\n public static override get className(): string { return \"LineStyle\"; }\n public description?: string;\n public data: string;\n\n protected constructor(props: LineStyleProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n this.data = props.data;\n }\n\n /** Create a Code for a LineStyle definition given a name that is meant to be unique within the scope of the specified model.\n * @param iModel The IModel\n * @param scopeModelId The Id of the DefinitionModel that contains the LineStyle and provides the scope for its name.\n * @param codeValue The name of the LineStyle\n * @returns A LineStyle Code\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n return new Code({ spec: iModel.codeSpecs.getByName(BisCodeSpec.lineStyle).id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Describes how to animate a view of a [[GeometricModel]] to show change over time using a [RenderSchedule.Script]($common).\n * @note This class was introduced in version 01.00.13 of the BisCore ECSchema. It should only be used with [[IModelDb]]s containing that version or newer.\n * @public\n */\nexport class RenderTimeline extends InformationRecordElement {\n public static override get className(): string { return \"RenderTimeline\"; }\n /** A human-readable description of the timeline, which may be an empty string. */\n public description: string;\n /** The JSON representation of the instructions for visualizing change over time.\n * @see [RenderSchedule.Script]($common) for the API for working with the script.\n */\n public scriptProps: RenderSchedule.ScriptProps;\n\n protected constructor(props: RenderTimelineProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description ?? \"\";\n this.scriptProps = RenderTimeline.parseScriptProps(props.script);\n }\n\n public static fromJSON(props: RenderTimelineProps, iModel: IModelDb): RenderTimeline {\n return new RenderTimeline(props, iModel);\n }\n\n public override toJSON(): RenderTimelineProps {\n const props = super.toJSON() as RenderTimelineProps;\n if (this.description.length > 0)\n props.description = this.description;\n\n props.script = JSON.stringify(this.scriptProps);\n return props;\n }\n\n private static parseScriptProps(json: string): RenderSchedule.ScriptProps {\n try {\n return JSON.parse(json);\n } catch {\n return [];\n }\n }\n\n protected override collectReferenceIds(ids: EntityReferenceSet): void {\n super.collectReferenceIds(ids);\n const script = RenderSchedule.Script.fromJSON(this.scriptProps);\n script?.discloseIds(ids);\n }\n\n /** @alpha */\n protected static override onCloned(context: IModelElementCloneContext, sourceProps: RenderTimelineProps, targetProps: RenderTimelineProps): void {\n super.onCloned(context, sourceProps, targetProps);\n if (context.isBetweenIModels)\n targetProps.script = JSON.stringify(this.remapScript(context, this.parseScriptProps(targetProps.script)));\n }\n\n /** Remap Ids when cloning a RenderSchedule.Script between iModels on a DisplayStyle or RenderTimeline.\n * @beta\n */\n public static remapScript(context: IModelElementCloneContext, input: RenderSchedule.ScriptProps): RenderSchedule.ScriptProps {\n const scriptProps: RenderSchedule.ScriptProps = [];\n if (!Array.isArray(input))\n return scriptProps;\n\n const elementIds = new OrderedId64Array();\n for (const model of input) {\n const modelId = context.findTargetElementId(model.modelId);\n if (!Id64.isValid(modelId))\n continue;\n\n model.modelId = modelId;\n scriptProps.push(model);\n for (const element of model.elementTimelines) {\n elementIds.clear();\n for (const sourceId of RenderSchedule.ElementTimeline.getElementIds(element.elementIds)) {\n const targetId = context.findTargetElementId(sourceId);\n if (Id64.isValid(targetId))\n elementIds.insert(targetId);\n }\n\n element.elementIds = CompressedId64Set.compressIds(elementIds);\n }\n }\n\n return scriptProps;\n }\n}\n"]}
1
+ {"version":3,"file":"Element.js","sourceRoot":"","sources":["../../src/Element.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;AAEH,sDAA4H;AAC5H,oDAO4B;AAC5B,wDAAsE;AACtE,qCAAkC;AAGlC,mCAA4F;AAC5F,qEAA+D;AAC/D,gDAAwE;AAuExE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAa,OAAQ,SAAQ,eAAM;IAC1B,MAAM,KAAc,SAAS,KAAa,OAAO,SAAS,CAAC,CAAC,CAAC;IACpE,gBAAgB;IACT,MAAM,KAAc,mBAAmB,KAAK,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAEjG,6GAA6G;IAC7F,KAAK,CAAa;IAClC,yEAAyE;IAClE,IAAI,CAAO;IAClB,uDA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AAU,CAAC,CAAC;YACjE,CAAC;QACH,CAAC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;CACF;AA/ED,wCA+EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Elements\n */\n\nimport { CompressedId64Set, GuidString, Id64, Id64Set, Id64String, JsonUtils, OrderedId64Array } from \"@itwin/core-bentley\";\nimport {\n AxisAlignedBox3d, BisCodeSpec, Code, CodeScopeProps, CodeSpec, ConcreteEntityTypes, DefinitionElementProps, ElementAlignedBox3d,\n ElementProps, EntityMetaData, EntityReferenceSet, GeometricElement2dProps, GeometricElement3dProps, GeometricElementProps,\n GeometricModel2dProps, GeometricModel3dProps, GeometryPartProps, GeometryStreamProps, IModel, InformationPartitionElementProps, LineStyleProps,\n ModelProps, PhysicalElementProps, PhysicalTypeProps, Placement2d, Placement3d, RelatedElement, RenderSchedule, RenderTimelineProps,\n RepositoryLinkProps, SectionDrawingLocationProps, SectionDrawingProps, SectionType, SheetBorderTemplateProps,\n SheetProps, SheetTemplateProps, SubjectProps, TypeDefinition, TypeDefinitionElementProps, UrlLinkProps,\n} from \"@itwin/core-common\";\nimport { ClipVector, Range3d, Transform } from \"@itwin/core-geometry\";\nimport { Entity } from \"./Entity\";\nimport { IModelDb } from \"./IModelDb\";\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\nimport { DefinitionModel, DrawingModel, PhysicalModel, SectionDrawingModel } from \"./Model\";\nimport { SubjectOwnsSubjects } from \"./NavigationRelationship\";\nimport { _elementWasCreated, _verifyChannel } from \"./internal/Symbols\";\n\n/** Argument for the `Element.onXxx` static methods\n * @beta\n */\nexport interface OnElementArg {\n /** The iModel for the Element affected by this method. */\n iModel: IModelDb;\n}\n\n/** Argument for `Element.onInsert` and `Element.onUpdate` static methods.\n * @beta\n */\nexport interface OnElementPropsArg extends OnElementArg {\n /** The properties of the Element affected by this method.\n * @note the properties may be modified. If so the modified values will be inserted/updated.\n */\n props: ElementProps;\n}\n\n/** Argument for the `Element.onXxx` static methods that notify of operations to an existing Element supplying its Id, ModelId and FederationGuid.\n * @beta\n */\nexport interface OnElementIdArg extends OnElementArg {\n /** The Id of the Element affected by this method */\n id: Id64String;\n /** The ModelId of the element affected by this method */\n model: Id64String;\n /** The federationGuid of the element affected by this method */\n federationGuid: GuidString;\n}\n\n/** Argument for the `Element.onChildXxx` static methods\n * @beta\n */\nexport interface OnChildElementArg extends OnElementArg {\n parentId: Id64String;\n}\n\n/** Argument for the `Element.onChildXxx` static methods that supply the properties of the child Element to be inserted or updated.\n * @beta\n */\nexport interface OnChildElementPropsArg extends OnChildElementArg {\n /** The new properties of the child Element for this method. */\n childProps: Readonly<ElementProps>;\n}\n\n/** Argument for the `Element.onChildXxx` static methods that only supply the Id of the child Element.\n * @beta\n */\nexport interface OnChildElementIdArg extends OnChildElementArg {\n /** The Id of the child element for this method */\n childId: Id64String;\n}\n\n/** Argument for the `Element.onSubModelInsert` static method\n * @beta\n */\nexport interface OnSubModelPropsArg extends OnElementArg {\n /** The properties of the prospective sub-model */\n subModelProps: ModelProps;\n}\n\n/** Argument for several `Element.onSubModelXxx` static methods\n * @beta\n */\nexport interface OnSubModelIdArg extends OnElementArg {\n /** The modelId of the sub Model */\n subModelId: Id64String;\n}\n\n/** The smallest individually identifiable building block for modeling the real world in an iModel.\n * Each element represents an [[Entity]] in the real world. Sets of Elements (contained in [[Model]]s) are used to model\n * other Elements that represent larger scale real world entities. Using this recursive modeling strategy,\n * Elements can represent entities at any scale. Elements can represent physical things or abstract concepts\n * or simply be information records.\n *\n * Every Element has a 64-bit id (inherited from Entity) that uniquely identifies it within an iModel. Every Element also\n * has a [[code]] that identifies its meaning in the real world. Additionally, Elements may have a [[federationGuid]]\n * to hold a GUID, if the element was assigned that GUID by some other federated database. The iModel database enforces\n * uniqueness of id, code, and federationGuid.\n *\n * The Element class provides `static` methods like [[onInsert]], [[onUpdated]], [[onCloned]], and [[onChildAdded]] that enable\n * it to customize persistence operations. For example, the base implementations of [[onInsert]], [[onUpdate]], and [[onDelete]]\n * validate that the appropriate [locks]($docs/learning/backend/ConcurrencyControl.md), [codes]($docs/learning/backend/CodeService.md),\n * and [channel permissions]($docs/learning/backend/Channel.md) are obtained before a change to the element is written to the iModel.\n * A subclass of Element that overrides any of these methods **must** call the `super` method as well. An application that supplies its\n * own Element subclasses should register them at startup via [[ClassRegistry.registerModule]] or [[ClassRegistry.register]].\n *\n * See:\n * * [Element Fundamentals]($docs/bis/guide/fundamentals/element-fundamentals.md)\n * * [Working with schemas and elements in TypeScript]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\n * * [Creating elements]($docs/learning/backend/CreateElements.md)\n * @public\n */\nexport class Element extends Entity {\n public static override get className(): string { return \"Element\"; }\n /** @internal */\n public static override get protectedOperations() { return [\"onInsert\", \"onUpdate\", \"onDelete\"]; }\n\n /** The ModelId of the [Model]($docs/bis/guide/fundamentals/model-fundamentals.md) containing this element */\n public readonly model: Id64String;\n /** The [Code]($docs/bis/guide/fundamentals/codes.md) for this element */\n public code: Code;\n /** The parent element, if present, of this element. */\n public parent?: RelatedElement;\n /** A [FederationGuid]($docs/bis/guide/fundamentals/element-fundamentals.md#federationguid) assigned to this element by some other federated database */\n public federationGuid?: GuidString;\n /** A [user-assigned label]($docs/bis/guide/fundamentals/element-fundamentals.md#userlabel) for this element. */\n public userLabel?: string;\n /** Optional [json properties]($docs/bis/guide/fundamentals/element-fundamentals.md#jsonproperties) of this element. */\n public readonly jsonProperties: { [key: string]: any };\n\n protected constructor(props: ElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.code = Code.fromJSON(props.code); // TODO: Validate props.code - don't silently fail if it is the wrong type\n this.model = RelatedElement.idFromJson(props.model);\n this.parent = RelatedElement.fromJSON(props.parent);\n this.federationGuid = props.federationGuid;\n this.userLabel = props.userLabel;\n this.jsonProperties = { ...props.jsonProperties }; // make sure we have our own copy\n }\n\n /** Called before a new Element is inserted.\n * @note throw an exception to disallow the insert\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element to be inserted\n * @beta\n */\n protected static onInsert(arg: OnElementPropsArg): void {\n const { iModel, props } = arg;\n const operation = \"insert\";\n iModel.channels[_verifyChannel](arg.props.model);\n iModel.locks.checkSharedLock(props.model, \"model\", operation); // inserting requires shared lock on model\n if (props.parent) // inserting requires shared lock on parent, if present\n iModel.locks.checkSharedLock(props.parent.id, \"parent\", operation);\n iModel.codeService?.verifyCode(arg);\n }\n\n /** Called after a new Element was inserted.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element that was inserted\n * @beta\n */\n protected static onInserted(arg: OnElementIdArg): void {\n const locks = arg.iModel.locks;\n if (locks && !locks.holdsExclusiveLock(arg.model))\n locks[_elementWasCreated](arg.id);\n }\n\n /** Called before an Element is updated.\n * @note throw an exception to disallow the update\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element to be updated\n * @beta\n */\n protected static onUpdate(arg: OnElementPropsArg): void {\n const { iModel, props } = arg;\n iModel.channels[_verifyChannel](props.model);\n iModel.locks.checkExclusiveLock(props.id!, \"element\", \"update\"); // eslint-disable-line @typescript-eslint/no-non-null-assertion\n iModel.codeService?.verifyCode(arg);\n }\n\n /** Called after an Element was updated.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element that was updated\n * @beta\n */\n protected static onUpdated(_arg: OnElementIdArg): void { }\n\n /** Called before an Element is deleted.\n * @note throw an exception to disallow the delete\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element to be deleted\n * @beta\n */\n protected static onDelete(arg: OnElementIdArg): void {\n arg.iModel.channels[_verifyChannel](arg.model);\n arg.iModel.locks.checkExclusiveLock(arg.id, \"element\", \"delete\");\n }\n\n /** Called after an Element was deleted.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Element that was deleted\n * @beta\n */\n protected static onDeleted(_arg: OnElementIdArg): void { }\n\n /** Called when an element with an instance of this class as its parent is about to be deleted.\n * @note throw an exception if the element should not be deleted\n * @note implementers should not presume that the element was deleted if this method does not throw,\n * since the delete may fail for other reasons. Instead, rely on [[onChildDeleted]] for that purpose.\n * @note `this` is the class of the parent Element whose child will be deleted\n * @beta\n */\n protected static onChildDelete(_arg: OnChildElementIdArg): void { }\n\n /** Called after an element with an instance of this class as its parent was successfully deleted.\n * @note `this` is the class of the parent Element whose child was deleted\n * @beta\n */\n protected static onChildDeleted(_arg: OnChildElementIdArg): void { }\n\n /** Called when a *new element* with an instance of this class as its parent is about to be inserted.\n * @note throw an exception if the element should not be inserted\n * @note `this` is the class of the prospective parent Element.\n * @beta\n */\n protected static onChildInsert(_arg: OnChildElementPropsArg): void { }\n\n /** Called after a *new element* with an instance of this class as its parent was inserted.\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildInserted(_arg: OnChildElementIdArg): void { }\n\n /** Called when an element with an instance of this class as its parent is about to be updated.\n * @note throw an exception if the element should not be updated\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildUpdate(_arg: OnChildElementPropsArg): void { }\n\n /** Called after an element with an instance of this the class as its parent was updated.\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildUpdated(_arg: OnChildElementIdArg): void { }\n\n /** Called when an *existing element* is about to be updated so that an instance of this class will become its new parent.\n * @note throw an exception if the element should not be added\n * @note `this` is the class of the prospective parent Element.\n * @beta\n */\n protected static onChildAdd(_arg: OnChildElementPropsArg): void { }\n\n /** Called after an *existing element* has been updated so that an instance of this class is its new parent.\n * @note `this` is the class of the new parent Element.\n * @beta\n */\n protected static onChildAdded(_arg: OnChildElementIdArg): void { }\n\n /** Called when an element with an instance of this class as its parent is about to be updated change to a different parent.\n * @note throw an exception if the element should not be dropped\n * @note `this` is the class of the parent Element.\n * @beta\n */\n protected static onChildDrop(_arg: OnChildElementIdArg): void { }\n\n /** Called after an element with an instance of this class as its previous parent was updated to have a new parent.\n * @note `this` is the class of the previous parent Element.\n * @beta\n */\n protected static onChildDropped(_arg: OnChildElementIdArg): void { }\n\n /** Called when an instance of this class is being *sub-modeled* by a new Model.\n * @note throw an exception if model should not be inserted\n * @note `this` is the class of Element to be sub-modeled.\n * @beta\n */\n protected static onSubModelInsert(_arg: OnSubModelPropsArg): void { }\n\n /** Called after an instance of this class was *sub-modeled* by a new Model.\n * @note `this` is the class of Element that is now sub-modeled.\n * @beta\n */\n protected static onSubModelInserted(_arg: OnSubModelIdArg): void { }\n\n /** Called when a sub-model of an instance of this class is being deleted.\n * @note throw an exception if model should not be deleted\n * @note `this` is the class of Element that is sub-modeled.\n * @beta\n */\n protected static onSubModelDelete(_arg: OnSubModelIdArg): void { }\n\n /** Called after a sub-model of an instance of this class was deleted.\n * @note `this` is the class of Element that was sub-modeled.\n * @beta\n */\n protected static onSubModelDeleted(_arg: OnSubModelIdArg): void { }\n\n /** Called during the iModel transformation process after an Element from the source iModel was *cloned* for the target iModel.\n * The transformation process automatically handles remapping BisCore properties and those that are properly described in ECSchema.\n * This callback is only meant to be overridden if there are other Ids in non-standard locations that need to be remapped or other data that needs to be fixed up after the clone.\n * @param _context The context that persists any remapping between the source iModel and target iModel.\n * @param _sourceProps The ElementProps for the source Element that was cloned.\n * @param _targetProps The ElementProps that are a result of the clone. These can be further modified.\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onCloned(_context: IModelElementCloneContext, _sourceProps: ElementProps, _targetProps: ElementProps): void { }\n\n /** Called when a *root* element in a subgraph is changed and before its outputs are processed.\n * This special callback is made when:\n * * the element is part of an [[ElementDrivesElement]] graph, and\n * * the element has no inputs, and\n * * none of the element's outputs have been processed.\n * @see [[ElementDrivesElement]] for more on element dependency graphs.\n * @beta\n */\n protected static onBeforeOutputsHandled(_id: Id64String, _iModel: IModelDb): void { }\n\n /** Called on an element in a graph after all of its inputs have been processed and before its outputs are processed.\n * This callback is made when:\n * * the specified element is part of an [[ElementDrivesElement]] graph, and\n * * there was a direct change to some element upstream in the dependency graph.\n * * all upstream elements in the graph have been processed.\n * * none of the downstream elements have been processed.\n * This method is not called if none of the element's inputs were changed.\n * @see [[ElementDrivesElement]] for more on element dependency graphs.\n * @beta\n */\n protected static onAllInputsHandled(_id: Id64String, _iModel: IModelDb): void { }\n\n public override toJSON(): ElementProps {\n const val = super.toJSON() as ElementProps;\n\n if (Code.isValid(this.code))\n val.code = this.code;\n\n val.model = this.model;\n if (undefined !== this.userLabel) // NOTE: blank string should be included in JSON\n val.userLabel = this.userLabel;\n if (this.federationGuid)\n val.federationGuid = this.federationGuid;\n if (this.parent)\n val.parent = this.parent;\n\n if (Object.keys(this.jsonProperties).length > 0)\n val.jsonProperties = this.jsonProperties;\n\n return val;\n }\n\n /** Collect the Ids of this element's *references* at this level of the class hierarchy.\n * @deprecated in 3.x. use [[collectReferenceIds]] instead, the use of the term *predecessors* was confusing and became inaccurate when the transformer could handle cycles\n * @beta\n */\n protected collectPredecessorIds(predecessorIds: EntityReferenceSet): void {\n return this.collectReferenceIds(predecessorIds);\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addModel(this.model); // The modeledElement is a reference\n if (this.code.scope && Id64.isValidId64(this.code.scope))\n referenceIds.addElement(this.code.scope); // The element that scopes the code is a reference\n if (this.parent)\n referenceIds.addElement(this.parent.id); // A parent element is a reference\n }\n\n /** Get the Ids of this element's *references*. A *reference* is any element whose id is stored in the EC data of this element\n * This is important for cloning operations but can be useful in other situations as well.\n * @beta\n * @deprecated in 3.x. use [[getReferenceIds]] instead, the use of the term *predecessors* was confusing and became inaccurate when the transformer could handle cycles\n */\n public getPredecessorIds(): Id64Set {\n return this.getReferenceIds();\n }\n\n /** A *required reference* is an element that had to be inserted before this element could have been inserted.\n * This is the list of property keys on this element that store references to those elements\n * @note This should be overridden (with `super` called) at each level of the class hierarchy that introduces required references.\n * @note any property listed here must be added to the reference ids in [[collectReferenceIds]]\n * @beta\n */\n public static readonly requiredReferenceKeys: ReadonlyArray<string> = [\"parent\", \"model\"];\n\n /** A map of every [[requiredReferenceKeys]] on this class to their entity type.\n * @note This should be overridden (with `super` called) at each level of the class hierarchy that introduces required references.\n * @alpha\n */\n public static readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n parent: ConcreteEntityTypes.Element,\n model: ConcreteEntityTypes.Model,\n };\n\n /** Get the class metadata for this element. */\n public getClassMetaData(): EntityMetaData | undefined { return this.iModel.classMetaDataRegistry.find(this.classFullName); }\n\n private getAllUserProperties(): any {\n if (!this.jsonProperties.UserProps)\n this.jsonProperties.UserProps = new Object();\n\n return this.jsonProperties.UserProps;\n }\n\n /** Get a set of JSON user properties by namespace */\n public getUserProperties(namespace: string) { return this.getAllUserProperties()[namespace]; }\n\n /** Change a set of user JSON properties of this Element by namespace. */\n public setUserProperties(nameSpace: string, value: any) { this.getAllUserProperties()[nameSpace] = value; }\n\n /** Remove a set of JSON user properties, specified by namespace, from this Element */\n public removeUserProperties(nameSpace: string) { delete this.getAllUserProperties()[nameSpace]; }\n\n /** Get a JSON property of this element, by namespace */\n public getJsonProperty(nameSpace: string): any { return this.jsonProperties[nameSpace]; }\n public setJsonProperty(nameSpace: string, value: any) { this.jsonProperties[nameSpace] = value; }\n\n /** Get a display label for this Element. By default returns userLabel if present, otherwise code value. */\n public getDisplayLabel(): string { return this.userLabel ?? this.code.value; }\n\n /** Get a list of HTML strings that describe this Element for the tooltip. Strings will be listed on separate lines in the tooltip.\n * Any instances of the pattern `%{tag}` will be replaced by the localized value of tag.\n */\n public getToolTipMessage(): string[] {\n const addKey = (key: string) => `<b>%{iModelJs:Element.${key}}:</b> `; // %{iModelJs:Element.xxx} is replaced with localized value of xxx in frontend.\n const msg: string[] = [];\n const display = this.getDisplayLabel();\n msg.push(display ? display : `${addKey(\"Id\") + this.id}, ${addKey(\"Type\")}${this.className}`);\n\n if (this instanceof GeometricElement)\n msg.push(addKey(\"Category\") + this.iModel.elements.getElement(this.category).getDisplayLabel());\n\n msg.push(addKey(\"Model\") + this.iModel.elements.getElement(this.model).getDisplayLabel());\n return msg;\n }\n\n /**\n * Insert this Element into the iModel.\n * @see [[IModelDb.Elements.insertElement]]\n * @note For convenience, the value of `this.id` is updated to reflect the resultant element's id.\n * However when `this.federationGuid` is not present or undefined, a new Guid will be generated and stored on the resultant element. But\n * the value of `this.federationGuid` is *not* updated. Generally, it is best to re-read the element after inserting (e.g. via [[IModelDb.Elements.getElement]])\n * if you intend to continue working with it. That will ensure its values reflect the persistent state.\n */\n public insert() {\n return this.id = this.iModel.elements.insertElement(this.toJSON());\n }\n /** Update this Element in the iModel. */\n public update() { this.iModel.elements.updateElement(this.toJSON()); }\n /** Delete this Element from the iModel. */\n public delete() { this.iModel.elements.deleteElement(this.id); }\n}\n\n/** An abstract base class to model real world entities that intrinsically have geometry.\n * @public\n */\nexport abstract class GeometricElement extends Element {\n public static override get className(): string { return \"GeometricElement\"; }\n /** The Id of the [[Category]] for this GeometricElement. */\n public category: Id64String;\n /** The GeometryStream for this GeometricElement. */\n public geom?: GeometryStreamProps;\n /** The origin, orientation, and bounding box of this GeometricElement. */\n public abstract get placement(): Placement2d | Placement3d;\n\n protected constructor(props: GeometricElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.category = Id64.fromJSON(props.category);\n this.geom = props.geom;\n }\n\n /** Type guard for instanceof [[GeometricElement3d]] */\n public is3d(): this is GeometricElement3d { return this instanceof GeometricElement3d; }\n /** Type guard for instanceof [[GeometricElement2d]] */\n public is2d(): this is GeometricElement2d { return this instanceof GeometricElement2d; }\n /** Get the [Transform]($geometry) from the Placement of this GeometricElement */\n public getPlacementTransform(): Transform { return this.placement.transform; }\n public calculateRange3d(): AxisAlignedBox3d { return this.placement.calculateRange(); }\n\n public override toJSON(): GeometricElementProps {\n const val = super.toJSON() as GeometricElementProps;\n val.category = this.category;\n if (this.geom)\n val.geom = this.geom;\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n referenceIds.addElement(this.category);\n // TODO: GeometryPartIds?\n }\n\n /** @beta */\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"category\"];\n /** @alpha */\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\n ...super.requiredReferenceKeyTypeMap,\n category: ConcreteEntityTypes.Element,\n };\n}\n\n/** An abstract base class to model real world entities that intrinsically have 3d geometry.\n * See [how to create a GeometricElement3d]($docs/learning/backend/CreateElements.md#GeometricElement3d).\n * @public\n */\nexport abstract class GeometricElement3d extends GeometricElement {\n public static override get className(): string { return \"GeometricElement3d\"; }\n public placement: Placement3d;\n public typeDefinition?: TypeDefinition;\n\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.placement = Placement3d.fromJSON(props.placement);\n if (props.typeDefinition)\n this.typeDefinition = TypeDefinition.fromJSON(props.typeDefinition);\n }\n\n public override toJSON(): GeometricElement3dProps {\n const val = super.toJSON() as GeometricElement3dProps;\n val.placement = this.placement;\n if (undefined !== this.typeDefinition)\n val.typeDefinition = this.typeDefinition;\n\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.typeDefinition)\n referenceIds.addElement(this.typeDefinition.id);\n }\n}\n\n/** A 3d Graphical Element\n * @public\n */\nexport abstract class GraphicalElement3d extends GeometricElement3d {\n public static override get className(): string { return \"GraphicalElement3d\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** An abstract base class to model information entities that intrinsically have 2d geometry.\n * @public\n */\nexport abstract class GeometricElement2d extends GeometricElement {\n public static override get className(): string { return \"GeometricElement2d\"; }\n public placement: Placement2d;\n public typeDefinition?: TypeDefinition;\n\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.placement = Placement2d.fromJSON(props.placement);\n if (props.typeDefinition)\n this.typeDefinition = TypeDefinition.fromJSON(props.typeDefinition);\n }\n\n public override toJSON(): GeometricElement2dProps {\n const val = super.toJSON() as GeometricElement2dProps;\n val.placement = this.placement;\n if (undefined !== this.typeDefinition)\n val.typeDefinition = this.typeDefinition;\n\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.typeDefinition)\n referenceIds.addElement(this.typeDefinition.id);\n }\n}\n\n/** An abstract base class for 2d Geometric Elements that are used to convey information within graphical presentations (like drawings).\n * @public\n */\nexport abstract class GraphicalElement2d extends GeometricElement2d {\n public static override get className(): string { return \"GraphicalElement2d\"; }\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** 2d element used to annotate drawings and sheets.\n * @public\n */\nexport class AnnotationElement2d extends GraphicalElement2d {\n public static override get className(): string { return \"AnnotationElement2d\"; }\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** 2d element used to persist graphics for use in drawings.\n * @public\n */\nexport class DrawingGraphic extends GraphicalElement2d {\n public static override get className(): string { return \"DrawingGraphic\"; }\n protected constructor(props: GeometricElement2dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** An Element that occupies real world space. Its coordinates are in the project space of its iModel.\n * @public\n */\nexport abstract class SpatialElement extends GeometricElement3d {\n public static override get className(): string { return \"SpatialElement\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** An Element that is spatially located, has mass, and can be *touched*.\n * @public\n */\nexport abstract class PhysicalElement extends SpatialElement {\n public static override get className(): string { return \"PhysicalElement\"; }\n /** If defined, the [[PhysicalMaterial]] that makes up this PhysicalElement. */\n public physicalMaterial?: RelatedElement;\n protected constructor(props: PhysicalElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.physicalMaterial = RelatedElement.fromJSON(props.physicalMaterial);\n }\n\n public override toJSON(): PhysicalElementProps {\n const val = super.toJSON() as PhysicalElementProps;\n val.physicalMaterial = this.physicalMaterial?.toJSON();\n return val;\n }\n}\n\n/** Identifies a *tracked* real world location but has no mass and cannot be *touched*.\n * @public\n */\nexport abstract class SpatialLocationElement extends SpatialElement {\n public static override get className(): string { return \"SpatialLocationElement\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A Volume Element is a Spatial Location Element that is restricted to defining a volume.\n * @public\n */\nexport class VolumeElement extends SpatialLocationElement {\n public static override get className(): string { return \"VolumeElement\"; }\n protected constructor(props: GeometricElement3dProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A SectionDrawingLocation element identifies the location of a [[SectionDrawing]] in the context of a [[SpatialModel]],\n * enabling [HyperModeling]($hypermodeling).\n * @note The associated ECClass was added to the BisCore schema in version 1.0.11.\n * @public\n */\nexport class SectionDrawingLocation extends SpatialLocationElement {\n /** The Id of the [[ViewDefinition]] to which this location refers. */\n public sectionView: RelatedElement;\n\n public static override get className(): string { return \"SectionDrawingLocation\"; }\n\n public constructor(props: SectionDrawingLocationProps, iModel: IModelDb) {\n super(props, iModel);\n this.sectionView = RelatedElement.fromJSON(props.sectionView) ?? RelatedElement.none;\n }\n\n public override toJSON(): SectionDrawingLocationProps {\n return {\n ...super.toJSON(),\n sectionView: this.sectionView.toJSON(),\n };\n }\n}\n\n/** Information Content Element is an abstract base class for modeling pure information entities. Only the\n * core framework should directly subclass from Information Content Element. Domain and application developers\n * should start with the most appropriate subclass of Information Content Element.\n * @public\n */\nexport abstract class InformationContentElement extends Element {\n public static override get className(): string { return \"InformationContentElement\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** Element used in conjunction with bis:ElementDrivesElement relationships to bundle multiple inputs before\n * driving the output element.\n * @beta\n */\nexport abstract class DriverBundleElement extends InformationContentElement {\n public static override get className(): string { return \"DriverBundleElement\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** Information Reference is an abstract base class for modeling entities whose main purpose is to reference something else.\n * @public\n */\nexport abstract class InformationReferenceElement extends InformationContentElement {\n public static override get className(): string { return \"InformationReferenceElement\"; }\n\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A Subject is an information element that describes what this repository (or part thereof) is about.\n * @public\n */\nexport class Subject extends InformationReferenceElement {\n public static override get className(): string { return \"Subject\"; }\n public description?: string;\n protected constructor(props: SubjectProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n }\n\n public override toJSON(): SubjectProps { // This override only specializes the return type\n return super.toJSON() as SubjectProps; // Entity.toJSON takes care of auto-handled properties\n }\n /** Create a Code for a Subject given a name that is meant to be unique within the scope of its parent Subject.\n * @param iModelDb The IModelDb\n * @param parentSubjectId The Id of the parent Subject that provides the scope for names of its child Subjects.\n * @param codeValue The child Subject name\n */\n public static createCode(iModelDb: IModelDb, parentSubjectId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.subject);\n return new Code({ spec: codeSpec.id, scope: parentSubjectId, value: codeValue });\n }\n /** Create a Subject\n * @param iModelDb The IModelDb\n * @param parentSubjectId The new Subject will be a child of this Subject\n * @param name The name (codeValue) of the Subject\n * @param description The optional description of the Subject\n * @returns The newly constructed Subject\n * @throws [[IModelError]] if there is a problem creating the Subject\n */\n public static create(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, description?: string): Subject {\n const subjectProps: SubjectProps = {\n classFullName: this.classFullName,\n model: IModel.repositoryModelId,\n parent: new SubjectOwnsSubjects(parentSubjectId),\n code: this.createCode(iModelDb, parentSubjectId, name),\n description,\n };\n return new Subject(subjectProps, iModelDb);\n }\n\n /** Insert a Subject\n * @param iModelDb Insert into this IModelDb\n * @param parentSubjectId The new Subject will be inserted as a child of this Subject\n * @param name The name (codeValue) of the Subject\n * @param description The optional description of the Subject\n * @returns The Id of the newly inserted Subject\n * @throws [[IModelError]] if there is a problem inserting the Subject\n */\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, description?: string): Id64String {\n const subject = this.create(iModelDb, parentSubjectId, name, description);\n return iModelDb.elements.insertElement(subject.toJSON());\n }\n}\n\n/** An InformationContentElement that identifies the content of a document.\n * The realized form of a document is called a DocumentCarrier (different class than Document).\n * For example, a will is a legal document. The will published into a PDF file is an ElectronicDocumentCopy.\n * The will printed onto paper is a PrintedDocumentCopy.\n * In this example, the Document only identifies, names, and tracks the content of the will.\n * @public\n */\nexport abstract class Document extends InformationContentElement {\n public static override get className(): string { return \"Document\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A document that represents a drawing, that is, a two-dimensional graphical representation of engineering data. A Drawing element is usually modelled by a [[DrawingModel]].\n * @public\n */\nexport class Drawing extends Document {\n public static override get className(): string { return \"Drawing\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** The name of the DrawingModel class modeled by this element type. */\n protected static get drawingModelFullClassName(): string { return DrawingModel.classFullName; }\n\n /** Create a Code for a Drawing given a name that is meant to be unique within the scope of the specified DocumentListModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DocumentListModel that contains the Drawing and provides the scope for its name.\n * @param codeValue The Drawing name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.drawing);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n\n /** Insert a Drawing element and a DrawingModel that breaks it down.\n * @param iModelDb Insert into this iModel\n * @param documentListModelId Insert the new Drawing into this DocumentListModel\n * @param name The name of the Drawing.\n * @returns The Id of the newly inserted Drawing element and the DrawingModel that breaks it down (same value).\n * @throws [[IModelError]] if unable to insert the element.\n */\n public static insert(iModelDb: IModelDb, documentListModelId: Id64String, name: string): Id64String {\n const drawingProps: ElementProps = {\n classFullName: this.classFullName,\n model: documentListModelId,\n code: this.createCode(iModelDb, documentListModelId, name),\n };\n const drawingId: Id64String = iModelDb.elements.insertElement(drawingProps);\n const model: DrawingModel = iModelDb.models.createModel({\n classFullName: this.drawingModelFullClassName,\n modeledElement: { id: drawingId },\n });\n return iModelDb.models.insertModel(model.toJSON());\n }\n}\n\n/** A document that represents a section drawing, that is, a graphical documentation derived from a planar\n * section of a spatial view. A SectionDrawing element is modelled by a [[SectionDrawingModel]] or a [[GraphicalModel3d]].\n * A [[SectionDrawingLocation]] can associate the drawing with a spatial location, enabling [HyperModeling]($hypermodeling).\n * @public\n */\nexport class SectionDrawing extends Drawing {\n /** The type of section used to generate the drawing. */\n public sectionType: SectionType;\n /** The spatial view from which the section was generated. */\n public spatialView: RelatedElement;\n /** A transform from the section drawing model's coordinates to spatial coordinates. */\n public drawingToSpatialTransform?: Transform;\n /** If the section drawing is placed onto a [[Sheet]] via a [[ViewAttachment]], a transform from the sheet's coordinates to spatial coordinates. */\n public sheetToSpatialTransform?: Transform;\n /** If the section drawing is placed onto a [[Sheet]] via a [[ViewAttachment]], the clip to apply to the sheet graphics when drawn in the context\n * of the spatial view.\n * @note The ClipVector is defined in spatial coordinates.\n */\n public drawingBoundaryClip?: ClipVector;\n /** If true, when displaying the section drawing as a [DrawingViewState]($frontend), the [[spatialView]] will also be displayed. */\n public displaySpatialView: boolean;\n\n public static override get className(): string { return \"SectionDrawing\"; }\n\n protected static override get drawingModelFullClassName(): string { return SectionDrawingModel.classFullName; }\n\n protected constructor(props: SectionDrawingProps, iModel: IModelDb) {\n super(props, iModel);\n this.sectionType = JsonUtils.asInt(props.sectionType, SectionType.Section);\n this.spatialView = RelatedElement.fromJSON(props.spatialView) ?? RelatedElement.none;\n this.displaySpatialView = JsonUtils.asBool(props.jsonProperties?.displaySpatialView);\n\n const json = props.jsonProperties;\n if (!json)\n return;\n\n if (json.drawingToSpatialTransform)\n this.drawingToSpatialTransform = Transform.fromJSON(json.drawingToSpatialTransform);\n\n if (json.sheetToSpatialTransform)\n this.sheetToSpatialTransform = Transform.fromJSON(json.sheetToSpatialTransform);\n\n if (json.drawingBoundaryClip)\n this.drawingBoundaryClip = ClipVector.fromJSON(json.drawingBoundaryClip);\n }\n\n public override toJSON(): SectionDrawingProps {\n const props: SectionDrawingProps = {\n ...super.toJSON(),\n sectionType: this.sectionType,\n spatialView: this.spatialView.toJSON(),\n };\n\n if (!props.jsonProperties)\n props.jsonProperties = {};\n\n props.jsonProperties.displaySpatialView = this.displaySpatialView ? true : undefined;\n props.jsonProperties.drawingToSpatialTransform = this.drawingToSpatialTransform?.toJSON();\n props.jsonProperties.sheetToSpatialTransform = this.sheetToSpatialTransform?.toJSON();\n props.jsonProperties.drawingBoundaryClip = this.drawingBoundaryClip?.toJSON();\n\n return props;\n }\n}\n\n/** The template for a SheetBorder\n * @public\n */\nexport class SheetBorderTemplate extends Document {\n public static override get className(): string { return \"SheetBorderTemplate\"; }\n public height?: number;\n public width?: number;\n protected constructor(props: SheetBorderTemplateProps, iModel: IModelDb) {\n super(props, iModel);\n this.height = props.height;\n this.width = props.width;\n }\n}\n\n/** The template for a [[Sheet]]\n * @public\n */\nexport class SheetTemplate extends Document {\n public static override get className(): string { return \"SheetTemplate\"; }\n public height?: number;\n public width?: number;\n public border?: Id64String;\n\n protected constructor(props: SheetTemplateProps, iModel: IModelDb) {\n super(props, iModel);\n this.height = props.height;\n this.width = props.width;\n this.border = props.border;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.border)\n referenceIds.addElement(this.border);\n }\n}\n\n/** A digital representation of a *sheet of paper*. Modeled by a [[SheetModel]].\n * @public\n */\nexport class Sheet extends Document {\n public static override get className(): string { return \"Sheet\"; }\n public height: number;\n public width: number;\n public scale?: number;\n public sheetTemplate?: Id64String;\n\n protected constructor(props: SheetProps, iModel: IModelDb) {\n super(props, iModel);\n this.height = JsonUtils.asDouble(props.height);\n this.width = JsonUtils.asDouble(props.width);\n this.scale = props.scale;\n this.sheetTemplate = props.sheetTemplate ? Id64.fromJSON(props.sheetTemplate) : undefined;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.sheetTemplate)\n referenceIds.addElement(this.sheetTemplate);\n }\n\n /** Create a Code for a Sheet given a name that is meant to be unique within the scope of the specified DocumentListModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DocumentListModel that contains the Sheet and provides the scope for its name.\n * @param codeValue The Sheet name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.sheet);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Information Record Element is an abstract base class for modeling information records. Information Record\n * Element is the default choice if no other subclass of Information Content Element makes sense.\n * @public\n */\nexport abstract class InformationRecordElement extends InformationContentElement {\n public static override get className(): string { return \"InformationRecordElement\"; }\n\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** A Definition Element holds configuration-related information that is meant to be referenced / shared.\n * @public\n */\nexport abstract class DefinitionElement extends InformationContentElement {\n public static override get className(): string { return \"DefinitionElement\"; }\n /** If true, don't show this DefinitionElement in user interface lists. */\n public isPrivate: boolean;\n\n protected constructor(props: DefinitionElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.isPrivate = true === props.isPrivate;\n }\n\n public override toJSON(): DefinitionElementProps {\n const val = super.toJSON() as DefinitionElementProps;\n val.isPrivate = this.isPrivate;\n return val;\n }\n}\n\n/** This abstract class unifies DefinitionGroup and DefinitionContainer for relationship endpoint purposes.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\n * @public\n */\nexport abstract class DefinitionSet extends DefinitionElement {\n public static override get className(): string { return \"DefinitionSet\"; }\n}\n\n/** A DefinitionContainer exclusively owns a set of DefinitionElements contained within its sub-model (of type DefinitionModel).\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\n * @public\n */\nexport class DefinitionContainer extends DefinitionSet {\n public static override get className(): string { return \"DefinitionContainer\"; }\n /** Create a DefinitionContainer\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionContainer element.\n * @param code The Code for this DefinitionContainer.\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\n * @returns The newly constructed DefinitionContainer\n * @note There is not a predefined CodeSpec for DefinitionContainer elements, so it is the responsibility of the domain or application to create one.\n * @throws [[IModelError]] if there is a problem creating the DefinitionContainer\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): DefinitionContainer {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code,\n isPrivate,\n };\n return new DefinitionContainer(elementProps, iModelDb);\n }\n /** Insert a DefinitionContainer and its sub-model.\n * @param iModelDb Insert into this IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionContainer element.\n * @param code The Code for this DefinitionContainer.\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\n * @returns The Id of the newly inserted DefinitionContainer and its newly inserted sub-model (of type DefinitionModel).\n * @note There is not a predefined CodeSpec for DefinitionContainer elements, so it is the responsibility of the domain or application to create one.\n * @throws [[IModelError]] if there is a problem inserting the DefinitionContainer\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): Id64String {\n const containerElement = this.create(iModelDb, definitionModelId, code, isPrivate);\n const containerElementId = iModelDb.elements.insertElement(containerElement.toJSON());\n const containerSubModelProps: ModelProps = {\n classFullName: DefinitionModel.classFullName,\n modeledElement: { id: containerElementId },\n isPrivate,\n };\n iModelDb.models.insertModel(containerSubModelProps);\n return containerElementId;\n }\n}\n\n/** A non-exclusive set of DefinitionElements grouped using the DefinitionGroupGroupsDefinitions relationship.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.10\n * @public\n */\nexport class DefinitionGroup extends DefinitionSet {\n public static override get className(): string { return \"DefinitionGroup\"; }\n /** Create a DefinitionGroup\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that will contain this DefinitionGroup element.\n * @param code The Code for this DefinitionGroup\n * @param isPrivate The optional hint, that if `true` means it should not be displayed in the UI.\n * @returns The newly constructed DefinitionGroup\n * @note There is not a predefined CodeSpec for DefinitionGroup elements, so it is the responsibility of the domain or application to create one.\n * @throws [[IModelError]] if there is a problem creating the DefinitionGroup\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, code: Code, isPrivate?: boolean): DefinitionGroup {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code,\n isPrivate,\n };\n return new DefinitionGroup(elementProps, iModelDb);\n }\n}\n\n/** Defines a set of properties (the *type*) that may be associated with an element.\n * @public\n */\nexport abstract class TypeDefinitionElement extends DefinitionElement {\n public static override get className(): string { return \"TypeDefinitionElement\"; }\n public recipe?: RelatedElement;\n\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.recipe = this.recipe;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (undefined !== this.recipe)\n referenceIds.addElement(this.recipe.id);\n }\n}\n\n/** Defines a recipe for generating instances from a definition.\n * @beta\n */\nexport abstract class RecipeDefinitionElement extends DefinitionElement {\n public static override get className(): string { return \"RecipeDefinitionElement\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n}\n\n/** Defines a set of properties (the *type*) that can be associated with a Physical Element. A Physical\n * Type has a strong correlation with something that can be ordered from a catalog since all instances\n * share a common set of properties.\n * @public\n */\nexport abstract class PhysicalType extends TypeDefinitionElement {\n public static override get className(): string { return \"PhysicalType\"; }\n /** If defined, the [[PhysicalMaterial]] that makes up this PhysicalType. */\n public physicalMaterial?: RelatedElement;\n protected constructor(props: PhysicalTypeProps, iModel: IModelDb) {\n super(props, iModel);\n this.physicalMaterial = RelatedElement.fromJSON(props.physicalMaterial);\n }\n\n public override toJSON(): PhysicalTypeProps {\n const val = super.toJSON() as PhysicalTypeProps;\n val.physicalMaterial = this.physicalMaterial?.toJSON();\n return val;\n }\n /** Create a Code for a PhysicalType element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the PhysicalType element and provides the scope for its name.\n * @param codeValue The PhysicalType name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalType);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Defines a set of properties (the *type*) that can be associated with a spatial location.\n * @public\n */\nexport abstract class SpatialLocationType extends TypeDefinitionElement {\n public static override get className(): string { return \"SpatialLocationType\"; }\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a SpatialLocationType element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the SpatialLocationType element and provides the scope for its name.\n * @param codeValue The SpatialLocationType name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.spatialLocationType);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A TemplateRecipe3d is a DefinitionElement that has a sub-model that contains the 3d template elements.\n * @beta\n */\nexport class TemplateRecipe3d extends RecipeDefinitionElement {\n public static override get className(): string { return \"TemplateRecipe3d\"; }\n\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a TemplateRecipe3d given a name that is meant to be unique within the scope of its Model.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\n * @param codeValue The name of the TemplateRecipe3d element.\n */\n public static createCode(iModelDb: IModelDb, definitionModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.templateRecipe3d);\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: codeValue });\n }\n\n /** Create a TemplateRecipe3d\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\n * @param name The name (Code.value) of the TemplateRecipe3d\n * @returns The newly constructed TemplateRecipe3d\n * @throws [[IModelError]] if there is a problem creating the TemplateRecipe3d\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): TemplateRecipe3d {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n isPrivate,\n };\n return new TemplateRecipe3d(elementProps, iModelDb);\n }\n /** Insert a TemplateRecipe3d and a PhysicalModel (sub-model) that will contain the 3d template elements.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe3d element.\n * @param name The name (Code.value) of the TemplateRecipe3d\n * @returns The Id of the newly inserted TemplateRecipe3d and the PhysicalModel that sub-models it.\n * @throws [[IModelError]] if there is a problem inserting the TemplateRecipe3d or its sub-model.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): Id64String {\n const element = this.create(iModelDb, definitionModelId, name, isPrivate);\n const modeledElementId: Id64String = iModelDb.elements.insertElement(element.toJSON());\n const modelProps: GeometricModel3dProps = {\n classFullName: PhysicalModel.classFullName,\n modeledElement: { id: modeledElementId },\n isTemplate: true,\n };\n return iModelDb.models.insertModel(modelProps); // will be the same value as modeledElementId\n }\n}\n\n/** Defines a set of properties (the *type*) that can be associated with a 2D Graphical Element.\n * @public\n */\nexport abstract class GraphicalType2d extends TypeDefinitionElement {\n public static override get className(): string { return \"GraphicalType2d\"; }\n\n protected constructor(props: TypeDefinitionElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a GraphicalType2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the GraphicalType2d element and provides the scope for its name.\n * @param codeValue The GraphicalType2d name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.graphicalType2d);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** A recipe that uses a 2D template for creating new instances.\n * @beta\n */\nexport class TemplateRecipe2d extends RecipeDefinitionElement {\n public static override get className(): string { return \"TemplateRecipe2d\"; }\n protected constructor(props: ElementProps, iModel: IModelDb) { super(props, iModel); }\n\n /** Create a Code for a TemplateRecipe2d given a name that is meant to be unique within the scope of its Model.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\n * @param codeValue The name of the TemplateRecipe2d element.\n */\n public static createCode(iModelDb: IModelDb, definitionModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModelDb.codeSpecs.getByName(BisCodeSpec.templateRecipe2d);\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: codeValue });\n }\n\n /** Create a TemplateRecipe2d\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\n * @param name The name (Code.value) of the TemplateRecipe2d\n * @returns The newly constructed TemplateRecipe2d\n * @throws [[IModelError]] if there is a problem creating the TemplateRecipe2d\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): TemplateRecipe2d {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n isPrivate,\n };\n return new TemplateRecipe2d(elementProps, iModelDb);\n }\n /** Insert a TemplateRecipe2d and a DrawingModel (sub-model) that will contain the 2d template elements.\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the [DefinitionModel]($backend) that contains this TemplateRecipe2d element.\n * @param name The name (Code.value) of the TemplateRecipe2d\n * @returns The Id of the newly inserted TemplateRecipe2d and the PhysicalModel that sub-models it.\n * @throws [[IModelError]] if there is a problem inserting the TemplateRecipe2d or its sub-model.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, isPrivate?: boolean): Id64String {\n const element = this.create(iModelDb, definitionModelId, name, isPrivate);\n const modeledElementId: Id64String = iModelDb.elements.insertElement(element.toJSON());\n const modelProps: GeometricModel2dProps = {\n classFullName: DrawingModel.classFullName,\n modeledElement: { id: modeledElementId },\n isTemplate: true,\n };\n return iModelDb.models.insertModel(modelProps); // will be the same value as modeledElementId\n }\n}\n\n/** An abstract base class for elements that establishes a particular modeling perspective for its parent Subject.\n * Instances are always sub-modeled by a specialization of Model of the appropriate modeling perspective.\n * @see [iModel Information Hierarchy]($docs/bis/guide/data-organization/top-of-the-world), [[Subject]], [[Model]]\n * @public\n */\nexport abstract class InformationPartitionElement extends InformationContentElement {\n public static override get className(): string { return \"InformationPartitionElement\"; }\n /** A human-readable string describing the intent of the partition. */\n public description?: string;\n\n protected constructor(props: InformationPartitionElementProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n }\n\n public override toJSON(): InformationPartitionElementProps { // This override only specializes the return type\n return super.toJSON() as InformationPartitionElementProps; // Entity.toJSON takes care of auto-handled properties\n }\n /** Create a code that can be used for any subclass of InformationPartitionElement.\n * @param iModelDb The IModelDb\n * @param parentSubjectId The Id of the parent Subject that provides the scope for names of its child InformationPartitionElements.\n * @param codeValue The InformationPartitionElement name\n */\n public static createCode(iModel: IModelDb, parentSubjectId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.informationPartitionElement);\n return new Code({ spec: codeSpec.id, scope: parentSubjectId, value: codeValue });\n }\n}\n\n/** A DefinitionPartition element establishes a *Definition* modeling perspective for its parent Subject.\n * A DefinitionPartition is always sub-modeled by a DefinitionModel.\n * @see [[DefinitionModel]]\n * @public\n */\nexport class DefinitionPartition extends InformationPartitionElement {\n public static override get className(): string { return \"DefinitionPartition\"; }\n}\n\n/** A DocumentPartition element establishes a *Document* modeling perspective for its parent Subject.\n * A DocumentPartition is always sub-modeled by a DocumentListModel.\n * @see [[DocumentListModel]]\n * @public\n */\nexport class DocumentPartition extends InformationPartitionElement {\n public static override get className(): string { return \"DocumentPartition\"; }\n}\n\n/** A GroupInformationPartition element establishes a *Group Information* modeling perspective for its parent Subject.\n * A GroupInformationPartition is always sub-modeled by a GroupInformationModel.\n * @see [[GroupInformationModel]]\n * @public\n */\nexport class GroupInformationPartition extends InformationPartitionElement {\n public static override get className(): string { return \"GroupInformationPartition\"; }\n}\n\n/** A GraphicalPartition3d element establishes a *3D Graphical* modeling perspective for its parent Subject.\n * A GraphicalPartition3d is always sub-modeled by a GraphicalModel3d.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.8\n * @see [[GraphicalModel3d]]\n * @public\n */\nexport class GraphicalPartition3d extends InformationPartitionElement {\n public static override get className(): string { return \"GraphicalPartition3d\"; }\n}\n\n/** An InformationRecordPartition element establishes a *Information Record* modeling perspective for its parent Subject.\n * A InformationRecordPartition is always sub-modeled by an InformationRecordModel.\n * @see [[InformationRecordModel]]\n * @public\n */\nexport class InformationRecordPartition extends InformationPartitionElement {\n public static override get className(): string { return \"InformationRecordPartition\"; }\n}\n\n/** A LinkPartition element establishes a *Link* modeling perspective for its parent Subject. A LinkPartition is always sub-modeled by a LinkModel.\n * @see [[LinkModel]]\n * @public\n */\nexport class LinkPartition extends InformationPartitionElement {\n public static override get className(): string { return \"LinkPartition\"; }\n}\n\n/** A PhysicalPartition element establishes a *Physical* modeling perspective for its parent Subject. A PhysicalPartition is always sub-modeled by a PhysicalModel.\n * @see [[PhysicalModel]]\n * @public\n */\nexport class PhysicalPartition extends InformationPartitionElement {\n public static override get className(): string { return \"PhysicalPartition\"; }\n}\n\n/** A SpatialLocationPartition element establishes a *SpatialLocation* modeling perspective for its parent Subject.\n * A SpatialLocationPartition is always sub-modeled by a SpatialLocationModel.\n * @see [[SpatialLocationModel]]\n * @public\n */\nexport class SpatialLocationPartition extends InformationPartitionElement {\n public static override get className(): string { return \"SpatialLocationPartition\"; }\n}\n\n/** A SheetIndexPartition element establishes a [[SheetIndex]] modeling perspective for its parent [[Subject]].\n * A SheetIndexPartition is always sub-modeled by a [[SheetIndexModel]].\n * @beta\n */\nexport class SheetIndexPartition extends InformationPartitionElement {\n public static override get className(): string { return \"SheetIndexPartition\"; }\n}\n\n/** Group Information is an abstract base class for modeling entities whose main purpose is to reference a group of related elements.\n * @public\n */\nexport abstract class GroupInformationElement extends InformationReferenceElement {\n public static override get className(): string { return \"GroupInformationElement\"; }\n}\n\n/** An information element that specifies a link.\n * @public\n */\nexport abstract class LinkElement extends InformationReferenceElement {\n public static override get className(): string { return \"LinkElement\"; }\n /** Create a Code for a LinkElement given a name that is meant to be unique within the scope of the specified Model.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the Model that contains the LinkElement and provides the scope for its name.\n * @param codeValue The LinkElement name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.linkElement);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** An information element that specifies a URL link.\n * @public\n */\nexport class UrlLink extends LinkElement {\n public static override get className(): string { return \"UrlLink\"; }\n public description?: string;\n public url?: string;\n\n protected constructor(props: UrlLinkProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n this.url = props.url;\n }\n\n public override toJSON(): UrlLinkProps {\n const val = super.toJSON() as UrlLinkProps;\n val.description = this.description;\n val.url = this.url;\n return val;\n }\n}\n\n/** Represents a folder-like structure that organizes repositories (typically files) in an external system.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.13\n * @alpha\n */\nexport class FolderLink extends UrlLink {\n public static override get className(): string { return \"FolderLink\"; }\n}\n\n/** An information element that links to a repository.\n * @public\n */\nexport class RepositoryLink extends UrlLink {\n public static override get className(): string { return \"RepositoryLink\"; }\n public repositoryGuid?: GuidString;\n /** @note This property was added to the BisCore schema in version 1.0.13 */\n public format?: string;\n\n protected constructor(props: RepositoryLinkProps, iModel: IModelDb) {\n super(props, iModel);\n this.repositoryGuid = props.repositoryGuid;\n this.format = props.format;\n }\n\n public override toJSON(): RepositoryLinkProps {\n const val = super.toJSON() as RepositoryLinkProps;\n val.repositoryGuid = this.repositoryGuid;\n val.format = this.format;\n return val;\n }\n}\n\n/** An information element that links to an embedded file.\n * @public\n */\nexport class EmbeddedFileLink extends LinkElement {\n public static override get className(): string { return \"EmbeddedFileLink\"; }\n}\n\n/** A real world entity is modeled as a Role Element when a set of external circumstances define an important\n * role (one that is worth tracking) that is not intrinsic to the entity playing the role. For example,\n * a person can play the role of a teacher or a rock can play the role of a boundary marker.\n * @public\n */\nexport abstract class RoleElement extends Element {\n public static override get className(): string { return \"RoleElement\"; }\n}\n\n/** A Definition Element that specifies a collection of geometry that is meant to be reused across Geometric\n * Element instances. Leveraging Geometry Parts can help reduce file size and improve display performance.\n * @public\n */\nexport class GeometryPart extends DefinitionElement {\n public static override get className(): string { return \"GeometryPart\"; }\n public geom?: GeometryStreamProps;\n public bbox: ElementAlignedBox3d;\n\n protected constructor(props: GeometryPartProps, iModel: IModelDb) {\n super(props, iModel);\n this.geom = props.geom;\n this.bbox = Range3d.fromJSON(props.bbox);\n }\n\n public override toJSON(): GeometryPartProps {\n const val = super.toJSON() as GeometryPartProps;\n val.geom = this.geom;\n val.bbox = this.bbox;\n return val;\n }\n\n /** Create a Code for a GeometryPart element given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the GeometryPart element and provides the scope for its name.\n * @param codeValue The GeometryPart name\n * @note GeometryPart elements are not required to be named (have a non-empty Code).\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.geometryPart);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** The definition element for a line style\n * @public\n */\nexport class LineStyle extends DefinitionElement {\n public static override get className(): string { return \"LineStyle\"; }\n public description?: string;\n public data: string;\n\n protected constructor(props: LineStyleProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description;\n this.data = props.data;\n }\n\n /** Create a Code for a LineStyle definition given a name that is meant to be unique within the scope of the specified model.\n * @param iModel The IModel\n * @param scopeModelId The Id of the DefinitionModel that contains the LineStyle and provides the scope for its name.\n * @param codeValue The name of the LineStyle\n * @returns A LineStyle Code\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\n return new Code({ spec: iModel.codeSpecs.getByName(BisCodeSpec.lineStyle).id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/** Describes how to animate a view of a [[GeometricModel]] to show change over time using a [RenderSchedule.Script]($common).\n * @note This class was introduced in version 01.00.13 of the BisCore ECSchema. It should only be used with [[IModelDb]]s containing that version or newer.\n * @public\n */\nexport class RenderTimeline extends InformationRecordElement {\n public static override get className(): string { return \"RenderTimeline\"; }\n /** A human-readable description of the timeline, which may be an empty string. */\n public description: string;\n /** The JSON representation of the instructions for visualizing change over time.\n * @see [RenderSchedule.Script]($common) for the API for working with the script.\n */\n public scriptProps: RenderSchedule.ScriptProps;\n\n protected constructor(props: RenderTimelineProps, iModel: IModelDb) {\n super(props, iModel);\n this.description = props.description ?? \"\";\n this.scriptProps = RenderTimeline.parseScriptProps(props.script);\n }\n\n public static fromJSON(props: RenderTimelineProps, iModel: IModelDb): RenderTimeline {\n return new RenderTimeline(props, iModel);\n }\n\n public override toJSON(): RenderTimelineProps {\n const props = super.toJSON() as RenderTimelineProps;\n if (this.description.length > 0)\n props.description = this.description;\n\n props.script = JSON.stringify(this.scriptProps);\n return props;\n }\n\n private static parseScriptProps(json: string): RenderSchedule.ScriptProps {\n try {\n return JSON.parse(json);\n } catch {\n return [];\n }\n }\n\n protected override collectReferenceIds(ids: EntityReferenceSet): void {\n super.collectReferenceIds(ids);\n const script = RenderSchedule.Script.fromJSON(this.scriptProps);\n script?.discloseIds(ids);\n }\n\n /** @alpha */\n protected static override onCloned(context: IModelElementCloneContext, sourceProps: RenderTimelineProps, targetProps: RenderTimelineProps): void {\n super.onCloned(context, sourceProps, targetProps);\n if (context.isBetweenIModels)\n targetProps.script = JSON.stringify(this.remapScript(context, this.parseScriptProps(targetProps.script)));\n }\n\n /** Remap Ids when cloning a RenderSchedule.Script between iModels on a DisplayStyle or RenderTimeline.\n * @beta\n */\n public static remapScript(context: IModelElementCloneContext, input: RenderSchedule.ScriptProps): RenderSchedule.ScriptProps {\n const scriptProps: RenderSchedule.ScriptProps = [];\n if (!Array.isArray(input))\n return scriptProps;\n\n const elementIds = new OrderedId64Array();\n for (const model of input) {\n const modelId = context.findTargetElementId(model.modelId);\n if (!Id64.isValid(modelId))\n continue;\n\n model.modelId = modelId;\n scriptProps.push(model);\n for (const element of model.elementTimelines) {\n elementIds.clear();\n for (const sourceId of RenderSchedule.ElementTimeline.getElementIds(element.elementIds)) {\n const targetId = context.findTargetElementId(sourceId);\n if (Id64.isValid(targetId))\n elementIds.insert(targetId);\n }\n\n element.elementIds = CompressedId64Set.compressIds(elementIds);\n }\n }\n\n return scriptProps;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IpcHost.d.ts","sourceRoot":"","sources":["../../src/IpcHost.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EACg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AI/H,gBAAgB;WACF,UAAU,CAAC,CAAC,SAAS,MAAM,gBAAgB,EAAE,SAAS,EAAE,WAAW,GAAG,YAAY,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAIzJ,gBAAgB;WACF,kBAAkB,CAAC,CAAC,SAAS,MAAM,yBAAyB,EAAE,SAAS,EAAE,WAAW,GAAG,YAAY,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,UAAU,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC;IAInL;;;;OAIG;WACiB,OAAO,CAAC,GAAG,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAY7D,mEAAmE;WAC/C,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAI9C;AAED;;;;;;;;;;;GAWG;AACH,8BAAsB,UAAU;IAC9B;;;;;;OAMG;IACH,aAAoB,WAAW,IAAI,MAAM,CAAC;IAE1C;;;;;OAKG;WACW,QAAQ,IAAI,cAAc;CAoDzC;AA8ID;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAa9I"}
@@ -14,9 +14,9 @@ const core_common_1 = require("@itwin/core-common");
14
14
  const CheckpointManager_1 = require("./CheckpointManager");
15
15
  const IModelDb_1 = require("./IModelDb");
16
16
  const IModelHost_1 = require("./IModelHost");
17
- const IModelTileRpcImpl_1 = require("./rpc-impl/IModelTileRpcImpl");
18
17
  const NativePlatform_1 = require("./internal/NativePlatform");
19
18
  const Symbols_1 = require("./internal/Symbols");
19
+ const IModelTileRpcImpl_1 = require("./rpc-impl/IModelTileRpcImpl");
20
20
  /**
21
21
  * Used by applications that have a dedicated backend. IpcHosts may send messages to their corresponding IpcApp.
22
22
  * @note if either end terminates, the other must too.
@@ -133,26 +133,31 @@ class IpcHandler {
133
133
  }
134
134
  catch (err) {
135
135
  let ret;
136
- if (core_common_1.ITwinError.isITwinError(err)) {
137
- const { namespace, errorKey, message, stack, metadata, ...rest } = err;
136
+ let metadata;
137
+ if ((0, core_common_1.isITwinError)(err)) {
138
+ const { namespace, errorKey, message, stack, ...rest } = err;
139
+ if (rest.metadata)
140
+ metadata = (0, core_common_1.getITwinErrorMetaData)(err);
138
141
  ret = {
139
142
  iTwinError: {
140
143
  namespace,
141
144
  errorKey,
142
145
  message,
143
146
  ...(metadata && { metadata }), // Include metadata only when defined
144
- ...rest,
147
+ ...rest
145
148
  },
146
149
  };
147
150
  if (!IpcHost.noStack)
148
151
  ret.iTwinError.stack = stack;
149
152
  }
150
153
  else {
154
+ metadata = core_bentley_1.BentleyError.getErrorMetadata(err);
151
155
  ret = {
152
156
  error: {
153
157
  name: err.hasOwnProperty("name") ? err.name : err.constructor?.name ?? "Unknown Error",
154
158
  message: err.message ?? core_bentley_1.BentleyError.getErrorMessage(err),
155
159
  errorNumber: err.errorNumber ?? 0,
160
+ ...(metadata && { metadata }), // Include metadata only when defined.
156
161
  },
157
162
  };
158
163
  if (!IpcHost.noStack)
@@ -1 +1 @@
1
- {"version":3,"file":"IpcHost.js","sourceRoot":"","sources":["../../src/IpcHost.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA2VH,4DAaC;AArWD,sDAAqG;AACrG,oDAK4B;AAC5B,2DAAuE;AACvE,yCAA6E;AAC7E,6CAA6D;AAC7D,oEAAyE;AACzE,8DAAyD;AACzD,gDAA+C;AAmB/C;;;;GAIG;AACH,MAAa,OAAO;IACX,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC;IACtB,MAAM,CAAC,IAAI,CAA+B;IAClD,2EAA2E;IACnE,MAAM,KAAK,GAAG,KAAuB,OAAO,IAAI,CAAC,IAAK,CAAC,CAAC,CAAC,CAAC,+DAA+D;IACjI,gIAAgI;IACzH,MAAM,KAA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,CAAC,CAAC,mBAAS,CAAC,CAAC,iBAAiB,EAAE,CAAC;IAChE,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,IAAkB;QAC9C,OAAO,6BAAY,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC;CACF;AAED;;;GAGG;AACH,SAAgB,wBAAwB,CAAC,IAAsB,EAAE,UAAgC,EAAE,gBAAyB;IAC1H,MAAM,QAAQ,GAAG,gBAAgB,IAAI,GAAG,CAAC,CAAC,+DAA+D;IACzG,IAAI,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC;IACrC,MAAM,gBAAgB,GAAqB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QAC3D,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,IAAI,MAAM,IAAI,KAAK,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;YACvC,QAAQ,GAAG,GAAG,GAAG,QAAQ,CAAC;YAC1B,OAAO,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,UAAU,EAAE,CAAC;IACtB,CAAC,CAAC;IAEF,OAAO,gBAAgB,CAAC;AAC1B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module NativeApp\n */\n\nimport { IModelJsNative } from \"@bentley/imodeljs-native\";\nimport { assert, BentleyError, IModelStatus, Logger, LogLevel, OpenMode } from \"@itwin/core-bentley\";\nimport {\n ChangesetIndex, ChangesetIndexAndId, EditingScopeNotifications, getPullChangesIpcChannel, IModelConnectionProps, IModelError, IModelNotFoundResponse, IModelRpcProps,\n ipcAppChannels, IpcAppFunctions, IpcAppNotifications, IpcInvokeReturn, IpcListener, IpcSocketBackend, iTwinChannel,\n ITwinError,\n OpenBriefcaseProps, OpenCheckpointArgs, PullChangesOptions, RemoveFunction, SnapshotOpenOptions, StandaloneOpenOptions, TileTreeContentIds, TxnNotifications,\n} from \"@itwin/core-common\";\nimport { ProgressFunction, ProgressStatus } from \"./CheckpointManager\";\nimport { BriefcaseDb, IModelDb, SnapshotDb, StandaloneDb } from \"./IModelDb\";\nimport { IModelHost, IModelHostOptions } from \"./IModelHost\";\nimport { cancelTileContentRequests } from \"./rpc-impl/IModelTileRpcImpl\";\nimport { IModelNative } from \"./internal/NativePlatform\";\nimport { _nativeDb } from \"./internal/Symbols\";\n\n/**\n * Options for [[IpcHost.startup]]\n * @public\n */\nexport interface IpcHostOpts {\n iModelHost?: IModelHostOptions;\n ipcHost?: {\n /** The Ipc socket to use for communications with frontend. Allows undefined only for headless tests. */\n socket?: IpcSocketBackend;\n\n /** don't send stack information on exceptions */\n exceptions?: {\n noStack?: boolean;\n };\n };\n}\n\n/**\n * Used by applications that have a dedicated backend. IpcHosts may send messages to their corresponding IpcApp.\n * @note if either end terminates, the other must too.\n * @public\n */\nexport class IpcHost {\n public static noStack = false;\n private static _ipc: IpcSocketBackend | undefined;\n /** Get the implementation of the [IpcSocketBackend]($common) interface. */\n private static get ipc(): IpcSocketBackend { return this._ipc!; } // eslint-disable-line @typescript-eslint/no-non-null-assertion\n /** Determine whether Ipc is available for this backend. This will only be true if [[startup]] has been called on this class. */\n public static get isValid(): boolean { return undefined !== this._ipc; }\n\n /**\n * Send a message to the frontend over an Ipc channel.\n * @param channel the name of the channel matching the name registered with [[IpcApp.addListener]].\n * @param data The content of the message.\n */\n public static send(channel: string, ...data: any[]): void {\n this.ipc.send(iTwinChannel(channel), ...data);\n }\n\n /**\n * Establish a handler for an Ipc channel to receive [[Frontend.invoke]] calls\n * @param channel The name of the channel for this handler.\n * @param handler A function that supplies the implementation for `channel`\n * @note returns A function to call to remove the handler.\n */\n public static handle(channel: string, handler: (...args: any[]) => Promise<any>): RemoveFunction {\n return this.ipc.handle(iTwinChannel(channel), handler);\n }\n /**\n * Establish a handler to receive messages sent via [[IpcApp.send]].\n * @param channel The name of the channel for the messages.\n * @param listener A function called when messages are sent over `channel`\n * @note returns A function to call to remove the listener.\n */\n public static addListener(channel: string, listener: IpcListener): RemoveFunction {\n return this.ipc.addListener(iTwinChannel(channel), listener);\n }\n /**\n * Remove a previously registered listener\n * @param channel The name of the channel for the listener previously registered with [[addListener]]\n * @param listener The function passed to [[addListener]]\n */\n public static removeListener(channel: string, listener: IpcListener): void {\n this.ipc.removeListener(iTwinChannel(channel), listener);\n }\n\n private static notify(channel: string, briefcase: BriefcaseDb | StandaloneDb, methodName: string, ...args: any[]) {\n if (this.isValid)\n return this.send(`${channel}/${briefcase.key}`, methodName, ...args);\n }\n\n /** @internal */\n public static notifyIpcFrontend<T extends keyof IpcAppNotifications>(methodName: T, ...args: Parameters<IpcAppNotifications[T]>) {\n return IpcHost.send(ipcAppChannels.appNotify, methodName, ...args);\n }\n\n /** @internal */\n public static notifyTxns<T extends keyof TxnNotifications>(briefcase: BriefcaseDb | StandaloneDb, methodName: T, ...args: Parameters<TxnNotifications[T]>) {\n this.notify(ipcAppChannels.txns, briefcase, methodName, ...args);\n }\n\n /** @internal */\n public static notifyEditingScope<T extends keyof EditingScopeNotifications>(briefcase: BriefcaseDb | StandaloneDb, methodName: T, ...args: Parameters<EditingScopeNotifications[T]>) {\n this.notify(ipcAppChannels.editingScope, briefcase, methodName, ...args);\n }\n\n /**\n * Start the backend of an Ipc app.\n * @param opt\n * @note this method calls [[IModelHost.startup]] internally.\n */\n public static async startup(opt?: IpcHostOpts): Promise<void> {\n this._ipc = opt?.ipcHost?.socket;\n if (opt?.ipcHost?.exceptions?.noStack)\n this.noStack = true;\n\n if (this.isValid) { // for tests, we use IpcHost but don't have a frontend\n IpcAppHandler.register();\n }\n\n await IModelHost.startup(opt?.iModelHost);\n }\n\n /** Shutdown IpcHost backend. Also calls [[IModelHost.shutdown]] */\n public static async shutdown(): Promise<void> {\n this._ipc = undefined;\n await IModelHost.shutdown();\n }\n}\n\n/**\n * Base class for all implementations of an Ipc interface.\n *\n * Create a subclass to implement your Ipc interface. Your class should be declared like this:\n * ```ts\n * class MyHandler extends IpcHandler implements MyInterface\n * ```\n * to ensure all methods and signatures are correct.\n *\n * Then, call `MyClass.register` at startup to connect your class to your channel.\n * @public\n */\nexport abstract class IpcHandler {\n /**\n * All subclasses *must* implement this method to specify their channel name.\n *\n * Channel names are the key that connects Handlers and senders. The channel name of IpcHandlers must exactly match the name used by senders.\n * By convention, channel names should be prefixed by a *namespace* (e.g. `${appName}/`)\n * unique enough to disambiguate them from channels for other apps that may be running in the same processes.\n */\n public abstract get channelName(): string;\n\n /**\n * Register this class as the handler for methods on its channel. This static method creates a new instance\n * that becomes the handler and is `this` when its methods are called.\n * @returns A function that can be called to remove the handler.\n * @note this method should only be called once per channel. If it is called multiple times, subsequent calls replace the previous ones.\n */\n public static register(): RemoveFunction {\n const impl = new (this as any)() as IpcHandler; // create an instance of subclass. \"as any\" is necessary because base class is abstract\n const prohibitedFunctions = Object.getOwnPropertyNames(Object.getPrototypeOf({}));\n\n return IpcHost.handle(impl.channelName, async (_evt: Event, funcName: string, ...args: any[]): Promise<IpcInvokeReturn> => {\n try {\n if (prohibitedFunctions.includes(funcName))\n throw new Error(`Method \"${funcName}\" not available for channel: ${impl.channelName}`);\n\n const func = (impl as any)[funcName];\n if (typeof func !== \"function\")\n throw new IModelError(IModelStatus.FunctionNotFound, `Method \"${impl.constructor.name}.${funcName}\" not found on IpcHandler registered for channel: ${impl.channelName}`);\n\n return { result: await func.call(impl, ...args) };\n } catch (err: any) {\n let ret: IpcInvokeReturn;\n if (ITwinError.isITwinError(err)) {\n const { namespace, errorKey, message, stack, metadata, ...rest } = err;\n ret = {\n iTwinError:\n {\n namespace,\n errorKey,\n message,\n ...(metadata && { metadata }), // Include metadata only when defined\n ...rest,\n },\n };\n if (!IpcHost.noStack)\n ret.iTwinError.stack = stack;\n } else {\n ret = {\n error:\n {\n name: err.hasOwnProperty(\"name\") ? err.name : err.constructor?.name ?? \"Unknown Error\",\n message: err.message ?? BentleyError.getErrorMessage(err),\n errorNumber: err.errorNumber ?? 0,\n },\n };\n if (!IpcHost.noStack)\n ret.error.stack = BentleyError.getErrorStack(err);\n }\n return ret;\n }\n });\n }\n}\n\n/**\n * Implementation of IpcAppFunctions\n */\nclass IpcAppHandler extends IpcHandler implements IpcAppFunctions {\n public get channelName() { return ipcAppChannels.functions; }\n\n private _iModelKeyToPullStatus = new Map<string, ProgressStatus>();\n\n public async log(_timestamp: number, level: LogLevel, category: string, message: string, metaData?: any): Promise<void> {\n switch (level) {\n case LogLevel.Error:\n Logger.logError(category, message, metaData);\n break;\n case LogLevel.Info:\n Logger.logInfo(category, message, metaData);\n break;\n case LogLevel.Trace:\n Logger.logTrace(category, message, metaData);\n break;\n case LogLevel.Warning:\n Logger.logWarning(category, message, metaData);\n break;\n }\n }\n\n public async cancelTileContentRequests(tokenProps: IModelRpcProps, contentIds: TileTreeContentIds[]): Promise<void> {\n return cancelTileContentRequests(tokenProps, contentIds);\n }\n public async cancelElementGraphicsRequests(key: string, requestIds: string[]): Promise<void> {\n return IModelDb.findByKey(key)[_nativeDb].cancelElementGraphicsRequests(requestIds);\n }\n public async openBriefcase(args: OpenBriefcaseProps): Promise<IModelConnectionProps> {\n const db = await BriefcaseDb.open(args);\n return db.toJSON();\n }\n public async openCheckpoint(checkpoint: OpenCheckpointArgs): Promise<IModelConnectionProps> {\n return (await SnapshotDb.openCheckpoint(checkpoint)).getConnectionProps();\n }\n public async openStandalone(filePath: string, openMode: OpenMode, opts?: StandaloneOpenOptions): Promise<IModelConnectionProps> {\n return StandaloneDb.openFile(filePath, openMode, opts).getConnectionProps();\n }\n public async openSnapshot(filePath: string, opts?: SnapshotOpenOptions): Promise<IModelConnectionProps> {\n let resolvedFileName: string | undefined = filePath;\n if (IModelHost.snapshotFileNameResolver) { // eslint-disable-line @typescript-eslint/no-deprecated\n resolvedFileName = IModelHost.snapshotFileNameResolver.tryResolveFileName(filePath); // eslint-disable-line @typescript-eslint/no-deprecated\n if (!resolvedFileName)\n throw new IModelNotFoundResponse(); // eslint-disable-line @typescript-eslint/only-throw-error\n }\n return SnapshotDb.openFile(resolvedFileName, opts).getConnectionProps();\n }\n public async closeIModel(key: string): Promise<void> {\n IModelDb.findByKey(key).close();\n }\n public async saveChanges(key: string, description?: string): Promise<void> {\n IModelDb.findByKey(key).saveChanges(description);\n }\n public async abandonChanges(key: string): Promise<void> {\n IModelDb.findByKey(key).abandonChanges();\n }\n public async hasPendingTxns(key: string): Promise<boolean> {\n return IModelDb.findByKey(key)[_nativeDb].hasPendingTxns();\n }\n\n public async isUndoPossible(key: string): Promise<boolean> {\n return IModelDb.findByKey(key)[_nativeDb].isUndoPossible();\n }\n public async isRedoPossible(key: string): Promise<boolean> {\n return IModelDb.findByKey(key)[_nativeDb].isRedoPossible();\n }\n public async getUndoString(key: string): Promise<string> {\n return IModelDb.findByKey(key)[_nativeDb].getUndoString();\n }\n public async getRedoString(key: string): Promise<string> {\n return IModelDb.findByKey(key)[_nativeDb].getRedoString();\n }\n\n public async pullChanges(key: string, toIndex?: ChangesetIndex, options?: PullChangesOptions): Promise<ChangesetIndexAndId> {\n const iModelDb = BriefcaseDb.findByKey(key);\n\n this._iModelKeyToPullStatus.set(key, ProgressStatus.Continue);\n const checkAbort = () => this._iModelKeyToPullStatus.get(key) ?? ProgressStatus.Continue;\n\n let onProgress: ProgressFunction | undefined;\n if (options?.reportProgress) {\n const progressCallback: ProgressFunction = (loaded, total) => {\n IpcHost.send(getPullChangesIpcChannel(iModelDb.iModelId), { loaded, total });\n return checkAbort();\n };\n onProgress = throttleProgressCallback(progressCallback, checkAbort, options?.progressInterval);\n } else if (options?.enableCancellation) {\n onProgress = checkAbort;\n }\n\n try {\n await iModelDb.pullChanges({ toIndex, onProgress });\n } finally {\n this._iModelKeyToPullStatus.delete(key);\n }\n\n return iModelDb.changeset as ChangesetIndexAndId;\n }\n public async cancelPullChangesRequest(key: string): Promise<void> {\n this._iModelKeyToPullStatus.set(key, ProgressStatus.Abort);\n }\n\n public async pushChanges(key: string, description: string): Promise<ChangesetIndexAndId> {\n const iModelDb = BriefcaseDb.findByKey(key);\n await iModelDb.pushChanges({ description });\n return iModelDb.changeset as ChangesetIndexAndId;\n }\n\n public async toggleGraphicalEditingScope(key: string, startSession: boolean): Promise<boolean> {\n const val: IModelJsNative.ErrorStatusOrResult<any, boolean> = IModelDb.findByKey(key)[_nativeDb].setGeometricModelTrackingEnabled(startSession);\n if (val.error)\n throw new IModelError(val.error.status, \"Failed to toggle graphical editing scope\");\n assert(undefined !== val.result);\n return val.result;\n }\n public async isGraphicalEditingSupported(key: string): Promise<boolean> {\n return IModelDb.findByKey(key)[_nativeDb].isGeometricModelTrackingSupported();\n }\n\n public async reverseTxns(key: string, numOperations: number): Promise<IModelStatus> {\n return IModelDb.findByKey(key)[_nativeDb].reverseTxns(numOperations);\n }\n public async reverseAllTxn(key: string): Promise<IModelStatus> {\n return IModelDb.findByKey(key)[_nativeDb].reverseAll();\n }\n public async reinstateTxn(key: string): Promise<IModelStatus> {\n return IModelDb.findByKey(key)[_nativeDb].reinstateTxn();\n }\n public async restartTxnSession(key: string): Promise<void> {\n return IModelDb.findByKey(key)[_nativeDb].restartTxnSession();\n }\n\n public async queryConcurrency(pool: \"io\" | \"cpu\"): Promise<number> {\n return IModelNative.platform.queryConcurrency(pool);\n }\n}\n\n/**\n * Prevents progress callback being called more frequently when provided interval.\n * @internal\n */\nexport function throttleProgressCallback(func: ProgressFunction, checkAbort: () => ProgressStatus, progressInterval?: number): ProgressFunction {\n const interval = progressInterval ?? 250; // by default, only send progress events every 250 milliseconds\n let nextTime = Date.now() + interval;\n const progressCallback: ProgressFunction = (loaded, total) => {\n const now = Date.now();\n if (loaded >= total || now >= nextTime) {\n nextTime = now + interval;\n return func(loaded, total);\n }\n return checkAbort();\n };\n\n return progressCallback;\n}\n"]}
1
+ {"version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C;QACvB,IAAI,MAAM,IAAI,KAAK,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;YACvC,QAAQ,GAAG,GAAG,GAAG,QAAQ,CAAC;YAC1B,OAAO,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,UAAU,EAAE,CAAC;IACtB,CAAC,CAAC;IAEF,OAAO,gBAAgB,CAAC;AAC1B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module NativeApp\n */\n\nimport { IModelJsNative } from \"@bentley/imodeljs-native\";\nimport { assert, BentleyError, GetMetaDataFunction, IModelStatus, Logger, LoggingMetaData, LogLevel, OpenMode } from \"@itwin/core-bentley\";\nimport {\n ChangesetIndex, ChangesetIndexAndId, EditingScopeNotifications, getITwinErrorMetaData, getPullChangesIpcChannel, IModelConnectionProps, IModelError, IModelNotFoundResponse, IModelRpcProps,\n ipcAppChannels, IpcAppFunctions, IpcAppNotifications, IpcInvokeReturn, IpcListener, IpcSocketBackend, isITwinError, iTwinChannel,\n OpenBriefcaseProps, OpenCheckpointArgs, PullChangesOptions, RemoveFunction, SnapshotOpenOptions, StandaloneOpenOptions, TileTreeContentIds, TxnNotifications,\n} from \"@itwin/core-common\";\nimport { ProgressFunction, ProgressStatus } from \"./CheckpointManager\";\nimport { BriefcaseDb, IModelDb, SnapshotDb, StandaloneDb } from \"./IModelDb\";\nimport { IModelHost, IModelHostOptions } from \"./IModelHost\";\nimport { IModelNative } from \"./internal/NativePlatform\";\nimport { _nativeDb } from \"./internal/Symbols\";\nimport { cancelTileContentRequests } from \"./rpc-impl/IModelTileRpcImpl\";\n\n/**\n * Options for [[IpcHost.startup]]\n * @public\n */\nexport interface IpcHostOpts {\n iModelHost?: IModelHostOptions;\n ipcHost?: {\n /** The Ipc socket to use for communications with frontend. Allows undefined only for headless tests. */\n socket?: IpcSocketBackend;\n\n /** don't send stack information on exceptions */\n exceptions?: {\n noStack?: boolean;\n };\n };\n}\n\n/**\n * Used by applications that have a dedicated backend. IpcHosts may send messages to their corresponding IpcApp.\n * @note if either end terminates, the other must too.\n * @public\n */\nexport class IpcHost {\n public static noStack = false;\n private static _ipc: IpcSocketBackend | undefined;\n /** Get the implementation of the [IpcSocketBackend]($common) interface. */\n private static get ipc(): IpcSocketBackend { return this._ipc!; } // eslint-disable-line @typescript-eslint/no-non-null-assertion\n /** Determine whether Ipc is available for this backend. This will only be true if [[startup]] has been called on this class. */\n public static get isValid(): boolean { return undefined !== this._ipc; }\n\n /**\n * Send a message to the frontend over an Ipc channel.\n * @param channel the name of the channel matching the name registered with [[IpcApp.addListener]].\n * @param data The content of the message.\n */\n public static send(channel: string, ...data: any[]): void {\n this.ipc.send(iTwinChannel(channel), ...data);\n }\n\n /**\n * Establish a handler for an Ipc channel to receive [[Frontend.invoke]] calls\n * @param channel The name of the channel for this handler.\n * @param handler A function that supplies the implementation for `channel`\n * @note returns A function to call to remove the handler.\n */\n public static handle(channel: string, handler: (...args: any[]) => Promise<any>): RemoveFunction {\n return this.ipc.handle(iTwinChannel(channel), handler);\n }\n /**\n * Establish a handler to receive messages sent via [[IpcApp.send]].\n * @param channel The name of the channel for the messages.\n * @param listener A function called when messages are sent over `channel`\n * @note returns A function to call to remove the listener.\n */\n public static addListener(channel: string, listener: IpcListener): RemoveFunction {\n return this.ipc.addListener(iTwinChannel(channel), listener);\n }\n /**\n * Remove a previously registered listener\n * @param channel The name of the channel for the listener previously registered with [[addListener]]\n * @param listener The function passed to [[addListener]]\n */\n public static removeListener(channel: string, listener: IpcListener): void {\n this.ipc.removeListener(iTwinChannel(channel), listener);\n }\n\n private static notify(channel: string, briefcase: BriefcaseDb | StandaloneDb, methodName: string, ...args: any[]) {\n if (this.isValid)\n return this.send(`${channel}/${briefcase.key}`, methodName, ...args);\n }\n\n /** @internal */\n public static notifyIpcFrontend<T extends keyof IpcAppNotifications>(methodName: T, ...args: Parameters<IpcAppNotifications[T]>) {\n return IpcHost.send(ipcAppChannels.appNotify, methodName, ...args);\n }\n\n /** @internal */\n public static notifyTxns<T extends keyof TxnNotifications>(briefcase: BriefcaseDb | StandaloneDb, methodName: T, ...args: Parameters<TxnNotifications[T]>) {\n this.notify(ipcAppChannels.txns, briefcase, methodName, ...args);\n }\n\n /** @internal */\n public static notifyEditingScope<T extends keyof EditingScopeNotifications>(briefcase: BriefcaseDb | StandaloneDb, methodName: T, ...args: Parameters<EditingScopeNotifications[T]>) {\n this.notify(ipcAppChannels.editingScope, briefcase, methodName, ...args);\n }\n\n /**\n * Start the backend of an Ipc app.\n * @param opt\n * @note this method calls [[IModelHost.startup]] internally.\n */\n public static async startup(opt?: IpcHostOpts): Promise<void> {\n this._ipc = opt?.ipcHost?.socket;\n if (opt?.ipcHost?.exceptions?.noStack)\n this.noStack = true;\n\n if (this.isValid) { // for tests, we use IpcHost but don't have a frontend\n IpcAppHandler.register();\n }\n\n await IModelHost.startup(opt?.iModelHost);\n }\n\n /** Shutdown IpcHost backend. Also calls [[IModelHost.shutdown]] */\n public static async shutdown(): Promise<void> {\n this._ipc = undefined;\n await IModelHost.shutdown();\n }\n}\n\n/**\n * Base class for all implementations of an Ipc interface.\n *\n * Create a subclass to implement your Ipc interface. Your class should be declared like this:\n * ```ts\n * class MyHandler extends IpcHandler implements MyInterface\n * ```\n * to ensure all methods and signatures are correct.\n *\n * Then, call `MyClass.register` at startup to connect your class to your channel.\n * @public\n */\nexport abstract class IpcHandler {\n /**\n * All subclasses *must* implement this method to specify their channel name.\n *\n * Channel names are the key that connects Handlers and senders. The channel name of IpcHandlers must exactly match the name used by senders.\n * By convention, channel names should be prefixed by a *namespace* (e.g. `${appName}/`)\n * unique enough to disambiguate them from channels for other apps that may be running in the same processes.\n */\n public abstract get channelName(): string;\n\n /**\n * Register this class as the handler for methods on its channel. This static method creates a new instance\n * that becomes the handler and is `this` when its methods are called.\n * @returns A function that can be called to remove the handler.\n * @note this method should only be called once per channel. If it is called multiple times, subsequent calls replace the previous ones.\n */\n public static register(): RemoveFunction {\n const impl = new (this as any)() as IpcHandler; // create an instance of subclass. \"as any\" is necessary because base class is abstract\n const prohibitedFunctions = Object.getOwnPropertyNames(Object.getPrototypeOf({}));\n\n return IpcHost.handle(impl.channelName, async (_evt: Event, funcName: string, ...args: any[]): Promise<IpcInvokeReturn> => {\n try {\n if (prohibitedFunctions.includes(funcName))\n throw new Error(`Method \"${funcName}\" not available for channel: ${impl.channelName}`);\n\n const func = (impl as any)[funcName];\n if (typeof func !== \"function\")\n throw new IModelError(IModelStatus.FunctionNotFound, `Method \"${impl.constructor.name}.${funcName}\" not found on IpcHandler registered for channel: ${impl.channelName}`);\n\n return { result: await func.call(impl, ...args) };\n } catch (err: any) {\n let ret: IpcInvokeReturn;\n let metadata: Exclude<LoggingMetaData, GetMetaDataFunction>;\n if (isITwinError(err)) {\n const { namespace, errorKey, message, stack, ...rest } = err;\n if(rest.metadata)\n metadata = getITwinErrorMetaData(err);\n ret = {\n iTwinError:\n {\n namespace,\n errorKey,\n message,\n ...(metadata && { metadata }), // Include metadata only when defined\n ...rest\n },\n };\n if (!IpcHost.noStack)\n ret.iTwinError.stack = stack;\n } else {\n metadata = BentleyError.getErrorMetadata(err);\n\n ret = {\n error:\n {\n name: err.hasOwnProperty(\"name\") ? err.name : err.constructor?.name ?? \"Unknown Error\",\n message: err.message ?? BentleyError.getErrorMessage(err),\n errorNumber: err.errorNumber ?? 0,\n ...(metadata && { metadata }), // Include metadata only when defined.\n },\n };\n if (!IpcHost.noStack)\n ret.error.stack = BentleyError.getErrorStack(err);\n }\n return ret;\n }\n });\n }\n}\n\n/**\n * Implementation of IpcAppFunctions\n */\nclass IpcAppHandler extends IpcHandler implements IpcAppFunctions {\n public get channelName() { return ipcAppChannels.functions; }\n\n private _iModelKeyToPullStatus = new Map<string, ProgressStatus>();\n\n public async log(_timestamp: number, level: LogLevel, category: string, message: string, metaData?: any): Promise<void> {\n switch (level) {\n case LogLevel.Error:\n Logger.logError(category, message, metaData);\n break;\n case LogLevel.Info:\n Logger.logInfo(category, message, metaData);\n break;\n case LogLevel.Trace:\n Logger.logTrace(category, message, metaData);\n break;\n case LogLevel.Warning:\n Logger.logWarning(category, message, metaData);\n break;\n }\n }\n\n public async cancelTileContentRequests(tokenProps: IModelRpcProps, contentIds: TileTreeContentIds[]): Promise<void> {\n return cancelTileContentRequests(tokenProps, contentIds);\n }\n public async cancelElementGraphicsRequests(key: string, requestIds: string[]): Promise<void> {\n return IModelDb.findByKey(key)[_nativeDb].cancelElementGraphicsRequests(requestIds);\n }\n public async openBriefcase(args: OpenBriefcaseProps): Promise<IModelConnectionProps> {\n const db = await BriefcaseDb.open(args);\n return db.toJSON();\n }\n public async openCheckpoint(checkpoint: OpenCheckpointArgs): Promise<IModelConnectionProps> {\n return (await SnapshotDb.openCheckpoint(checkpoint)).getConnectionProps();\n }\n public async openStandalone(filePath: string, openMode: OpenMode, opts?: StandaloneOpenOptions): Promise<IModelConnectionProps> {\n return StandaloneDb.openFile(filePath, openMode, opts).getConnectionProps();\n }\n public async openSnapshot(filePath: string, opts?: SnapshotOpenOptions): Promise<IModelConnectionProps> {\n let resolvedFileName: string | undefined = filePath;\n if (IModelHost.snapshotFileNameResolver) { // eslint-disable-line @typescript-eslint/no-deprecated\n resolvedFileName = IModelHost.snapshotFileNameResolver.tryResolveFileName(filePath); // eslint-disable-line @typescript-eslint/no-deprecated\n if (!resolvedFileName)\n throw new IModelNotFoundResponse(); // eslint-disable-line @typescript-eslint/only-throw-error\n }\n return SnapshotDb.openFile(resolvedFileName, opts).getConnectionProps();\n }\n public async closeIModel(key: string): Promise<void> {\n IModelDb.findByKey(key).close();\n }\n public async saveChanges(key: string, description?: string): Promise<void> {\n IModelDb.findByKey(key).saveChanges(description);\n }\n public async abandonChanges(key: string): Promise<void> {\n IModelDb.findByKey(key).abandonChanges();\n }\n public async hasPendingTxns(key: string): Promise<boolean> {\n return IModelDb.findByKey(key)[_nativeDb].hasPendingTxns();\n }\n\n public async isUndoPossible(key: string): Promise<boolean> {\n return IModelDb.findByKey(key)[_nativeDb].isUndoPossible();\n }\n public async isRedoPossible(key: string): Promise<boolean> {\n return IModelDb.findByKey(key)[_nativeDb].isRedoPossible();\n }\n public async getUndoString(key: string): Promise<string> {\n return IModelDb.findByKey(key)[_nativeDb].getUndoString();\n }\n public async getRedoString(key: string): Promise<string> {\n return IModelDb.findByKey(key)[_nativeDb].getRedoString();\n }\n\n public async pullChanges(key: string, toIndex?: ChangesetIndex, options?: PullChangesOptions): Promise<ChangesetIndexAndId> {\n const iModelDb = BriefcaseDb.findByKey(key);\n\n this._iModelKeyToPullStatus.set(key, ProgressStatus.Continue);\n const checkAbort = () => this._iModelKeyToPullStatus.get(key) ?? ProgressStatus.Continue;\n\n let onProgress: ProgressFunction | undefined;\n if (options?.reportProgress) {\n const progressCallback: ProgressFunction = (loaded, total) => {\n IpcHost.send(getPullChangesIpcChannel(iModelDb.iModelId), { loaded, total });\n return checkAbort();\n };\n onProgress = throttleProgressCallback(progressCallback, checkAbort, options?.progressInterval);\n } else if (options?.enableCancellation) {\n onProgress = checkAbort;\n }\n\n try {\n await iModelDb.pullChanges({ toIndex, onProgress });\n } finally {\n this._iModelKeyToPullStatus.delete(key);\n }\n\n return iModelDb.changeset as ChangesetIndexAndId;\n }\n public async cancelPullChangesRequest(key: string): Promise<void> {\n this._iModelKeyToPullStatus.set(key, ProgressStatus.Abort);\n }\n\n public async pushChanges(key: string, description: string): Promise<ChangesetIndexAndId> {\n const iModelDb = BriefcaseDb.findByKey(key);\n await iModelDb.pushChanges({ description });\n return iModelDb.changeset as ChangesetIndexAndId;\n }\n\n public async toggleGraphicalEditingScope(key: string, startSession: boolean): Promise<boolean> {\n const val: IModelJsNative.ErrorStatusOrResult<any, boolean> = IModelDb.findByKey(key)[_nativeDb].setGeometricModelTrackingEnabled(startSession);\n if (val.error)\n throw new IModelError(val.error.status, \"Failed to toggle graphical editing scope\");\n assert(undefined !== val.result);\n return val.result;\n }\n public async isGraphicalEditingSupported(key: string): Promise<boolean> {\n return IModelDb.findByKey(key)[_nativeDb].isGeometricModelTrackingSupported();\n }\n\n public async reverseTxns(key: string, numOperations: number): Promise<IModelStatus> {\n return IModelDb.findByKey(key)[_nativeDb].reverseTxns(numOperations);\n }\n public async reverseAllTxn(key: string): Promise<IModelStatus> {\n return IModelDb.findByKey(key)[_nativeDb].reverseAll();\n }\n public async reinstateTxn(key: string): Promise<IModelStatus> {\n return IModelDb.findByKey(key)[_nativeDb].reinstateTxn();\n }\n public async restartTxnSession(key: string): Promise<void> {\n return IModelDb.findByKey(key)[_nativeDb].restartTxnSession();\n }\n\n public async queryConcurrency(pool: \"io\" | \"cpu\"): Promise<number> {\n return IModelNative.platform.queryConcurrency(pool);\n }\n}\n\n/**\n * Prevents progress callback being called more frequently when provided interval.\n * @internal\n */\nexport function throttleProgressCallback(func: ProgressFunction, checkAbort: () => ProgressStatus, progressInterval?: number): ProgressFunction {\n const interval = progressInterval ?? 250; // by default, only send progress events every 250 milliseconds\n let nextTime = Date.now() + interval;\n const progressCallback: ProgressFunction = (loaded, total) => {\n const now = Date.now();\n if (loaded >= total || now >= nextTime) {\n nextTime = now + interval;\n return func(loaded, total);\n }\n return checkAbort();\n };\n\n return progressCallback;\n}\n"]}
@@ -2,8 +2,8 @@
2
2
  * @module Elements
3
3
  */
4
4
  import { Id64String } from "@itwin/core-bentley";
5
- import { IModelDb } from "../IModelDb";
6
5
  import { ChannelControl, ChannelKey } from "../ChannelControl";
6
+ import { IModelDb } from "../IModelDb";
7
7
  import { _implementationProhibited, _verifyChannel } from "./Symbols";
8
8
  declare class ChannelAdmin implements ChannelControl {
9
9
  private _iModel;
@@ -1 +1 @@
1
- {"version":3,"file":"ChannelAdmin.d.ts","sourceRoot":"","sources":["../../../src/internal/ChannelAdmin.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH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qBAAqB,CAAC;AAEzE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,yBAAyB,EAAa,cAAc,EAAE,MAAM,WAAW,CAAC;AAEjF,cAAM,YAAa,YAAW,cAAc;IAQvB,OAAO,CAAC,OAAO;IAPlC,gBAAuB,gBAAgB,2BAA2B;IAElE,SAAgB,CAAC,yBAAyB,CAAC,YAAa;IACxD,OAAO,CAAC,gBAAgB,CAAyB;IACjD,OAAO,CAAC,cAAc,CAAyB;IAC/C,OAAO,CAAC,aAAa,CAAqC;gBAE/B,OAAO,EAAE,QAAQ;IAMrC,iBAAiB,CAAC,UAAU,EAAE,UAAU;IAKxC,oBAAoB,CAAC,UAAU,EAAE,UAAU;IAK3C,aAAa,CAAC,SAAS,EAAE,UAAU,GAAG,UAAU;IA4BhD,CAAC,cAAc,CAAC,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI;IAqB3C,eAAe,CAAC,IAAI,EAAE;QAAE,SAAS,EAAE,UAAU,CAAC;QAAC,UAAU,EAAE,UAAU,CAAA;KAAE;IAgBvE,oBAAoB,CAAC,IAAI,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,UAAU,CAAC;QAAC,eAAe,CAAC,EAAE,UAAU,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,UAAU;IAc3I,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,GAAG,SAAS;CAmBxE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,QAAQ,GAAG,YAAY,CAEnE"}
@@ -10,9 +10,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.createChannelControl = createChannelControl;
11
11
  const core_bentley_1 = require("@itwin/core-bentley");
12
12
  const core_common_1 = require("@itwin/core-common");
13
+ const ChannelControl_1 = require("../ChannelControl");
13
14
  const Element_1 = require("../Element");
14
15
  const IModelHost_1 = require("../IModelHost");
15
- const ChannelControl_1 = require("../ChannelControl");
16
16
  const Symbols_1 = require("./Symbols");
17
17
  class ChannelAdmin {
18
18
  _iModel;
@@ -64,8 +64,10 @@ class ChannelAdmin {
64
64
  if (this._allowedModels.has(modelId) || this._iModel[Symbols_1._nativeDb].isIndirectChanges())
65
65
  return;
66
66
  const deniedChannel = this._deniedModels.get(modelId);
67
- if (undefined !== deniedChannel)
68
- throw new Error(`channel "${deniedChannel}" is not allowed`);
67
+ if (undefined !== deniedChannel) {
68
+ const error = (0, core_common_1.constructITwinError)(core_common_1.iTwinjsCoreNamespace, core_common_1.iTwinErrorKeys.channelNotAllowed, core_common_1.iTwinErrorMessages.channelNotAllowed(deniedChannel));
69
+ throw error;
70
+ }
69
71
  const channel = this.getChannelKey(modelId);
70
72
  if (this._allowedChannels.has(channel)) {
71
73
  this._allowedModels.add(modelId);
@@ -75,10 +77,15 @@ class ChannelAdmin {
75
77
  return this[Symbols_1._verifyChannel](modelId);
76
78
  }
77
79
  makeChannelRoot(args) {
78
- if (ChannelControl_1.ChannelControl.sharedChannelName !== this.getChannelKey(args.elementId))
79
- throw new Error("channels may not nest");
80
- if (this.queryChannelRoot(args.channelKey) !== undefined)
81
- throw new Error("a channel root for the specified key already exists");
80
+ const channelKey = this.getChannelKey(args.elementId);
81
+ if (ChannelControl_1.ChannelControl.sharedChannelName !== channelKey) {
82
+ const error = (0, core_common_1.constructITwinError)(core_common_1.iTwinjsCoreNamespace, core_common_1.iTwinErrorKeys.channelNest, core_common_1.iTwinErrorMessages.channelNest(channelKey));
83
+ throw error;
84
+ }
85
+ if (this.queryChannelRoot(args.channelKey) !== undefined) {
86
+ const error = (0, core_common_1.constructITwinError)(core_common_1.iTwinjsCoreNamespace, core_common_1.iTwinErrorKeys.channelRootExists, core_common_1.iTwinErrorMessages.channelRootExists(args.channelKey));
87
+ throw error;
88
+ }
82
89
  const props = { classFullName: ChannelAdmin.channelClassName, element: { id: args.elementId }, owner: args.channelKey };
83
90
  this._iModel.elements.insertAspect(props);
84
91
  }
@@ -86,8 +93,10 @@ class ChannelAdmin {
86
93
  // Check if channelKey already exists before inserting Subject.
87
94
  // makeChannelRoot will check that again, but at that point the new Subject is already inserted.
88
95
  // Prefer to check twice instead of deleting the Subject in the latter option.
89
- if (this.queryChannelRoot(args.channelKey) !== undefined)
90
- throw new Error("a channel root for the specified key already exists");
96
+ if (this.queryChannelRoot(args.channelKey) !== undefined) {
97
+ const error = (0, core_common_1.constructITwinError)(core_common_1.iTwinjsCoreNamespace, core_common_1.iTwinErrorKeys.channelRootExists, core_common_1.iTwinErrorMessages.channelRootExists(args.channelKey));
98
+ throw error;
99
+ }
91
100
  const elementId = Element_1.Subject.insert(this._iModel, args.parentSubjectId ?? core_common_1.IModel.rootSubjectId, args.subjectName, args.description);
92
101
  this.makeChannelRoot({ elementId, channelKey: args.channelKey });
93
102
  return elementId;
@@ -1 +1 @@
1
- {"version":3,"file":"ChannelAdmin.js","sourceRoot":"","sources":["../../../src/internal/ChannelAdmin.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AA6HH,oDAEC;AA7HD,sDAAyE;AACzE,oDAAiF;AACjF,wCAAqC;AAErC,8CAA2C;AAC3C,sDAA+D;AAC/D,uCAAiF;AAEjF,MAAM,YAAY;IAQW;IAPpB,MAAM,CAAU,gBAAgB,GAAG,uBAAuB,CAAC;IAElD,CAAC,mCAAyB,CAAC,GAAG,SAAS,CAAC;IAChD,gBAAgB,GAAG,IAAI,GAAG,EAAc,CAAC;IACzC,cAAc,GAAG,IAAI,GAAG,EAAc,CAAC;IACvC,aAAa,GAAG,IAAI,GAAG,EAA0B,CAAC;IAE1D,YAA2B,OAAiB;QAAjB,YAAO,GAAP,OAAO,CAAU;QAC1C,2GAA2G;QAC3G,IAAI,uBAAU,CAAC,aAAa,EAAE,kBAAkB,KAAK,KAAK;YACxD,IAAI,CAAC,gBAAgB,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,uBAAQ,CAAC,aAAa,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YACvF,CAAC,CAAC,CAAC;YAEH,OAAO,WAAW,CAAC;QACrB,CAAC;QAAC,MAAM,CAAC;YACP,8HAA8H;YAC9H,+EAA+E;YAC/E,OAAO,SAAS,CAAC;QACnB,CAAC;IAEH,CAAC;;AAGH,SAAgB,oBAAoB,CAAC,MAAgB;IACnD,OAAO,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;AAClC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Elements\n */\n\nimport { DbResult, Id64String, IModelStatus } from \"@itwin/core-bentley\";\nimport { ChannelRootAspectProps, IModel, IModelError } from \"@itwin/core-common\";\nimport { Subject } from \"../Element\";\nimport { IModelDb } from \"../IModelDb\";\nimport { IModelHost } from \"../IModelHost\";\nimport { ChannelControl, ChannelKey } from \"../ChannelControl\";\nimport { _implementationProhibited, _nativeDb, _verifyChannel } from \"./Symbols\";\n\nclass ChannelAdmin implements ChannelControl {\n public static readonly channelClassName = \"bis:ChannelRootAspect\";\n\n public readonly [_implementationProhibited] = undefined;\n private _allowedChannels = new Set<ChannelKey>();\n private _allowedModels = new Set<Id64String>();\n private _deniedModels = new Map<Id64String, ChannelKey>();\n\n public constructor(private _iModel: IModelDb) {\n // for backwards compatibility, allow the shared channel unless explicitly turned off in IModelHostOptions.\n if (IModelHost.configuration?.allowSharedChannel !== false)\n this._allowedChannels.add(ChannelControl.sharedChannelName);\n }\n\n public addAllowedChannel(channelKey: ChannelKey) {\n this._allowedChannels.add(channelKey);\n this._deniedModels.clear();\n }\n\n public removeAllowedChannel(channelKey: ChannelKey) {\n this._allowedChannels.delete(channelKey);\n this._allowedModels.clear();\n }\n\n public getChannelKey(elementId: Id64String): ChannelKey {\n if (elementId === IModel.rootSubjectId)\n return ChannelControl.sharedChannelName;\n\n try {\n const channel = this._iModel.withPreparedStatement(`SELECT Owner FROM ${ChannelAdmin.channelClassName} WHERE Element.Id=?`, (stmt) => {\n stmt.bindId(1, elementId);\n return DbResult.BE_SQLITE_ROW === stmt.step() ? stmt.getValue(0).getString() : undefined;\n });\n\n if (channel !== undefined)\n return channel;\n } catch {\n // Exception happens if the iModel is too old: ChannelRootAspect class not present in the BisCore schema (older than v1.0.10).\n // In that case all data in such iModel is assumed to be in the shared channel.\n return ChannelControl.sharedChannelName;\n }\n\n const parentId = this._iModel.withPreparedSqliteStatement(\"SELECT ParentId,ModelId FROM bis_Element WHERE id=?\", (stmt) => {\n stmt.bindId(1, elementId);\n if (DbResult.BE_SQLITE_ROW !== stmt.step())\n throw new IModelError(IModelStatus.NotFound, \"Element does not exist\");\n return stmt.getValueId(0) ?? stmt.getValueId(1); // if parent is undefined, use modelId\n });\n\n return this.getChannelKey(parentId);\n }\n\n public [_verifyChannel](modelId: Id64String): void {\n // Note: indirect changes are permitted to change any channel\n if (this._allowedModels.has(modelId) || this._iModel[_nativeDb].isIndirectChanges())\n return;\n\n const deniedChannel = this._deniedModels.get(modelId);\n if (undefined !== deniedChannel)\n throw new Error(`channel \"${deniedChannel}\" is not allowed`);\n\n const channel = this.getChannelKey(modelId);\n if (this._allowedChannels.has(channel)) {\n this._allowedModels.add(modelId);\n return;\n }\n\n this._deniedModels.set(modelId, channel);\n return this[_verifyChannel](modelId);\n }\n\n public makeChannelRoot(args: { elementId: Id64String, channelKey: ChannelKey }) {\n if (ChannelControl.sharedChannelName !== this.getChannelKey(args.elementId))\n throw new Error(\"channels may not nest\");\n\n if (this.queryChannelRoot(args.channelKey) !== undefined)\n throw new Error(\"a channel root for the specified key already exists\");\n\n const props: ChannelRootAspectProps = { classFullName: ChannelAdmin.channelClassName, element: { id: args.elementId }, owner: args.channelKey };\n this._iModel.elements.insertAspect(props);\n }\n\n public insertChannelSubject(args: { subjectName: string, channelKey: ChannelKey, parentSubjectId?: Id64String, description?: string }): Id64String {\n // Check if channelKey already exists before inserting Subject.\n // makeChannelRoot will check that again, but at that point the new Subject is already inserted.\n // Prefer to check twice instead of deleting the Subject in the latter option.\n if (this.queryChannelRoot(args.channelKey) !== undefined)\n throw new Error(\"a channel root for the specified key already exists\");\n\n const elementId = Subject.insert(this._iModel, args.parentSubjectId ?? IModel.rootSubjectId, args.subjectName, args.description);\n this.makeChannelRoot({ elementId, channelKey: args.channelKey });\n return elementId;\n }\n\n public queryChannelRoot(channelKey: ChannelKey): Id64String | undefined {\n if (channelKey === ChannelControl.sharedChannelName)\n // RootSubject acts as the ChannelRoot element of the shared channel\n return IModel.rootSubjectId;\n\n try {\n const channelRoot = this._iModel.withPreparedStatement(`SELECT Element.Id FROM ${ChannelAdmin.channelClassName} WHERE Owner=?`, (stmt) => {\n stmt.bindString(1, channelKey);\n return DbResult.BE_SQLITE_ROW === stmt.step() ? stmt.getValue(0).getId() : undefined;\n });\n\n return channelRoot;\n } catch {\n // Exception happens if the iModel is too old: ChannelRootAspect class not present in the BisCore schema (older than v1.0.10).\n // In that case all data in such iModel is assumed to be in the shared channel.\n return undefined;\n }\n\n }\n}\n\nexport function createChannelControl(iModel: IModelDb): ChannelAdmin {\n return new ChannelAdmin(iModel);\n}\n"]}
1
+ {"version":3,"file":"ChannelAdmin.js","sourceRoot":"","sources":["../../../src/internal/ChannelAdmin.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAsIH,oDAEC;AAtID,sDAAyE;AACzE,oDAAgK;AAChK,sDAA+D;AAC/D,wCAAqC;AAErC,8CAA2C;AAC3C,uCAAiF;AAEjF,MAAM,YAAY;IAQW;IAPpB,MAAM,CAAU,gBAAgB,GAAG,uBAAuB,CAAC;IAElD,CAAC,mCAAyB,CAAC,GAAG,SAA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IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;AAClC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Elements\n */\n\nimport { DbResult, Id64String, IModelStatus } from \"@itwin/core-bentley\";\nimport { ChannelRootAspectProps, constructITwinError, IModel, IModelError, iTwinErrorKeys, iTwinErrorMessages, iTwinjsCoreNamespace } from \"@itwin/core-common\";\nimport { ChannelControl, ChannelKey } from \"../ChannelControl\";\nimport { Subject } from \"../Element\";\nimport { IModelDb } from \"../IModelDb\";\nimport { IModelHost } from \"../IModelHost\";\nimport { _implementationProhibited, _nativeDb, _verifyChannel } from \"./Symbols\";\n\nclass ChannelAdmin implements ChannelControl {\n public static readonly channelClassName = \"bis:ChannelRootAspect\";\n\n public readonly [_implementationProhibited] = undefined;\n private _allowedChannels = new Set<ChannelKey>();\n private _allowedModels = new Set<Id64String>();\n private _deniedModels = new Map<Id64String, ChannelKey>();\n\n public constructor(private _iModel: IModelDb) {\n // for backwards compatibility, allow the shared channel unless explicitly turned off in IModelHostOptions.\n if (IModelHost.configuration?.allowSharedChannel !== false)\n this._allowedChannels.add(ChannelControl.sharedChannelName);\n }\n\n public addAllowedChannel(channelKey: ChannelKey) {\n this._allowedChannels.add(channelKey);\n this._deniedModels.clear();\n }\n\n public removeAllowedChannel(channelKey: ChannelKey) {\n this._allowedChannels.delete(channelKey);\n this._allowedModels.clear();\n }\n\n public getChannelKey(elementId: Id64String): ChannelKey {\n if (elementId === IModel.rootSubjectId)\n return ChannelControl.sharedChannelName;\n\n try {\n const channel = this._iModel.withPreparedStatement(`SELECT Owner FROM ${ChannelAdmin.channelClassName} WHERE Element.Id=?`, (stmt) => {\n stmt.bindId(1, elementId);\n return DbResult.BE_SQLITE_ROW === stmt.step() ? stmt.getValue(0).getString() : undefined;\n });\n\n if (channel !== undefined)\n return channel;\n } catch {\n // Exception happens if the iModel is too old: ChannelRootAspect class not present in the BisCore schema (older than v1.0.10).\n // In that case all data in such iModel is assumed to be in the shared channel.\n return ChannelControl.sharedChannelName;\n }\n\n const parentId = this._iModel.withPreparedSqliteStatement(\"SELECT ParentId,ModelId FROM bis_Element WHERE id=?\", (stmt) => {\n stmt.bindId(1, elementId);\n if (DbResult.BE_SQLITE_ROW !== stmt.step())\n throw new IModelError(IModelStatus.NotFound, \"Element does not exist\");\n return stmt.getValueId(0) ?? stmt.getValueId(1); // if parent is undefined, use modelId\n });\n\n return this.getChannelKey(parentId);\n }\n\n public [_verifyChannel](modelId: Id64String): void {\n // Note: indirect changes are permitted to change any channel\n if (this._allowedModels.has(modelId) || this._iModel[_nativeDb].isIndirectChanges())\n return;\n\n const deniedChannel = this._deniedModels.get(modelId);\n if (undefined !== deniedChannel) {\n const error = constructITwinError(iTwinjsCoreNamespace, iTwinErrorKeys.channelNotAllowed, iTwinErrorMessages.channelNotAllowed(deniedChannel));\n throw error;\n }\n\n const channel = this.getChannelKey(modelId);\n if (this._allowedChannels.has(channel)) {\n this._allowedModels.add(modelId);\n return;\n }\n\n this._deniedModels.set(modelId, channel);\n return this[_verifyChannel](modelId);\n }\n\n public makeChannelRoot(args: { elementId: Id64String, channelKey: ChannelKey }) {\n const channelKey = this.getChannelKey(args.elementId);\n if (ChannelControl.sharedChannelName !== channelKey) {\n const error = constructITwinError(iTwinjsCoreNamespace, iTwinErrorKeys.channelNest, iTwinErrorMessages.channelNest(channelKey));\n throw error;\n }\n\n if (this.queryChannelRoot(args.channelKey) !== undefined) {\n const error = constructITwinError(iTwinjsCoreNamespace, iTwinErrorKeys.channelRootExists, iTwinErrorMessages.channelRootExists(args.channelKey));\n throw error;\n }\n\n const props: ChannelRootAspectProps = { classFullName: ChannelAdmin.channelClassName, element: { id: args.elementId }, owner: args.channelKey };\n this._iModel.elements.insertAspect(props);\n }\n\n public insertChannelSubject(args: { subjectName: string, channelKey: ChannelKey, parentSubjectId?: Id64String, description?: string }): Id64String {\n // Check if channelKey already exists before inserting Subject.\n // makeChannelRoot will check that again, but at that point the new Subject is already inserted.\n // Prefer to check twice instead of deleting the Subject in the latter option.\n if (this.queryChannelRoot(args.channelKey) !== undefined) {\n const error = constructITwinError(iTwinjsCoreNamespace, iTwinErrorKeys.channelRootExists, iTwinErrorMessages.channelRootExists(args.channelKey));\n throw error;\n }\n\n const elementId = Subject.insert(this._iModel, args.parentSubjectId ?? IModel.rootSubjectId, args.subjectName, args.description);\n this.makeChannelRoot({ elementId, channelKey: args.channelKey });\n return elementId;\n }\n\n public queryChannelRoot(channelKey: ChannelKey): Id64String | undefined {\n if (channelKey === ChannelControl.sharedChannelName)\n // RootSubject acts as the ChannelRoot element of the shared channel\n return IModel.rootSubjectId;\n\n try {\n const channelRoot = this._iModel.withPreparedStatement(`SELECT Element.Id FROM ${ChannelAdmin.channelClassName} WHERE Owner=?`, (stmt) => {\n stmt.bindString(1, channelKey);\n return DbResult.BE_SQLITE_ROW === stmt.step() ? stmt.getValue(0).getId() : undefined;\n });\n\n return channelRoot;\n } catch {\n // Exception happens if the iModel is too old: ChannelRootAspect class not present in the BisCore schema (older than v1.0.10).\n // In that case all data in such iModel is assumed to be in the shared channel.\n return undefined;\n }\n\n }\n}\n\nexport function createChannelControl(iModel: IModelDb): ChannelAdmin {\n return new ChannelAdmin(iModel);\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/core-backend",
3
- "version": "5.0.0-dev.82",
3
+ "version": "5.0.0-dev.84",
4
4
  "description": "iTwin.js backend components",
5
5
  "main": "lib/cjs/core-backend.js",
6
6
  "typings": "lib/cjs/core-backend",
@@ -26,10 +26,10 @@
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@opentelemetry/api": "^1.0.4",
29
- "@itwin/core-bentley": "5.0.0-dev.82",
30
- "@itwin/core-geometry": "5.0.0-dev.82",
31
- "@itwin/core-common": "5.0.0-dev.82",
32
- "@itwin/ecschema-metadata": "5.0.0-dev.82"
29
+ "@itwin/core-bentley": "5.0.0-dev.84",
30
+ "@itwin/core-common": "5.0.0-dev.84",
31
+ "@itwin/core-geometry": "5.0.0-dev.84",
32
+ "@itwin/ecschema-metadata": "5.0.0-dev.84"
33
33
  },
34
34
  "peerDependenciesMeta": {
35
35
  "@opentelemetry/api": {
@@ -71,16 +71,16 @@
71
71
  "marked": "^14.1.3",
72
72
  "sql-formatter": "^15.4.6",
73
73
  "webpack": "^5.97.1",
74
- "@itwin/core-common": "5.0.0-dev.82",
75
- "@itwin/build-tools": "5.0.0-dev.82",
76
- "@itwin/ecschema-metadata": "5.0.0-dev.82",
77
- "@itwin/core-bentley": "5.0.0-dev.82",
78
- "@itwin/core-geometry": "5.0.0-dev.82",
79
- "@itwin/ecsql-common": "5.0.0-dev.82",
74
+ "@itwin/build-tools": "5.0.0-dev.84",
75
+ "@itwin/ecschema-metadata": "5.0.0-dev.84",
76
+ "@itwin/ecsql-common": "5.0.0-dev.84",
77
+ "@itwin/core-bentley": "5.0.0-dev.84",
78
+ "@itwin/core-geometry": "5.0.0-dev.84",
79
+ "@itwin/core-common": "5.0.0-dev.84",
80
80
  "internal-tools": "3.0.0-dev.69"
81
81
  },
82
82
  "dependencies": {
83
- "@bentley/imodeljs-native": "5.0.78",
83
+ "@bentley/imodeljs-native": "5.0.79",
84
84
  "@itwin/cloud-agnostic-core": "^2.2.4",
85
85
  "@itwin/object-storage-azure": "^2.3.0",
86
86
  "@itwin/object-storage-core": "^2.3.0",