@itwin/core-common 5.2.0-dev.8 → 5.2.0
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.
- package/CHANGELOG.md +52 -1
- package/lib/cjs/AmbientOcclusion.js.map +1 -1
- package/lib/cjs/AnalysisStyle.js.map +1 -1
- package/lib/cjs/Atmosphere.js.map +1 -1
- package/lib/cjs/AuthorizationClient.js.map +1 -1
- package/lib/cjs/BackgroundMapProvider.js.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/Base64EncodedString.js.map +1 -1
- package/lib/cjs/BlobReader.js.map +1 -1
- package/lib/cjs/BriefcaseTypes.d.ts +2 -0
- package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/Camera.js.map +1 -1
- package/lib/cjs/CatalogIModel.js.map +1 -1
- package/lib/cjs/CesiumIonAssets.js.map +1 -1
- package/lib/cjs/ChangedElements.js.map +1 -1
- package/lib/cjs/ChangedEntities.js.map +1 -1
- package/lib/cjs/ChangesetProps.js.map +1 -1
- package/lib/cjs/ClipStyle.js.map +1 -1
- package/lib/cjs/Code.js.map +1 -1
- package/lib/cjs/ColorByName.js.map +1 -1
- package/lib/cjs/ColorDef.js.map +1 -1
- package/lib/cjs/CommonLoggerCategory.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ContextRealityModel.js.map +1 -1
- package/lib/cjs/ContourDisplay.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSchemaProps.js.map +1 -1
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ECSqlTypes.js.map +1 -1
- package/lib/cjs/ElementMesh.js.map +1 -1
- package/lib/cjs/ElementProps.d.ts +32 -6
- package/lib/cjs/ElementProps.d.ts.map +1 -1
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
- package/lib/cjs/EntityProps.js.map +1 -1
- package/lib/cjs/EntityReference.js.map +1 -1
- package/lib/cjs/Environment.js.map +1 -1
- package/lib/cjs/FeatureIndex.js.map +1 -1
- package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
- package/lib/cjs/FeatureSymbology.js +0 -2
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/FeatureTable.js.map +1 -1
- package/lib/cjs/Fonts.js.map +1 -1
- package/lib/cjs/Frustum.js.map +1 -1
- package/lib/cjs/GenericInstanceFilter.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/GeometryContainment.js.map +1 -1
- package/lib/cjs/GeometryParams.js.map +1 -1
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/GraphicParams.js.map +1 -1
- package/lib/cjs/GroundPlane.js.map +1 -1
- package/lib/cjs/HSLColor.js.map +1 -1
- package/lib/cjs/HSVColor.js.map +1 -1
- package/lib/cjs/HiddenLine.js.map +1 -1
- package/lib/cjs/Hilite.js.map +1 -1
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/IModelError.js.map +1 -1
- package/lib/cjs/IModelVersion.js.map +1 -1
- package/lib/cjs/ITwinCoreErrors.js.map +1 -1
- package/lib/cjs/Image.js.map +1 -1
- package/lib/cjs/IpcAppProps.js.map +1 -1
- package/lib/cjs/LightSettings.js.map +1 -1
- package/lib/cjs/LinePixels.js.map +1 -1
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/MapImagerySettings.js.map +1 -1
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/MassProperties.js.map +1 -1
- package/lib/cjs/MaterialProps.js.map +1 -1
- package/lib/cjs/ModelClipGroup.js.map +1 -1
- package/lib/cjs/ModelGeometryChanges.js.map +1 -1
- package/lib/cjs/ModelProps.js.map +1 -1
- package/lib/cjs/NativeAppProps.js.map +1 -1
- package/lib/cjs/OctEncodedNormal.js.map +1 -1
- package/lib/cjs/PlanProjectionSettings.js.map +1 -1
- package/lib/cjs/PlanarClipMask.js.map +1 -1
- package/lib/cjs/QPoint.js.map +1 -1
- package/lib/cjs/RealityDataAccessProps.js.map +1 -1
- package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderPolyline.js.map +1 -1
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/RgbColor.js.map +1 -1
- package/lib/cjs/RpcInterface.js.map +1 -1
- package/lib/cjs/RpcManager.js.map +1 -1
- package/lib/cjs/SessionProps.js.map +1 -1
- package/lib/cjs/SkyBox.js.map +1 -1
- package/lib/cjs/SolarCalculate.js.map +1 -1
- package/lib/cjs/SolarShadows.js.map +1 -1
- package/lib/cjs/SpatialClassification.js.map +1 -1
- package/lib/cjs/SubCategoryAppearance.js.map +1 -1
- package/lib/cjs/SubCategoryOverride.js.map +1 -1
- package/lib/cjs/TerrainSettings.js.map +1 -1
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/TextureProps.js.map +1 -1
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/Thumbnail.js.map +1 -1
- package/lib/cjs/TileProps.js.map +1 -1
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/TxnAction.js.map +1 -1
- package/lib/cjs/ViewDetails.js.map +1 -1
- package/lib/cjs/ViewFlags.js.map +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.d.ts +1 -1
- package/lib/cjs/annotation/TextAnnotation.d.ts.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.js +1 -1
- package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
- package/lib/cjs/annotation/TextBlock.d.ts +111 -126
- package/lib/cjs/annotation/TextBlock.d.ts.map +1 -1
- package/lib/cjs/annotation/TextBlock.js +234 -142
- package/lib/cjs/annotation/TextBlock.js.map +1 -1
- package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/cjs/annotation/TextBlockLayoutResult.d.ts +3 -5
- package/lib/cjs/annotation/TextBlockLayoutResult.d.ts.map +1 -1
- package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/cjs/annotation/TextField.d.ts +86 -0
- package/lib/cjs/annotation/TextField.d.ts.map +1 -0
- package/lib/cjs/annotation/TextField.js +10 -0
- package/lib/cjs/annotation/TextField.js.map +1 -0
- package/lib/cjs/annotation/TextStyle.d.ts +125 -35
- package/lib/cjs/annotation/TextStyle.d.ts.map +1 -1
- package/lib/cjs/annotation/TextStyle.js +105 -46
- package/lib/cjs/annotation/TextStyle.js.map +1 -1
- package/lib/cjs/core-common.d.ts +1 -0
- package/lib/cjs/core-common.d.ts.map +1 -1
- package/lib/cjs/core-common.js +1 -0
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
- package/lib/cjs/domains/GenericElementProps.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/AreaPattern.js.map +1 -1
- package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
- package/lib/cjs/geometry/Cartographic.js.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
- package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
- package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
- package/lib/cjs/geometry/LineStyle.js.map +1 -1
- package/lib/cjs/geometry/Placement.js.map +1 -1
- package/lib/cjs/geometry/Projection.js.map +1 -1
- package/lib/cjs/geometry/TextString.js.map +1 -1
- package/lib/cjs/internal/BackendTypes.js.map +1 -1
- package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
- package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
- package/lib/cjs/internal/RenderMesh.js.map +1 -1
- package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
- package/lib/cjs/internal/Snapping.js.map +1 -1
- package/lib/cjs/internal/annotations/FieldFormatter.d.ts +18 -0
- package/lib/cjs/internal/annotations/FieldFormatter.d.ts.map +1 -0
- package/lib/cjs/internal/annotations/FieldFormatter.js +66 -0
- package/lib/cjs/internal/annotations/FieldFormatter.js.map +1 -0
- package/lib/cjs/internal/cross-package.d.ts +1 -0
- package/lib/cjs/internal/cross-package.d.ts.map +1 -1
- package/lib/cjs/internal/cross-package.js +4 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/ipc/IpcSession.js.map +1 -1
- package/lib/cjs/ipc/IpcSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
- package/lib/cjs/tile/ElementGraphics.js.map +1 -1
- package/lib/cjs/tile/GltfTileIO.js.map +1 -1
- package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/IModelTileIO.js.map +1 -1
- package/lib/cjs/tile/PntsTileIO.js.map +1 -1
- package/lib/cjs/tile/TileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
- package/lib/esm/AmbientOcclusion.js.map +1 -1
- package/lib/esm/AnalysisStyle.js.map +1 -1
- package/lib/esm/Atmosphere.js.map +1 -1
- package/lib/esm/AuthorizationClient.js.map +1 -1
- package/lib/esm/BackgroundMapProvider.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/Base64EncodedString.js.map +1 -1
- package/lib/esm/BlobReader.js.map +1 -1
- package/lib/esm/BriefcaseTypes.d.ts +2 -0
- package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
- package/lib/esm/BriefcaseTypes.js.map +1 -1
- package/lib/esm/Camera.js.map +1 -1
- package/lib/esm/CatalogIModel.js.map +1 -1
- package/lib/esm/CesiumIonAssets.js.map +1 -1
- package/lib/esm/ChangedElements.js.map +1 -1
- package/lib/esm/ChangedEntities.js.map +1 -1
- package/lib/esm/ChangesetProps.js.map +1 -1
- package/lib/esm/ClipStyle.js.map +1 -1
- package/lib/esm/Code.js.map +1 -1
- package/lib/esm/ColorByName.js.map +1 -1
- package/lib/esm/ColorDef.js.map +1 -1
- package/lib/esm/CommonLoggerCategory.js.map +1 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ContextRealityModel.js.map +1 -1
- package/lib/esm/ContourDisplay.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSchemaProps.js.map +1 -1
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ECSqlTypes.js.map +1 -1
- package/lib/esm/ElementMesh.js.map +1 -1
- package/lib/esm/ElementProps.d.ts +32 -6
- package/lib/esm/ElementProps.d.ts.map +1 -1
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/EmphasizeElementsProps.js.map +1 -1
- package/lib/esm/EntityProps.js.map +1 -1
- package/lib/esm/EntityReference.js.map +1 -1
- package/lib/esm/Environment.js.map +1 -1
- package/lib/esm/FeatureIndex.js.map +1 -1
- package/lib/esm/FeatureSymbology.d.ts.map +1 -1
- package/lib/esm/FeatureSymbology.js +0 -2
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/FeatureTable.js.map +1 -1
- package/lib/esm/Fonts.js.map +1 -1
- package/lib/esm/Frustum.js.map +1 -1
- package/lib/esm/GenericInstanceFilter.js.map +1 -1
- package/lib/esm/GeoCoordinateServices.js.map +1 -1
- package/lib/esm/GeometryContainment.js.map +1 -1
- package/lib/esm/GeometryParams.js.map +1 -1
- package/lib/esm/GeometrySummary.js.map +1 -1
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/GraphicParams.js.map +1 -1
- package/lib/esm/GroundPlane.js.map +1 -1
- package/lib/esm/HSLColor.js.map +1 -1
- package/lib/esm/HSVColor.js.map +1 -1
- package/lib/esm/HiddenLine.js.map +1 -1
- package/lib/esm/Hilite.js.map +1 -1
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/IModelError.js.map +1 -1
- package/lib/esm/IModelVersion.js.map +1 -1
- package/lib/esm/ITwinCoreErrors.js.map +1 -1
- package/lib/esm/Image.js.map +1 -1
- package/lib/esm/IpcAppProps.js.map +1 -1
- package/lib/esm/LightSettings.js.map +1 -1
- package/lib/esm/LinePixels.js.map +1 -1
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/MapImagerySettings.js.map +1 -1
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/lib/esm/MassProperties.js.map +1 -1
- package/lib/esm/MaterialProps.js.map +1 -1
- package/lib/esm/ModelClipGroup.js.map +1 -1
- package/lib/esm/ModelGeometryChanges.js.map +1 -1
- package/lib/esm/ModelProps.js.map +1 -1
- package/lib/esm/NativeAppProps.js.map +1 -1
- package/lib/esm/OctEncodedNormal.js.map +1 -1
- package/lib/esm/PlanProjectionSettings.js.map +1 -1
- package/lib/esm/PlanarClipMask.js.map +1 -1
- package/lib/esm/QPoint.js.map +1 -1
- package/lib/esm/RealityDataAccessProps.js.map +1 -1
- package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
- package/lib/esm/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderPolyline.js.map +1 -1
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/RgbColor.js.map +1 -1
- package/lib/esm/RpcInterface.js.map +1 -1
- package/lib/esm/RpcManager.js.map +1 -1
- package/lib/esm/SessionProps.js.map +1 -1
- package/lib/esm/SkyBox.js.map +1 -1
- package/lib/esm/SolarCalculate.js.map +1 -1
- package/lib/esm/SolarShadows.js.map +1 -1
- package/lib/esm/SpatialClassification.js.map +1 -1
- package/lib/esm/SubCategoryAppearance.js.map +1 -1
- package/lib/esm/SubCategoryOverride.js.map +1 -1
- package/lib/esm/TerrainSettings.js.map +1 -1
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/TextureProps.js.map +1 -1
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/Thumbnail.js.map +1 -1
- package/lib/esm/TileProps.js.map +1 -1
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/TxnAction.js.map +1 -1
- package/lib/esm/ViewDetails.js.map +1 -1
- package/lib/esm/ViewFlags.js.map +1 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/esm/annotation/TextAnnotation.d.ts +1 -1
- package/lib/esm/annotation/TextAnnotation.d.ts.map +1 -1
- package/lib/esm/annotation/TextAnnotation.js +1 -1
- package/lib/esm/annotation/TextAnnotation.js.map +1 -1
- package/lib/esm/annotation/TextBlock.d.ts +111 -126
- package/lib/esm/annotation/TextBlock.d.ts.map +1 -1
- package/lib/esm/annotation/TextBlock.js +230 -141
- package/lib/esm/annotation/TextBlock.js.map +1 -1
- package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/esm/annotation/TextBlockLayoutResult.d.ts +3 -5
- package/lib/esm/annotation/TextBlockLayoutResult.d.ts.map +1 -1
- package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/esm/annotation/TextField.d.ts +86 -0
- package/lib/esm/annotation/TextField.d.ts.map +1 -0
- package/lib/esm/annotation/TextField.js +9 -0
- package/lib/esm/annotation/TextField.js.map +1 -0
- package/lib/esm/annotation/TextStyle.d.ts +125 -35
- package/lib/esm/annotation/TextStyle.d.ts.map +1 -1
- package/lib/esm/annotation/TextStyle.js +104 -45
- package/lib/esm/annotation/TextStyle.js.map +1 -1
- package/lib/esm/core-common.d.ts +1 -0
- package/lib/esm/core-common.d.ts.map +1 -1
- package/lib/esm/core-common.js +1 -0
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
- package/lib/esm/domains/GenericElementProps.js.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
- package/lib/esm/geometry/AreaPattern.js.map +1 -1
- package/lib/esm/geometry/BoundingSphere.js.map +1 -1
- package/lib/esm/geometry/Cartographic.js.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
- package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
- package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/geometry/ImageGraphic.js.map +1 -1
- package/lib/esm/geometry/LineStyle.js.map +1 -1
- package/lib/esm/geometry/Placement.js.map +1 -1
- package/lib/esm/geometry/Projection.js.map +1 -1
- package/lib/esm/geometry/TextString.js.map +1 -1
- package/lib/esm/internal/BackendTypes.js.map +1 -1
- package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
- package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
- package/lib/esm/internal/RenderMesh.js.map +1 -1
- package/lib/esm/internal/RenderTextureParams.js.map +1 -1
- package/lib/esm/internal/Snapping.js.map +1 -1
- package/lib/esm/internal/annotations/FieldFormatter.d.ts +18 -0
- package/lib/esm/internal/annotations/FieldFormatter.d.ts.map +1 -0
- package/lib/esm/internal/annotations/FieldFormatter.js +62 -0
- package/lib/esm/internal/annotations/FieldFormatter.js.map +1 -0
- package/lib/esm/internal/cross-package.d.ts +1 -0
- package/lib/esm/internal/cross-package.d.ts.map +1 -1
- package/lib/esm/internal/cross-package.js +1 -0
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/ipc/IpcSession.js.map +1 -1
- package/lib/esm/ipc/IpcSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/esm/rpc/TestRpcManager.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
- package/lib/esm/rpc/core/RpcControl.js.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
- package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/esm/rpc/core/RpcPush.js.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/esm/tile/B3dmTileIO.js.map +1 -1
- package/lib/esm/tile/CompositeTileIO.js.map +1 -1
- package/lib/esm/tile/ElementGraphics.js.map +1 -1
- package/lib/esm/tile/GltfTileIO.js.map +1 -1
- package/lib/esm/tile/I3dmTileIO.js.map +1 -1
- package/lib/esm/tile/IModelTileIO.js.map +1 -1
- package/lib/esm/tile/PntsTileIO.js.map +1 -1
- package/lib/esm/tile/TileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
- package/package.json +6 -6
package/lib/esm/IModel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModel.js","sourceRoot":"","sources":["../../src/IModel.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAc,IAAI,EAAc,YAAY,EAAW,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACtJ,OAAO,EACE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAgB,SAAS,EAAkB,QAAQ,EAC9H,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,YAAY,EAAqB,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAsB,MAAM,sCAAsC,CAAC;AAEzF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAyM5C;;;;GAIG;AACH,MAAM,OAAO,YAAY;IACvB,wCAAwC;IACxB,MAAM,CAAU;IAChC,4CAA4C;IAC5B,WAAW,CAAqB;IAChD,wFAAwF;IACxE,kBAAkB,CAAgB;IAClD,8HAA8H;IAC9G,OAAO,CAAY;IACnC,8HAA8H;IAC9G,OAAO,CAAY;IACnC,mFAAmF;I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I,WAAW,CAAC,gBAAgB,CAAC,aAAa,EAAE,0BAA0B,CAAC,CAAC;QACpF,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC;IAC3C,CAAC;IAED;;;;;OAKG;IACI,aAAa,CAAC,OAAe,EAAE,MAAgB,IAAa,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAErI;;;;;;OAMG;IACI,aAAa,CAAC,IAAY,EAAE,MAAgB,IAAa,OAAO,aAAa,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,sBAAsB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAErJ;;;;;OAKG;IACI,6BAA6B,CAAC,OAAe,EAAE,MAAqB,IAAkB,OAAO,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhL;;;;;;OAMG;IACI,6BAA6B,CAAC,YAA0B,EAAE,MAAgB,IAAI,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,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 iModels\n */\n\nimport { assert, BeEvent, expectDefined, GeoServiceStatus, GuidString, Id64, Id64String, IModelStatus, Mutable, OpenMode } from \"@itwin/core-bentley\";\nimport {\n Angle, AxisIndex, AxisOrder, Constant, Geometry, Matrix3d, Point3d, Range3d, Range3dProps, Transform, TransformProps, Vector3d, XYAndZ, XYZProps,\n YawPitchRollAngles, YawPitchRollProps,\n} from \"@itwin/core-geometry\";\nimport { ChangesetIdWithIndex } from \"./ChangesetProps\";\nimport { Cartographic, CartographicProps } from \"./geometry/Cartographic\";\nimport { GeographicCRS, GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\nimport { AxisAlignedBox3d } from \"./geometry/Placement\";\nimport { IModelError } from \"./IModelError\";\nimport { ThumbnailProps } from \"./Thumbnail\";\n\n/** The properties to open a connection to an iModel for RPC operations.\n * @public\n */\nexport interface IModelRpcOpenProps {\n /** The iTwin in which the iModel exists - must be defined for briefcases that are synchronized with iModelHub. */\n readonly iTwinId?: GuidString;\n /** Guid of the iModel. */\n readonly iModelId?: GuidString;\n\n /** Id of the last Changeset that was applied to the iModel - must be defined for briefcases that are synchronized with iModelHub.\n * @note Changeset Ids are string hash values based on the content and parent.\n */\n readonly changeset?: ChangesetIdWithIndex;\n}\n\n/** The properties that identify an opened iModel for RPC operations.\n * @public\n */\nexport interface IModelRpcProps extends IModelRpcOpenProps {\n /** Unique key used for identifying the iModel between the frontend and the backend */\n readonly key: string;\n}\n\n/** Properties that position an iModel on the earth via [ECEF](https://en.wikipedia.org/wiki/ECEF) (Earth Centered Earth Fixed) coordinates\n * The origin is specified as an ECEF coordinate. The cartographicOrigin property contains the latitude, longitude and elevation above the WGS84 ellipsoid\n * of the origin property. This cartographicOrigin is offered as a convenient pre-calculated value representing the location of the ECEF origin.\n * The 3D coordinate system this class represents is positioned at specified origin and the axis positioned according to\n * the other properties.\n * If transform property is defined then it will not be computed from other properties.\n * If the xVector and yVector properties are defined (and transform is not defined) then they take precedence over the YawPitchRoll orientation property. The xVector and yVector\n * represent the direction and scale of the X and Y axes. The Z axis is always perpendicular (according to the right hand rule) to these X-Y axes.\n * The scaling in the Z direction is always unity. The scale of the X and Y axes is represented by the size of the vector length.\n * If the xVector and yVector are not present then the YawPitchRoll properties indicates the angles for all tree axes. Scaling in that case\n * is unity in all three directions.\n * Note that the present class is intended to represent geolocated 3D coordinate systems that are normally tangent to the WGS84 ellipsoid\n * possibly offset in altitude by the terrain elevation above the ellipsoid but other general 3D coordinate systems\n * can be defined.\n * @public\n * @extensions\n */\nexport interface EcefLocationProps {\n /** The Origin of an iModel on the earth in ECEF coordinates */\n readonly origin: XYZProps;\n /** The [orientation](https://en.wikipedia.org/wiki/Geographic_coordinate_conversion) of an iModel on the earth. */\n readonly orientation: YawPitchRollProps;\n /** Optional position on the earth used to establish the ECEF coordinates. */\n readonly cartographicOrigin?: CartographicProps;\n /** Optional X column vector used with [[yVector]] to calculate potentially non-rigid transform if a projection is present. */\n readonly xVector?: XYZProps;\n /** Optional Y column vector used with [[xVector]] to calculate potentially non-rigid transform if a projection is present. */\n readonly yVector?: XYZProps;\n /** Optional potentially non-rigid transform defining the ECEF location.\n * @note If this property is supplied, the other properties are ignored.\n */\n readonly transform?: TransformProps;\n}\n\n/** Properties of the [Root Subject]($docs/bis/guide/references/glossary#subject-root).\n * @public\n * @extensions\n */\nexport interface RootSubjectProps {\n /** The name of the root subject. */\n readonly name: string;\n /** Description of the root subject (optional). */\n readonly description?: string;\n}\n\n/** Properties of an iModel that are always held in memory whenever one is opened, both on the frontend and on the backend .\n * @public\n */\nexport interface IModelProps {\n /** The name and description of the root subject of this iModel */\n readonly rootSubject: RootSubjectProps;\n /** The volume of the entire project, in spatial coordinates */\n readonly projectExtents?: Range3dProps;\n /** An offset to be applied to all spatial coordinates. This is normally used to transform spatial coordinates into the Cartesian coordinate system of a Geographic Coordinate System. */\n readonly globalOrigin?: XYZProps;\n /** The location of the iModel in Earth Centered Earth Fixed coordinates. iModel units are always meters */\n readonly ecefLocation?: EcefLocationProps;\n /** The Geographic Coordinate Reference System indicating the projection and datum used. */\n readonly geographicCoordinateSystem?: GeographicCRSProps;\n /** The name of the iModel. */\n readonly name?: string;\n}\n\n/** The properties returned by the backend when creating a new [[IModelConnection]] from the frontend, either with Rpc or with Ipc.\n * These properties describe the iModel held on the backend for thew newly formed connection and are used to construct a new\n * [[IModelConnection]] instance on the frontend to access it.\n * @public\n */\nexport type IModelConnectionProps = IModelProps & IModelRpcProps;\n\n/** The properties that can be supplied when creating a *new* iModel.\n * @public\n */\nexport interface CreateIModelProps extends IModelProps {\n /** The GUID of new iModel. If not present, a GUID will be generated. */\n readonly guid?: GuidString;\n /** Client name for new iModel */\n readonly client?: string;\n /** Thumbnail for new iModel\n * @alpha\n */\n readonly thumbnail?: ThumbnailProps;\n}\n\n/**\n * Sqlite options.\n * @public\n */\nexport interface OpenSqliteArgs {\n /**\n * Specify timeout after which SQLite stop retrying to acquire lock to database file and throw SQLITE_BUSY error.\n * Timeout is specified in milliseconds.\n * For more information https://www.sqlite.org/c3ref/busy_timeout.html.\n * */\n readonly busyTimeout?: number;\n}\n\n/**\n * A key used to identify an opened [IModelDb]($backend) between the frontend and backend for Rpc and Ipc communications.\n * Keys must be unique - that is there can never be two IModelDbs opened with the same key at any given time.\n * If no key is supplied in a call to open an IModelDb, one is generated and returned.\n * It is only necessary to supply a key if you have some reason to assign a specific value to identify an IModelDb.\n * If you don't supply the key, you must use the returned value for Rpc and Ipc communications.\n * @public\n */\nexport interface OpenDbKey {\n readonly key?: string;\n}\n\n/** @beta TODO documentation */\nexport interface CloudContainerUri {\n readonly uriParams: string;\n}\n\n/** Options to open a [SnapshotDb]($backend).\n * @public\n */\nexport interface SnapshotOpenOptions extends OpenDbKey {\n /**\n * The \"base\" name that can be used for creating temporary files related to this Db.\n * The string should be a name related to the current Db filename using some known pattern so that all files named \"baseName*\" can be deleted externally during cleanup.\n * It must be the name of a file (that may or may not exist) in a writable directory.\n * If not present, the baseName will default to the database's file name (including the path).\n * @internal\n */\n readonly tempFileBase?: string;\n}\n\n/** Options to open a [StandaloneDb]($backend) via [StandaloneDb.openFile]($backend) from the backend,\n * or [BriefcaseConnection.openStandalone]($frontend) from the frontend.\n * @public\n */\nexport type StandaloneOpenOptions = OpenDbKey;\n\n/** Options that can be supplied when creating snapshot iModels.\n * @public\n */\nexport interface CreateSnapshotIModelProps {\n /** If true, then create SQLite views for Model, Element, ElementAspect, and Relationship classes.\n * These database views can often be useful for interoperability workflows.\n */\n readonly createClassViews?: boolean;\n}\n\n/** The options that can be specified when creating an *empty* snapshot iModel.\n * @see [SnapshotDb.createEmpty]($backend)\n * @public\n */\nexport type CreateEmptySnapshotIModelProps = CreateIModelProps & CreateSnapshotIModelProps;\n\n/** Options that can be supplied when creating standalone iModels.\n * @public\n */\nexport interface CreateStandaloneIModelProps {\n /** If present, file will allow local editing, but cannot be used to create changesets */\n readonly allowEdit?: string;\n}\n\n/** The options that can be specified when creating an *empty* standalone iModel.\n * @see [StandaloneDb.createEmpty]($backend)\n * @public\n */\nexport type CreateEmptyStandaloneIModelProps = CreateIModelProps & CreateStandaloneIModelProps;\n\n/**\n * @public\n * @extensions\n */\nexport interface FilePropertyProps {\n readonly namespace: string;\n readonly name: string;\n id?: number | string;\n subId?: number | string;\n}\n\n/** The position and orientation of an iModel on the earth in [ECEF](https://en.wikipedia.org/wiki/ECEF) (Earth Centered Earth Fixed) coordinates\n * @note This is an immutable type - all of its properties are frozen.\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\n * @public\n */\nexport class EcefLocation implements EcefLocationProps {\n /** The origin of the ECEF transform. */\n public readonly origin: Point3d;\n /** The orientation of the ECEF transform */\n public readonly orientation: YawPitchRollAngles;\n /** Optional position on the earth used to establish the ECEF origin and orientation. */\n public readonly cartographicOrigin?: Cartographic;\n /** Optional X column vector used with [[yVector]] to calculate potentially non-rigid transform if a projection is present. */\n public readonly xVector?: Vector3d;\n /** Optional Y column vector used with [[xVector]] to calculate potentially non-rigid transform if a projection is present. */\n public readonly yVector?: Vector3d;\n /** The transform from iModel Spatial coordinates to ECEF from this EcefLocation */\n private readonly _transform: Transform = Transform.createIdentity();\n\n /** Get the transform from iModel Spatial coordinates to ECEF from this EcefLocation */\n public getTransform(): Transform { return this._transform; }\n\n /** Construct a new EcefLocation. Once constructed, it is frozen and cannot be modified. */\n constructor(props: EcefLocationProps) {\n this.origin = Point3d.fromJSON(props.origin).freeze();\n this.orientation = YawPitchRollAngles.fromJSON(props.orientation).freeze();\n if (props.cartographicOrigin)\n this.cartographicOrigin = Cartographic.fromRadians({ longitude: props.cartographicOrigin.longitude, latitude: props.cartographicOrigin.latitude, height: props.cartographicOrigin.height }).freeze();\n if (props.xVector && props.yVector) {\n this.xVector = Vector3d.fromJSON(props.xVector).freeze();\n this.yVector = Vector3d.fromJSON(props.yVector).freeze();\n }\n if (props.transform) {\n this._transform.setFromJSON(props.transform);\n this._transform.freeze();\n } else {\n let matrix;\n if (this.xVector && this.yVector) {\n const zVector = this.xVector.crossProduct(this.yVector);\n if (zVector.normalizeInPlace())\n matrix = Matrix3d.createColumns(this.xVector, this.yVector, zVector);\n }\n if (!matrix)\n matrix = this.orientation.toMatrix3d();\n\n this._transform = Transform.createOriginAndMatrix(this.origin, matrix);\n this._transform.freeze();\n }\n }\n\n /** Returns true if this EcefLocation is not located at the center of the Earth.\n * @alpha are locations very close to the center considered valid? What are the specific criteria?\n */\n public get isValid(): boolean {\n return !this.origin.isZero;\n }\n\n /** Construct ECEF Location from cartographic origin with optional known point and angle. */\n public static createFromCartographicOrigin(origin: Cartographic, point?: Point3d, angle?: Angle) {\n const ecefOrigin = origin.toEcef();\n const deltaRadians = 10 / Constant.earthRadiusWGS84.polar;\n const northCarto = Cartographic.fromRadians({ longitude: origin.longitude, latitude: origin.latitude + deltaRadians, height: origin.height });\n const eastCarto = Cartographic.fromRadians({ longitude: origin.longitude + deltaRadians, latitude: origin.latitude, height: origin.height });\n const ecefNorth = northCarto.toEcef();\n const ecefEast = eastCarto.toEcef();\n const xVector = expectDefined(Vector3d.createStartEnd(ecefOrigin, ecefEast).normalize());\n const yVector = expectDefined(Vector3d.createStartEnd(ecefOrigin, ecefNorth).normalize());\n const matrix = expectDefined(Matrix3d.createRigidFromColumns(xVector, yVector, AxisOrder.XYZ));\n if (angle !== undefined) {\n const north = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, angle);\n matrix.multiplyMatrixMatrix(north, matrix);\n }\n if (point !== undefined) {\n const delta = matrix.multiplyVector(Vector3d.create(-point.x, -point.y, -point.z));\n ecefOrigin.addInPlace(delta);\n }\n\n return new EcefLocation({ origin: ecefOrigin, orientation: expectDefined(YawPitchRollAngles.createFromMatrix3d(matrix)), cartographicOrigin: origin });\n }\n\n /** Construct ECEF Location from transform with optional position on the earth used to establish the ECEF origin and orientation. */\n public static createFromTransform(transform: Transform): EcefLocation {\n const ecefOrigin = transform.getOrigin();\n const angleFromInput = YawPitchRollAngles.createDegrees(0, 0, 0);\n const locationOrientationFromInputT = YawPitchRollAngles.createFromMatrix3d(transform.getMatrix(), angleFromInput);\n const transformProps = transform.toJSON();\n\n return new EcefLocation({ origin: ecefOrigin, orientation: locationOrientationFromInputT ?? angleFromInput, transform: transformProps });\n }\n\n /** Get the location center of the earth in the iModel coordinate system. */\n public get earthCenter(): Point3d {\n const matrix = this.orientation.toMatrix3d();\n return Point3d.createFrom(matrix.multiplyTransposeXYZ(-this.origin.x, -this.origin.y, -this.origin.z));\n }\n\n /** Return true if this location is equivalent to another location within a small tolerance. */\n public isAlmostEqual(other: EcefLocation): boolean {\n if (!this.origin.isAlmostEqual(other.origin) || !this.orientation.isAlmostEqual(other.orientation))\n return false;\n\n if ((this.xVector === undefined) !== (other.xVector === undefined) || (this.yVector === undefined) !== (other.yVector === undefined))\n return false;\n\n if (this.xVector !== undefined && other.xVector !== undefined && !this.xVector.isAlmostEqual(other.xVector))\n return false;\n\n if (this.yVector !== undefined && other.yVector !== undefined && !this.yVector.isAlmostEqual(other.yVector))\n return false;\n\n if (!this.getTransform().isAlmostEqual(other.getTransform()))\n return false;\n\n const thisCarto = this.cartographicOrigin;\n const otherCarto = other.cartographicOrigin;\n if (undefined === thisCarto || undefined === otherCarto)\n return undefined === thisCarto && undefined === otherCarto;\n\n return thisCarto.equalsEpsilon(otherCarto, Geometry.smallMetricDistance);\n }\n\n public toJSON(): EcefLocationProps {\n const props: Mutable<EcefLocationProps> = {\n origin: this.origin.toJSON(),\n orientation: this.orientation.toJSON(),\n transform: this.getTransform().toJSON(),\n };\n\n if (this.cartographicOrigin)\n props.cartographicOrigin = this.cartographicOrigin.toJSON();\n\n if (this.xVector)\n props.xVector = this.xVector.toJSON();\n\n if (this.yVector)\n props.yVector = this.yVector.toJSON();\n\n return props;\n }\n}\n\n/** Represents an iModel in JavaScript.\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\n * @public\n */\nexport abstract class IModel implements IModelProps {\n private _projectExtents?: AxisAlignedBox3d;\n private _name?: string;\n private _rootSubject?: RootSubjectProps;\n private _globalOrigin?: Point3d;\n private _ecefLocation?: EcefLocation;\n private _geographicCoordinateSystem?: GeographicCRS;\n private _iModelId?: GuidString;\n private _changeset: ChangesetIdWithIndex;\n\n /** The Id of the repository model. */\n public static readonly repositoryModelId: Id64String = \"0x1\";\n /** The Id of the root subject element. */\n public static readonly rootSubjectId: Id64String = \"0x1\";\n /** The Id of the dictionary model. */\n public static readonly dictionaryId: Id64String = \"0x10\";\n\n /** Event raised after [[name]] changes. */\n public readonly onNameChanged = new BeEvent<(previousName: string) => void>();\n /** Event raised after [[rootSubject]] changes. */\n public readonly onRootSubjectChanged = new BeEvent<(previousSubject: RootSubjectProps) => void>();\n /** Event raised after [[projectExtents]] changes. */\n public readonly onProjectExtentsChanged = new BeEvent<(previousExtents: AxisAlignedBox3d) => void>();\n /** Event raised after [[globalOrigin]] changes. */\n public readonly onGlobalOriginChanged = new BeEvent<(previousOrigin: Point3d) => void>();\n /** Event raised after [[ecefLocation]] changes. */\n public readonly onEcefLocationChanged = new BeEvent<(previousLocation: EcefLocation | undefined) => void>();\n /** Event raised after [[geographicCoordinateSystem]] changes. */\n public readonly onGeographicCoordinateSystemChanged = new BeEvent<(previousGCS: GeographicCRS | undefined) => void>();\n /** Event raised after [[changeset]] changes. */\n public readonly onChangesetChanged = new BeEvent<(previousChangeset: ChangesetIdWithIndex) => void>();\n\n /** Name of the iModel */\n public get name(): string {\n assert(this._name !== undefined);\n return this._name;\n }\n public set name(name: string) {\n if (name !== this._name) {\n const old = this._name;\n this._name = name;\n if (undefined !== old)\n this.onNameChanged.raiseEvent(old);\n }\n }\n\n /** The name and description of the root subject of this iModel */\n public get rootSubject(): RootSubjectProps {\n assert(this._rootSubject !== undefined);\n return this._rootSubject;\n }\n public set rootSubject(subject: RootSubjectProps) {\n if (undefined === this._rootSubject || this._rootSubject.name !== subject.name || this._rootSubject.description !== subject.description) {\n const old = this._rootSubject;\n this._rootSubject = subject;\n if (old)\n this.onRootSubjectChanged.raiseEvent(old);\n }\n }\n\n /** Returns `true` if this is a snapshot iModel. */\n public abstract get isSnapshot(): boolean;\n /** Returns `true` if this is a briefcase copy of an iModel that is synchronized with iModelHub. */\n public abstract get isBriefcase(): boolean;\n\n public abstract get isOpen(): boolean;\n\n /**\n * The volume, in spatial coordinates, inside which the entire project is contained.\n * @note The object returned from this method is frozen. You *must* make a copy before you do anything that might attempt to modify it.\n */\n public get projectExtents() {\n assert(undefined !== this._projectExtents);\n return this._projectExtents;\n }\n public set projectExtents(extents: AxisAlignedBox3d) {\n // Don't allow any axis of the project extents to be less than 1 meter.\n const projectExtents = extents.clone();\n projectExtents.ensureMinLengths(1.0);\n if (!this._projectExtents || !this._projectExtents.isAlmostEqual(projectExtents)) {\n const old = this._projectExtents;\n projectExtents.freeze();\n this._projectExtents = projectExtents;\n if (old)\n this.onProjectExtentsChanged.raiseEvent(old);\n }\n }\n\n /** An offset to be applied to all spatial coordinates. */\n public get globalOrigin(): Point3d {\n assert(this._globalOrigin !== undefined);\n return this._globalOrigin;\n }\n public set globalOrigin(org: Point3d) {\n if (!this._globalOrigin || !this._globalOrigin.isAlmostEqual(org)) {\n const old = this._globalOrigin;\n org.freeze();\n this._globalOrigin = org;\n if (old)\n this.onGlobalOriginChanged.raiseEvent(old);\n }\n }\n\n /** The [EcefLocation]($docs/learning/glossary#ecefLocation) of the iModel in Earth Centered Earth Fixed coordinates.\n * If the iModel property geographicCoordinateSystem is not defined then the ecefLocation provides a geolocation by defining a\n * 3D coordinate system relative to the Earth model WGS84. Refer to additional documentation for details. If the geographicCoordinateSystem\n * property is defined then the ecefLocation must be used with care. When the geographicCoordinateSystem is defined it indicates the\n * iModel cartesian space is the result of a cartographic projection. This implies a flattening of the Earth surface process that\n * results in scale, angular or area distortion. The ecefLocation is then an approximation calculated at the center of the project extent.\n * If the project is more than 2 kilometer in size, the ecefLocation may represent a poor approximation of the effective\n * cartographic projection used and a linear transformation should then be calculated at the exact origin of the data\n * it must position.\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\n */\n public get ecefLocation(): EcefLocation | undefined {\n return this._ecefLocation;\n }\n public set ecefLocation(ecefLocation: EcefLocation | undefined) {\n const old = this._ecefLocation;\n if (!old && !ecefLocation)\n return;\n else if (old && ecefLocation && old.isAlmostEqual(ecefLocation))\n return;\n\n this._ecefLocation = ecefLocation;\n this.onEcefLocationChanged.raiseEvent(old);\n }\n\n /** Set the [EcefLocation]($docs/learning/glossary#ecefLocation) for this iModel. */\n public setEcefLocation(ecef: EcefLocationProps): void {\n this.ecefLocation = new EcefLocation(ecef);\n }\n\n /** The geographic coordinate reference system of the iModel. */\n public get geographicCoordinateSystem(): GeographicCRS | undefined {\n return this._geographicCoordinateSystem;\n }\n public set geographicCoordinateSystem(geoCRS: GeographicCRS | undefined) {\n const old = this._geographicCoordinateSystem;\n if (!old && !geoCRS)\n return;\n else if (old && geoCRS && old.equals(geoCRS))\n return;\n\n this._geographicCoordinateSystem = geoCRS;\n this.onGeographicCoordinateSystemChanged.raiseEvent(old);\n }\n\n /** Sets the geographic coordinate reference system from GeographicCRSProps. */\n public setGeographicCoordinateSystem(geoCRS: GeographicCRSProps) {\n this.geographicCoordinateSystem = new GeographicCRS(geoCRS);\n }\n\n /** @internal */\n public getConnectionProps(): IModelConnectionProps {\n return {\n name: this.name,\n rootSubject: this.rootSubject,\n projectExtents: this.projectExtents.toJSON(),\n globalOrigin: this.globalOrigin.toJSON(),\n ecefLocation: this.ecefLocation,\n geographicCoordinateSystem: this.geographicCoordinateSystem?.toJSON(),\n ...this._getRpcProps(),\n };\n }\n\n /** Convert this iModel to a JSON representation. */\n public toJSON(): IModelConnectionProps {\n return this.getConnectionProps();\n }\n\n /** A key used to identify this iModel in RPC calls from frontend to backend.\n * @internal\n */\n protected _fileKey: string;\n /** Get the key that was used to open this iModel. This is the value used for Rpc and Ipc communications. */\n public get key(): string { return this._fileKey; }\n\n /** @internal */\n protected _iTwinId?: GuidString;\n /** The Guid that identifies the iTwin that owns this iModel. */\n public get iTwinId(): GuidString | undefined { return this._iTwinId; }\n\n /** The Guid that identifies this iModel. */\n public get iModelId(): GuidString | undefined { return this._iModelId; }\n\n /** @public */\n public get changeset(): ChangesetIdWithIndex {\n return { ...this._changeset };\n }\n public set changeset(changeset: ChangesetIdWithIndex) {\n const prev = this._changeset;\n if (prev.id !== changeset.id || prev.index !== changeset.index) {\n this._changeset = { id: changeset.id, index: changeset.index };\n this.onChangesetChanged.raiseEvent(prev);\n }\n }\n\n protected _openMode = OpenMode.Readonly;\n /** The [[OpenMode]] used for this IModel. */\n public get openMode(): OpenMode { return this._openMode; }\n\n /** Return a token for RPC operations.\n * @throws IModelError if the iModel is not open.\n */\n public getRpcProps(): IModelRpcProps {\n if (!this.isOpen)\n throw new IModelError(IModelStatus.BadRequest, \"IModel is not open for rpc\");\n\n return this._getRpcProps();\n }\n\n /** Returns the iModel's RPC properties.\n * @note It is an error to attempt to use these properties as a token for RPC operations if the iModel is not open.\n * @internal\n */\n protected _getRpcProps(): IModelRpcProps {\n return {\n key: this._fileKey,\n iTwinId: this.iTwinId,\n iModelId: this.iModelId,\n changeset: this.changeset,\n };\n }\n\n /** @internal */\n protected constructor(tokenProps?: IModelRpcProps) {\n this._changeset = tokenProps?.changeset ?? { id: \"\", index: 0 };\n this._fileKey = \"\";\n if (tokenProps) {\n this._fileKey = tokenProps.key;\n this._iTwinId = tokenProps.iTwinId;\n this._iModelId = tokenProps.iModelId;\n }\n }\n\n /** @internal */\n protected initialize(name: string, props: IModelProps) {\n this.name = name;\n this.rootSubject = props.rootSubject;\n this.projectExtents = Range3d.fromJSON(props.projectExtents);\n this.globalOrigin = Point3d.fromJSON(props.globalOrigin);\n\n const ecefLocation = props.ecefLocation ? new EcefLocation(props.ecefLocation) : undefined;\n this.ecefLocation = ecefLocation?.isValid ? ecefLocation : undefined;\n\n this.geographicCoordinateSystem = props.geographicCoordinateSystem ? new GeographicCRS(props.geographicCoordinateSystem) : undefined;\n }\n\n /** Get the default subCategoryId for the supplied categoryId */\n public static getDefaultSubCategoryId(categoryId: Id64String): Id64String {\n return Id64.isValid(categoryId) ? Id64.fromLocalAndBriefcaseIds(Id64.getLocalId(categoryId) + 1, Id64.getBriefcaseId(categoryId)) : Id64.invalid;\n }\n\n /** True if this iModel has an [EcefLocation]($docs/learning/glossary#ecefLocation). */\n public get isGeoLocated() { return undefined !== this._ecefLocation; }\n\n /** Get the Transform from this iModel's Spatial coordinates to ECEF coordinates using its [[IModel.ecefLocation]].\n * @throws IModelError if [[isGeoLocated]] is false.\n */\n public getEcefTransform(): Transform {\n if (undefined === this._ecefLocation)\n throw new IModelError(GeoServiceStatus.NoGeoLocation, \"iModel is not GeoLocated\");\n return this._ecefLocation.getTransform();\n }\n\n /** Convert a point in this iModel's Spatial coordinates to an ECEF point using its [[IModel.ecefLocation]].\n * @param spatial A point in the iModel's spatial coordinates\n * @param result If defined, use this for output\n * @returns A Point3d in ECEF coordinates\n * @throws IModelError if [[isGeoLocated]] is false.\n */\n public spatialToEcef(spatial: XYAndZ, result?: Point3d): Point3d { return this.getEcefTransform().multiplyPoint3d(spatial, result); }\n\n /** Convert a point in ECEF coordinates to a point in this iModel's Spatial coordinates using its [[ecefLocation]].\n * @param ecef A point in ECEF coordinates\n * @param result If defined, use this for output\n * @returns A Point3d in this iModel's spatial coordinates\n * @throws IModelError if [[isGeoLocated]] is false.\n * @note The resultant point will only be meaningful if the ECEF coordinate is close on the earth to the iModel.\n */\n public ecefToSpatial(ecef: XYAndZ, result?: Point3d): Point3d { return expectDefined(this.getEcefTransform().multiplyInversePoint3d(ecef, result)); }\n\n /** Convert a point in this iModel's Spatial coordinates to a [[Cartographic]] using its [[IModel.ecefLocation]].\n * @param spatial A point in the iModel's spatial coordinates\n * @param result If defined, use this for output\n * @returns A Cartographic location\n * @throws IModelError if [[isGeoLocated]] is false.\n */\n public spatialToCartographicFromEcef(spatial: XYAndZ, result?: Cartographic): Cartographic { return expectDefined(Cartographic.fromEcef(this.spatialToEcef(spatial), result)); }\n\n /** Convert a [[Cartographic]] to a point in this iModel's Spatial coordinates using its [[IModel.ecefLocation]].\n * @param cartographic A cartographic location\n * @param result If defined, use this for output\n * @returns A point in this iModel's spatial coordinates\n * @throws IModelError if [[isGeoLocated]] is false.\n * @note The resultant point will only be meaningful if the ECEF coordinate is close on the earth to the iModel.\n */\n public cartographicToSpatialFromEcef(cartographic: Cartographic, result?: Point3d) { return this.ecefToSpatial(cartographic.toEcef(result), result); }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IModel.js","sourceRoot":"","sources":["../../src/IModel.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAc,IAAI,EAAc,YAAY,EAAW,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACtJ,OAAO,EACE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAgB,SAAS,EAAkB,QAAQ,EAC9H,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,YAAY,EAAqB,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAsB,MAAM,sCAAsC,CAAC;AAEzF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAyM5C;;;;GAIG;AACH,MAAM,OAAO,YAAY;IACvB,wCAAwC;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uFAAuF;IACvF,IAAW,YAAY,KAAK,OAAO,SAAS,KAAK,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IAEtE;;OAEG;IACI,gBAAgB;QACrB,IAAI,SAAS,KAAK,IAAI,CAAC,aAAa;YAClC,MAAM,IAAI,WAAW,CAAC,gBAAgB,CAAC,aAAa,EAAE,0BAA0B,CAAC,CAAC;QACpF,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC;IAC3C,CAAC;IAED;;;;;OAKG;IACI,aAAa,CAAC,OAAe,EAAE,MAAgB,IAAa,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IAErI;;;;;;OAMG;IACI,aAAa,CAAC,IAAY,EAAE,MAAgB,IAAa,OAAO,aAAa,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,sBAAsB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAErJ;;;;;OAKG;IACI,6BAA6B,CAAC,OAAe,EAAE,MAAqB,IAAkB,OAAO,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhL;;;;;;OAMG;IACI,6BAA6B,CAAC,YAA0B,EAAE,MAAgB,IAAI,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport { assert, BeEvent, expectDefined, GeoServiceStatus, GuidString, Id64, Id64String, IModelStatus, Mutable, OpenMode } from \"@itwin/core-bentley\";\r\nimport {\r\n Angle, AxisIndex, AxisOrder, Constant, Geometry, Matrix3d, Point3d, Range3d, Range3dProps, Transform, TransformProps, Vector3d, XYAndZ, XYZProps,\r\n YawPitchRollAngles, YawPitchRollProps,\r\n} from \"@itwin/core-geometry\";\r\nimport { ChangesetIdWithIndex } from \"./ChangesetProps\";\r\nimport { Cartographic, CartographicProps } from \"./geometry/Cartographic\";\r\nimport { GeographicCRS, GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\r\nimport { AxisAlignedBox3d } from \"./geometry/Placement\";\r\nimport { IModelError } from \"./IModelError\";\r\nimport { ThumbnailProps } from \"./Thumbnail\";\r\n\r\n/** The properties to open a connection to an iModel for RPC operations.\r\n * @public\r\n */\r\nexport interface IModelRpcOpenProps {\r\n /** The iTwin in which the iModel exists - must be defined for briefcases that are synchronized with iModelHub. */\r\n readonly iTwinId?: GuidString;\r\n /** Guid of the iModel. */\r\n readonly iModelId?: GuidString;\r\n\r\n /** Id of the last Changeset that was applied to the iModel - must be defined for briefcases that are synchronized with iModelHub.\r\n * @note Changeset Ids are string hash values based on the content and parent.\r\n */\r\n readonly changeset?: ChangesetIdWithIndex;\r\n}\r\n\r\n/** The properties that identify an opened iModel for RPC operations.\r\n * @public\r\n */\r\nexport interface IModelRpcProps extends IModelRpcOpenProps {\r\n /** Unique key used for identifying the iModel between the frontend and the backend */\r\n readonly key: string;\r\n}\r\n\r\n/** Properties that position an iModel on the earth via [ECEF](https://en.wikipedia.org/wiki/ECEF) (Earth Centered Earth Fixed) coordinates\r\n * The origin is specified as an ECEF coordinate. The cartographicOrigin property contains the latitude, longitude and elevation above the WGS84 ellipsoid\r\n * of the origin property. This cartographicOrigin is offered as a convenient pre-calculated value representing the location of the ECEF origin.\r\n * The 3D coordinate system this class represents is positioned at specified origin and the axis positioned according to\r\n * the other properties.\r\n * If transform property is defined then it will not be computed from other properties.\r\n * If the xVector and yVector properties are defined (and transform is not defined) then they take precedence over the YawPitchRoll orientation property. The xVector and yVector\r\n * represent the direction and scale of the X and Y axes. The Z axis is always perpendicular (according to the right hand rule) to these X-Y axes.\r\n * The scaling in the Z direction is always unity. The scale of the X and Y axes is represented by the size of the vector length.\r\n * If the xVector and yVector are not present then the YawPitchRoll properties indicates the angles for all tree axes. Scaling in that case\r\n * is unity in all three directions.\r\n * Note that the present class is intended to represent geolocated 3D coordinate systems that are normally tangent to the WGS84 ellipsoid\r\n * possibly offset in altitude by the terrain elevation above the ellipsoid but other general 3D coordinate systems\r\n * can be defined.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface EcefLocationProps {\r\n /** The Origin of an iModel on the earth in ECEF coordinates */\r\n readonly origin: XYZProps;\r\n /** The [orientation](https://en.wikipedia.org/wiki/Geographic_coordinate_conversion) of an iModel on the earth. */\r\n readonly orientation: YawPitchRollProps;\r\n /** Optional position on the earth used to establish the ECEF coordinates. */\r\n readonly cartographicOrigin?: CartographicProps;\r\n /** Optional X column vector used with [[yVector]] to calculate potentially non-rigid transform if a projection is present. */\r\n readonly xVector?: XYZProps;\r\n /** Optional Y column vector used with [[xVector]] to calculate potentially non-rigid transform if a projection is present. */\r\n readonly yVector?: XYZProps;\r\n /** Optional potentially non-rigid transform defining the ECEF location.\r\n * @note If this property is supplied, the other properties are ignored.\r\n */\r\n readonly transform?: TransformProps;\r\n}\r\n\r\n/** Properties of the [Root Subject]($docs/bis/guide/references/glossary#subject-root).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface RootSubjectProps {\r\n /** The name of the root subject. */\r\n readonly name: string;\r\n /** Description of the root subject (optional). */\r\n readonly description?: string;\r\n}\r\n\r\n/** Properties of an iModel that are always held in memory whenever one is opened, both on the frontend and on the backend .\r\n * @public\r\n */\r\nexport interface IModelProps {\r\n /** The name and description of the root subject of this iModel */\r\n readonly rootSubject: RootSubjectProps;\r\n /** The volume of the entire project, in spatial coordinates */\r\n readonly projectExtents?: Range3dProps;\r\n /** An offset to be applied to all spatial coordinates. This is normally used to transform spatial coordinates into the Cartesian coordinate system of a Geographic Coordinate System. */\r\n readonly globalOrigin?: XYZProps;\r\n /** The location of the iModel in Earth Centered Earth Fixed coordinates. iModel units are always meters */\r\n readonly ecefLocation?: EcefLocationProps;\r\n /** The Geographic Coordinate Reference System indicating the projection and datum used. */\r\n readonly geographicCoordinateSystem?: GeographicCRSProps;\r\n /** The name of the iModel. */\r\n readonly name?: string;\r\n}\r\n\r\n/** The properties returned by the backend when creating a new [[IModelConnection]] from the frontend, either with Rpc or with Ipc.\r\n * These properties describe the iModel held on the backend for thew newly formed connection and are used to construct a new\r\n * [[IModelConnection]] instance on the frontend to access it.\r\n * @public\r\n */\r\nexport type IModelConnectionProps = IModelProps & IModelRpcProps;\r\n\r\n/** The properties that can be supplied when creating a *new* iModel.\r\n * @public\r\n */\r\nexport interface CreateIModelProps extends IModelProps {\r\n /** The GUID of new iModel. If not present, a GUID will be generated. */\r\n readonly guid?: GuidString;\r\n /** Client name for new iModel */\r\n readonly client?: string;\r\n /** Thumbnail for new iModel\r\n * @alpha\r\n */\r\n readonly thumbnail?: ThumbnailProps;\r\n}\r\n\r\n/**\r\n * Sqlite options.\r\n * @public\r\n */\r\nexport interface OpenSqliteArgs {\r\n /**\r\n * Specify timeout after which SQLite stop retrying to acquire lock to database file and throw SQLITE_BUSY error.\r\n * Timeout is specified in milliseconds.\r\n * For more information https://www.sqlite.org/c3ref/busy_timeout.html.\r\n * */\r\n readonly busyTimeout?: number;\r\n}\r\n\r\n/**\r\n * A key used to identify an opened [IModelDb]($backend) between the frontend and backend for Rpc and Ipc communications.\r\n * Keys must be unique - that is there can never be two IModelDbs opened with the same key at any given time.\r\n * If no key is supplied in a call to open an IModelDb, one is generated and returned.\r\n * It is only necessary to supply a key if you have some reason to assign a specific value to identify an IModelDb.\r\n * If you don't supply the key, you must use the returned value for Rpc and Ipc communications.\r\n * @public\r\n */\r\nexport interface OpenDbKey {\r\n readonly key?: string;\r\n}\r\n\r\n/** @beta TODO documentation */\r\nexport interface CloudContainerUri {\r\n readonly uriParams: string;\r\n}\r\n\r\n/** Options to open a [SnapshotDb]($backend).\r\n * @public\r\n */\r\nexport interface SnapshotOpenOptions extends OpenDbKey {\r\n /**\r\n * The \"base\" name that can be used for creating temporary files related to this Db.\r\n * The string should be a name related to the current Db filename using some known pattern so that all files named \"baseName*\" can be deleted externally during cleanup.\r\n * It must be the name of a file (that may or may not exist) in a writable directory.\r\n * If not present, the baseName will default to the database's file name (including the path).\r\n * @internal\r\n */\r\n readonly tempFileBase?: string;\r\n}\r\n\r\n/** Options to open a [StandaloneDb]($backend) via [StandaloneDb.openFile]($backend) from the backend,\r\n * or [BriefcaseConnection.openStandalone]($frontend) from the frontend.\r\n * @public\r\n */\r\nexport type StandaloneOpenOptions = OpenDbKey;\r\n\r\n/** Options that can be supplied when creating snapshot iModels.\r\n * @public\r\n */\r\nexport interface CreateSnapshotIModelProps {\r\n /** If true, then create SQLite views for Model, Element, ElementAspect, and Relationship classes.\r\n * These database views can often be useful for interoperability workflows.\r\n */\r\n readonly createClassViews?: boolean;\r\n}\r\n\r\n/** The options that can be specified when creating an *empty* snapshot iModel.\r\n * @see [SnapshotDb.createEmpty]($backend)\r\n * @public\r\n */\r\nexport type CreateEmptySnapshotIModelProps = CreateIModelProps & CreateSnapshotIModelProps;\r\n\r\n/** Options that can be supplied when creating standalone iModels.\r\n * @public\r\n */\r\nexport interface CreateStandaloneIModelProps {\r\n /** If present, file will allow local editing, but cannot be used to create changesets */\r\n readonly allowEdit?: string;\r\n}\r\n\r\n/** The options that can be specified when creating an *empty* standalone iModel.\r\n * @see [StandaloneDb.createEmpty]($backend)\r\n * @public\r\n */\r\nexport type CreateEmptyStandaloneIModelProps = CreateIModelProps & CreateStandaloneIModelProps;\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FilePropertyProps {\r\n readonly namespace: string;\r\n readonly name: string;\r\n id?: number | string;\r\n subId?: number | string;\r\n}\r\n\r\n/** The position and orientation of an iModel on the earth in [ECEF](https://en.wikipedia.org/wiki/ECEF) (Earth Centered Earth Fixed) coordinates\r\n * @note This is an immutable type - all of its properties are frozen.\r\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\r\n * @public\r\n */\r\nexport class EcefLocation implements EcefLocationProps {\r\n /** The origin of the ECEF transform. */\r\n public readonly origin: Point3d;\r\n /** The orientation of the ECEF transform */\r\n public readonly orientation: YawPitchRollAngles;\r\n /** Optional position on the earth used to establish the ECEF origin and orientation. */\r\n public readonly cartographicOrigin?: Cartographic;\r\n /** Optional X column vector used with [[yVector]] to calculate potentially non-rigid transform if a projection is present. */\r\n public readonly xVector?: Vector3d;\r\n /** Optional Y column vector used with [[xVector]] to calculate potentially non-rigid transform if a projection is present. */\r\n public readonly yVector?: Vector3d;\r\n /** The transform from iModel Spatial coordinates to ECEF from this EcefLocation */\r\n private readonly _transform: Transform = Transform.createIdentity();\r\n\r\n /** Get the transform from iModel Spatial coordinates to ECEF from this EcefLocation */\r\n public getTransform(): Transform { return this._transform; }\r\n\r\n /** Construct a new EcefLocation. Once constructed, it is frozen and cannot be modified. */\r\n constructor(props: EcefLocationProps) {\r\n this.origin = Point3d.fromJSON(props.origin).freeze();\r\n this.orientation = YawPitchRollAngles.fromJSON(props.orientation).freeze();\r\n if (props.cartographicOrigin)\r\n this.cartographicOrigin = Cartographic.fromRadians({ longitude: props.cartographicOrigin.longitude, latitude: props.cartographicOrigin.latitude, height: props.cartographicOrigin.height }).freeze();\r\n if (props.xVector && props.yVector) {\r\n this.xVector = Vector3d.fromJSON(props.xVector).freeze();\r\n this.yVector = Vector3d.fromJSON(props.yVector).freeze();\r\n }\r\n if (props.transform) {\r\n this._transform.setFromJSON(props.transform);\r\n this._transform.freeze();\r\n } else {\r\n let matrix;\r\n if (this.xVector && this.yVector) {\r\n const zVector = this.xVector.crossProduct(this.yVector);\r\n if (zVector.normalizeInPlace())\r\n matrix = Matrix3d.createColumns(this.xVector, this.yVector, zVector);\r\n }\r\n if (!matrix)\r\n matrix = this.orientation.toMatrix3d();\r\n\r\n this._transform = Transform.createOriginAndMatrix(this.origin, matrix);\r\n this._transform.freeze();\r\n }\r\n }\r\n\r\n /** Returns true if this EcefLocation is not located at the center of the Earth.\r\n * @alpha are locations very close to the center considered valid? What are the specific criteria?\r\n */\r\n public get isValid(): boolean {\r\n return !this.origin.isZero;\r\n }\r\n\r\n /** Construct ECEF Location from cartographic origin with optional known point and angle. */\r\n public static createFromCartographicOrigin(origin: Cartographic, point?: Point3d, angle?: Angle) {\r\n const ecefOrigin = origin.toEcef();\r\n const deltaRadians = 10 / Constant.earthRadiusWGS84.polar;\r\n const northCarto = Cartographic.fromRadians({ longitude: origin.longitude, latitude: origin.latitude + deltaRadians, height: origin.height });\r\n const eastCarto = Cartographic.fromRadians({ longitude: origin.longitude + deltaRadians, latitude: origin.latitude, height: origin.height });\r\n const ecefNorth = northCarto.toEcef();\r\n const ecefEast = eastCarto.toEcef();\r\n const xVector = expectDefined(Vector3d.createStartEnd(ecefOrigin, ecefEast).normalize());\r\n const yVector = expectDefined(Vector3d.createStartEnd(ecefOrigin, ecefNorth).normalize());\r\n const matrix = expectDefined(Matrix3d.createRigidFromColumns(xVector, yVector, AxisOrder.XYZ));\r\n if (angle !== undefined) {\r\n const north = Matrix3d.createRotationAroundAxisIndex(AxisIndex.Z, angle);\r\n matrix.multiplyMatrixMatrix(north, matrix);\r\n }\r\n if (point !== undefined) {\r\n const delta = matrix.multiplyVector(Vector3d.create(-point.x, -point.y, -point.z));\r\n ecefOrigin.addInPlace(delta);\r\n }\r\n\r\n return new EcefLocation({ origin: ecefOrigin, orientation: expectDefined(YawPitchRollAngles.createFromMatrix3d(matrix)), cartographicOrigin: origin });\r\n }\r\n\r\n /** Construct ECEF Location from transform with optional position on the earth used to establish the ECEF origin and orientation. */\r\n public static createFromTransform(transform: Transform): EcefLocation {\r\n const ecefOrigin = transform.getOrigin();\r\n const angleFromInput = YawPitchRollAngles.createDegrees(0, 0, 0);\r\n const locationOrientationFromInputT = YawPitchRollAngles.createFromMatrix3d(transform.getMatrix(), angleFromInput);\r\n const transformProps = transform.toJSON();\r\n\r\n return new EcefLocation({ origin: ecefOrigin, orientation: locationOrientationFromInputT ?? angleFromInput, transform: transformProps });\r\n }\r\n\r\n /** Get the location center of the earth in the iModel coordinate system. */\r\n public get earthCenter(): Point3d {\r\n const matrix = this.orientation.toMatrix3d();\r\n return Point3d.createFrom(matrix.multiplyTransposeXYZ(-this.origin.x, -this.origin.y, -this.origin.z));\r\n }\r\n\r\n /** Return true if this location is equivalent to another location within a small tolerance. */\r\n public isAlmostEqual(other: EcefLocation): boolean {\r\n if (!this.origin.isAlmostEqual(other.origin) || !this.orientation.isAlmostEqual(other.orientation))\r\n return false;\r\n\r\n if ((this.xVector === undefined) !== (other.xVector === undefined) || (this.yVector === undefined) !== (other.yVector === undefined))\r\n return false;\r\n\r\n if (this.xVector !== undefined && other.xVector !== undefined && !this.xVector.isAlmostEqual(other.xVector))\r\n return false;\r\n\r\n if (this.yVector !== undefined && other.yVector !== undefined && !this.yVector.isAlmostEqual(other.yVector))\r\n return false;\r\n\r\n if (!this.getTransform().isAlmostEqual(other.getTransform()))\r\n return false;\r\n\r\n const thisCarto = this.cartographicOrigin;\r\n const otherCarto = other.cartographicOrigin;\r\n if (undefined === thisCarto || undefined === otherCarto)\r\n return undefined === thisCarto && undefined === otherCarto;\r\n\r\n return thisCarto.equalsEpsilon(otherCarto, Geometry.smallMetricDistance);\r\n }\r\n\r\n public toJSON(): EcefLocationProps {\r\n const props: Mutable<EcefLocationProps> = {\r\n origin: this.origin.toJSON(),\r\n orientation: this.orientation.toJSON(),\r\n transform: this.getTransform().toJSON(),\r\n };\r\n\r\n if (this.cartographicOrigin)\r\n props.cartographicOrigin = this.cartographicOrigin.toJSON();\r\n\r\n if (this.xVector)\r\n props.xVector = this.xVector.toJSON();\r\n\r\n if (this.yVector)\r\n props.yVector = this.yVector.toJSON();\r\n\r\n return props;\r\n }\r\n}\r\n\r\n/** Represents an iModel in JavaScript.\r\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\r\n * @public\r\n */\r\nexport abstract class IModel implements IModelProps {\r\n private _projectExtents?: AxisAlignedBox3d;\r\n private _name?: string;\r\n private _rootSubject?: RootSubjectProps;\r\n private _globalOrigin?: Point3d;\r\n private _ecefLocation?: EcefLocation;\r\n private _geographicCoordinateSystem?: GeographicCRS;\r\n private _iModelId?: GuidString;\r\n private _changeset: ChangesetIdWithIndex;\r\n\r\n /** The Id of the repository model. */\r\n public static readonly repositoryModelId: Id64String = \"0x1\";\r\n /** The Id of the root subject element. */\r\n public static readonly rootSubjectId: Id64String = \"0x1\";\r\n /** The Id of the dictionary model. */\r\n public static readonly dictionaryId: Id64String = \"0x10\";\r\n\r\n /** Event raised after [[name]] changes. */\r\n public readonly onNameChanged = new BeEvent<(previousName: string) => void>();\r\n /** Event raised after [[rootSubject]] changes. */\r\n public readonly onRootSubjectChanged = new BeEvent<(previousSubject: RootSubjectProps) => void>();\r\n /** Event raised after [[projectExtents]] changes. */\r\n public readonly onProjectExtentsChanged = new BeEvent<(previousExtents: AxisAlignedBox3d) => void>();\r\n /** Event raised after [[globalOrigin]] changes. */\r\n public readonly onGlobalOriginChanged = new BeEvent<(previousOrigin: Point3d) => void>();\r\n /** Event raised after [[ecefLocation]] changes. */\r\n public readonly onEcefLocationChanged = new BeEvent<(previousLocation: EcefLocation | undefined) => void>();\r\n /** Event raised after [[geographicCoordinateSystem]] changes. */\r\n public readonly onGeographicCoordinateSystemChanged = new BeEvent<(previousGCS: GeographicCRS | undefined) => void>();\r\n /** Event raised after [[changeset]] changes. */\r\n public readonly onChangesetChanged = new BeEvent<(previousChangeset: ChangesetIdWithIndex) => void>();\r\n\r\n /** Name of the iModel */\r\n public get name(): string {\r\n assert(this._name !== undefined);\r\n return this._name;\r\n }\r\n public set name(name: string) {\r\n if (name !== this._name) {\r\n const old = this._name;\r\n this._name = name;\r\n if (undefined !== old)\r\n this.onNameChanged.raiseEvent(old);\r\n }\r\n }\r\n\r\n /** The name and description of the root subject of this iModel */\r\n public get rootSubject(): RootSubjectProps {\r\n assert(this._rootSubject !== undefined);\r\n return this._rootSubject;\r\n }\r\n public set rootSubject(subject: RootSubjectProps) {\r\n if (undefined === this._rootSubject || this._rootSubject.name !== subject.name || this._rootSubject.description !== subject.description) {\r\n const old = this._rootSubject;\r\n this._rootSubject = subject;\r\n if (old)\r\n this.onRootSubjectChanged.raiseEvent(old);\r\n }\r\n }\r\n\r\n /** Returns `true` if this is a snapshot iModel. */\r\n public abstract get isSnapshot(): boolean;\r\n /** Returns `true` if this is a briefcase copy of an iModel that is synchronized with iModelHub. */\r\n public abstract get isBriefcase(): boolean;\r\n\r\n public abstract get isOpen(): boolean;\r\n\r\n /**\r\n * The volume, in spatial coordinates, inside which the entire project is contained.\r\n * @note The object returned from this method is frozen. You *must* make a copy before you do anything that might attempt to modify it.\r\n */\r\n public get projectExtents() {\r\n assert(undefined !== this._projectExtents);\r\n return this._projectExtents;\r\n }\r\n public set projectExtents(extents: AxisAlignedBox3d) {\r\n // Don't allow any axis of the project extents to be less than 1 meter.\r\n const projectExtents = extents.clone();\r\n projectExtents.ensureMinLengths(1.0);\r\n if (!this._projectExtents || !this._projectExtents.isAlmostEqual(projectExtents)) {\r\n const old = this._projectExtents;\r\n projectExtents.freeze();\r\n this._projectExtents = projectExtents;\r\n if (old)\r\n this.onProjectExtentsChanged.raiseEvent(old);\r\n }\r\n }\r\n\r\n /** An offset to be applied to all spatial coordinates. */\r\n public get globalOrigin(): Point3d {\r\n assert(this._globalOrigin !== undefined);\r\n return this._globalOrigin;\r\n }\r\n public set globalOrigin(org: Point3d) {\r\n if (!this._globalOrigin || !this._globalOrigin.isAlmostEqual(org)) {\r\n const old = this._globalOrigin;\r\n org.freeze();\r\n this._globalOrigin = org;\r\n if (old)\r\n this.onGlobalOriginChanged.raiseEvent(old);\r\n }\r\n }\r\n\r\n /** The [EcefLocation]($docs/learning/glossary#ecefLocation) of the iModel in Earth Centered Earth Fixed coordinates.\r\n * If the iModel property geographicCoordinateSystem is not defined then the ecefLocation provides a geolocation by defining a\r\n * 3D coordinate system relative to the Earth model WGS84. Refer to additional documentation for details. If the geographicCoordinateSystem\r\n * property is defined then the ecefLocation must be used with care. When the geographicCoordinateSystem is defined it indicates the\r\n * iModel cartesian space is the result of a cartographic projection. This implies a flattening of the Earth surface process that\r\n * results in scale, angular or area distortion. The ecefLocation is then an approximation calculated at the center of the project extent.\r\n * If the project is more than 2 kilometer in size, the ecefLocation may represent a poor approximation of the effective\r\n * cartographic projection used and a linear transformation should then be calculated at the exact origin of the data\r\n * it must position.\r\n * @see [GeoLocation of iModels]($docs/learning/GeoLocation.md)\r\n */\r\n public get ecefLocation(): EcefLocation | undefined {\r\n return this._ecefLocation;\r\n }\r\n public set ecefLocation(ecefLocation: EcefLocation | undefined) {\r\n const old = this._ecefLocation;\r\n if (!old && !ecefLocation)\r\n return;\r\n else if (old && ecefLocation && old.isAlmostEqual(ecefLocation))\r\n return;\r\n\r\n this._ecefLocation = ecefLocation;\r\n this.onEcefLocationChanged.raiseEvent(old);\r\n }\r\n\r\n /** Set the [EcefLocation]($docs/learning/glossary#ecefLocation) for this iModel. */\r\n public setEcefLocation(ecef: EcefLocationProps): void {\r\n this.ecefLocation = new EcefLocation(ecef);\r\n }\r\n\r\n /** The geographic coordinate reference system of the iModel. */\r\n public get geographicCoordinateSystem(): GeographicCRS | undefined {\r\n return this._geographicCoordinateSystem;\r\n }\r\n public set geographicCoordinateSystem(geoCRS: GeographicCRS | undefined) {\r\n const old = this._geographicCoordinateSystem;\r\n if (!old && !geoCRS)\r\n return;\r\n else if (old && geoCRS && old.equals(geoCRS))\r\n return;\r\n\r\n this._geographicCoordinateSystem = geoCRS;\r\n this.onGeographicCoordinateSystemChanged.raiseEvent(old);\r\n }\r\n\r\n /** Sets the geographic coordinate reference system from GeographicCRSProps. */\r\n public setGeographicCoordinateSystem(geoCRS: GeographicCRSProps) {\r\n this.geographicCoordinateSystem = new GeographicCRS(geoCRS);\r\n }\r\n\r\n /** @internal */\r\n public getConnectionProps(): IModelConnectionProps {\r\n return {\r\n name: this.name,\r\n rootSubject: this.rootSubject,\r\n projectExtents: this.projectExtents.toJSON(),\r\n globalOrigin: this.globalOrigin.toJSON(),\r\n ecefLocation: this.ecefLocation,\r\n geographicCoordinateSystem: this.geographicCoordinateSystem?.toJSON(),\r\n ...this._getRpcProps(),\r\n };\r\n }\r\n\r\n /** Convert this iModel to a JSON representation. */\r\n public toJSON(): IModelConnectionProps {\r\n return this.getConnectionProps();\r\n }\r\n\r\n /** A key used to identify this iModel in RPC calls from frontend to backend.\r\n * @internal\r\n */\r\n protected _fileKey: string;\r\n /** Get the key that was used to open this iModel. This is the value used for Rpc and Ipc communications. */\r\n public get key(): string { return this._fileKey; }\r\n\r\n /** @internal */\r\n protected _iTwinId?: GuidString;\r\n /** The Guid that identifies the iTwin that owns this iModel. */\r\n public get iTwinId(): GuidString | undefined { return this._iTwinId; }\r\n\r\n /** The Guid that identifies this iModel. */\r\n public get iModelId(): GuidString | undefined { return this._iModelId; }\r\n\r\n /** @public */\r\n public get changeset(): ChangesetIdWithIndex {\r\n return { ...this._changeset };\r\n }\r\n public set changeset(changeset: ChangesetIdWithIndex) {\r\n const prev = this._changeset;\r\n if (prev.id !== changeset.id || prev.index !== changeset.index) {\r\n this._changeset = { id: changeset.id, index: changeset.index };\r\n this.onChangesetChanged.raiseEvent(prev);\r\n }\r\n }\r\n\r\n protected _openMode = OpenMode.Readonly;\r\n /** The [[OpenMode]] used for this IModel. */\r\n public get openMode(): OpenMode { return this._openMode; }\r\n\r\n /** Return a token for RPC operations.\r\n * @throws IModelError if the iModel is not open.\r\n */\r\n public getRpcProps(): IModelRpcProps {\r\n if (!this.isOpen)\r\n throw new IModelError(IModelStatus.BadRequest, \"IModel is not open for rpc\");\r\n\r\n return this._getRpcProps();\r\n }\r\n\r\n /** Returns the iModel's RPC properties.\r\n * @note It is an error to attempt to use these properties as a token for RPC operations if the iModel is not open.\r\n * @internal\r\n */\r\n protected _getRpcProps(): IModelRpcProps {\r\n return {\r\n key: this._fileKey,\r\n iTwinId: this.iTwinId,\r\n iModelId: this.iModelId,\r\n changeset: this.changeset,\r\n };\r\n }\r\n\r\n /** @internal */\r\n protected constructor(tokenProps?: IModelRpcProps) {\r\n this._changeset = tokenProps?.changeset ?? { id: \"\", index: 0 };\r\n this._fileKey = \"\";\r\n if (tokenProps) {\r\n this._fileKey = tokenProps.key;\r\n this._iTwinId = tokenProps.iTwinId;\r\n this._iModelId = tokenProps.iModelId;\r\n }\r\n }\r\n\r\n /** @internal */\r\n protected initialize(name: string, props: IModelProps) {\r\n this.name = name;\r\n this.rootSubject = props.rootSubject;\r\n this.projectExtents = Range3d.fromJSON(props.projectExtents);\r\n this.globalOrigin = Point3d.fromJSON(props.globalOrigin);\r\n\r\n const ecefLocation = props.ecefLocation ? new EcefLocation(props.ecefLocation) : undefined;\r\n this.ecefLocation = ecefLocation?.isValid ? ecefLocation : undefined;\r\n\r\n this.geographicCoordinateSystem = props.geographicCoordinateSystem ? new GeographicCRS(props.geographicCoordinateSystem) : undefined;\r\n }\r\n\r\n /** Get the default subCategoryId for the supplied categoryId */\r\n public static getDefaultSubCategoryId(categoryId: Id64String): Id64String {\r\n return Id64.isValid(categoryId) ? Id64.fromLocalAndBriefcaseIds(Id64.getLocalId(categoryId) + 1, Id64.getBriefcaseId(categoryId)) : Id64.invalid;\r\n }\r\n\r\n /** True if this iModel has an [EcefLocation]($docs/learning/glossary#ecefLocation). */\r\n public get isGeoLocated() { return undefined !== this._ecefLocation; }\r\n\r\n /** Get the Transform from this iModel's Spatial coordinates to ECEF coordinates using its [[IModel.ecefLocation]].\r\n * @throws IModelError if [[isGeoLocated]] is false.\r\n */\r\n public getEcefTransform(): Transform {\r\n if (undefined === this._ecefLocation)\r\n throw new IModelError(GeoServiceStatus.NoGeoLocation, \"iModel is not GeoLocated\");\r\n return this._ecefLocation.getTransform();\r\n }\r\n\r\n /** Convert a point in this iModel's Spatial coordinates to an ECEF point using its [[IModel.ecefLocation]].\r\n * @param spatial A point in the iModel's spatial coordinates\r\n * @param result If defined, use this for output\r\n * @returns A Point3d in ECEF coordinates\r\n * @throws IModelError if [[isGeoLocated]] is false.\r\n */\r\n public spatialToEcef(spatial: XYAndZ, result?: Point3d): Point3d { return this.getEcefTransform().multiplyPoint3d(spatial, result); }\r\n\r\n /** Convert a point in ECEF coordinates to a point in this iModel's Spatial coordinates using its [[ecefLocation]].\r\n * @param ecef A point in ECEF coordinates\r\n * @param result If defined, use this for output\r\n * @returns A Point3d in this iModel's spatial coordinates\r\n * @throws IModelError if [[isGeoLocated]] is false.\r\n * @note The resultant point will only be meaningful if the ECEF coordinate is close on the earth to the iModel.\r\n */\r\n public ecefToSpatial(ecef: XYAndZ, result?: Point3d): Point3d { return expectDefined(this.getEcefTransform().multiplyInversePoint3d(ecef, result)); }\r\n\r\n /** Convert a point in this iModel's Spatial coordinates to a [[Cartographic]] using its [[IModel.ecefLocation]].\r\n * @param spatial A point in the iModel's spatial coordinates\r\n * @param result If defined, use this for output\r\n * @returns A Cartographic location\r\n * @throws IModelError if [[isGeoLocated]] is false.\r\n */\r\n public spatialToCartographicFromEcef(spatial: XYAndZ, result?: Cartographic): Cartographic { return expectDefined(Cartographic.fromEcef(this.spatialToEcef(spatial), result)); }\r\n\r\n /** Convert a [[Cartographic]] to a point in this iModel's Spatial coordinates using its [[IModel.ecefLocation]].\r\n * @param cartographic A cartographic location\r\n * @param result If defined, use this for output\r\n * @returns A point in this iModel's spatial coordinates\r\n * @throws IModelError if [[isGeoLocated]] is false.\r\n * @note The resultant point will only be meaningful if the ECEF coordinate is close on the earth to the iModel.\r\n */\r\n public cartographicToSpatialFromEcef(cartographic: Cartographic, result?: Point3d) { return this.ecefToSpatial(cartographic.toEcef(result), result); }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelError.js","sourceRoot":"","sources":["../../src/IMod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AC,CAAC;QAC3C,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,cAAc;AACd,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C,YAAmB,WAAmB,EAAE,IAAY,EAAE,OAAe,EAAE,WAA6B;QAClG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;QACE,KAAK,CAAC,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAC9C,CAAC;CACF","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 iModels\n */\n\nimport {\n BentleyError, BentleyStatus, BriefcaseStatus, ChangeSetStatus, DbResult, IModelHubStatus, IModelStatus, LegacyITwinErrorWithNumber, LoggingMetaData,\n} from \"@itwin/core-bentley\";\n\n/** Numeric values for common errors produced by iTwin.js APIs, typically provided by [[IModelError]].\n * The values within each of these `enum`s are guaranteed not to conflict with one another.\n * @public\n */\nexport type IModelErrorNumber = IModelStatus | DbResult | BentleyStatus | BriefcaseStatus | ChangeSetStatus;\n\n/** The error type thrown by this module.\n * @see [[ITwinError]]\n * @see [[IModelErrorNumber]] for commonly-used error codes.\n * @public\n */\nexport class IModelError extends BentleyError {\n public constructor(errorNumber: IModelErrorNumber | number, message: string, getMetaData?: LoggingMetaData) {\n super(errorNumber, message, getMetaData);\n }\n}\n\n/** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).\n * @public\n */\nexport enum LockState {\n /** The element is not locked */\n None = 0,\n /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */\n Shared = 1,\n /** A Lock that permits modifications to an element and blocks other users from making modifications to it.\n * Holding an exclusive lock on an \"owner\" (a model or a parent element), implicitly exclusively locks all its members.\n */\n Exclusive = 2,\n}\n\n/** Detailed information about a particular object Lock that is causing the Lock update conflict.\n * An example of a lock update conflict would be attempting to use [LockControl.acquireLocks]($backend) on an object that is already locked by another Briefcase.\n * @public\n*/\nexport interface ConflictingLock {\n /** Id of the object that is causing conflict. */\n objectId: string;\n /**\n * The level of conflicting lock. Possible values are {@link LockState.Shared}, {@link LockState.Exclusive}.\n * See {@link LockState}.\n */\n state: LockState;\n /** An array of Briefcase ids that hold this lock. */\n briefcaseIds: number[];\n}\n\n/**\n * Interface that describes the contents of `ConflictingLocksError` without relying on that class, since\n * the exception may be marshalled across process boundaries and the class will not survive.\n * @see ConflictingLocksError.isError\n * @beta\n */\nexport interface ConflictingLocks extends LegacyITwinErrorWithNumber {\n conflictingLocks?: ConflictingLock[];\n}\n\n/**\n * An error raised when there is a lock conflict detected.\n * Typically this error would be thrown by [LockControl.acquireLocks]($backend) when you are requesting a lock on an element that is already held by another briefcase.\n * @public\n*/\nexport class ConflictingLocksError extends IModelError { // implements ConflictingLocks, but that's @beta\n public conflictingLocks?: ConflictingLock[];\n\n /** @beta */\n public static override isError<T extends ConflictingLocks>(error: any): error is T {\n return BentleyError.isError(error, IModelHubStatus.LockOwnedByAnotherBriefcase);\n }\n constructor(message: string, getMetaData?: LoggingMetaData, conflictingLocks?: ConflictingLock[]) {\n super(IModelHubStatus.LockOwnedByAnotherBriefcase, message, getMetaData);\n this.conflictingLocks = conflictingLocks;\n }\n}\n\n/** @public */\nexport class ServerError extends IModelError {\n public constructor(errorNumber: number, message: string) {\n super(errorNumber, message);\n this.name = `Server error (${errorNumber})`;\n }\n}\n\n/** @public */\nexport class ServerTimeoutError extends ServerError {\n public constructor(message: string) {\n super(IModelStatus.ServerTimeout, message);\n this.name = \"Server timeout error\";\n }\n}\n\n/** @public */\nexport class BackendError extends IModelError {\n public constructor(errorNumber: number, name: string, message: string, getMetaData?: LoggingMetaData) {\n super(errorNumber, message, getMetaData);\n this.name = name;\n }\n}\n\n/** Intended for API \"no content\" semantics where the error case should not trigger application failure monitoring systems.\n * @public\n */\nexport class NoContentError extends IModelError {\n public constructor() {\n super(IModelStatus.NoContent, \"No Content\");\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IModelError.js","sourceRoot":"","sources":["../../src/IModelError.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EACL,YAAY,EAA6D,eAAe,EAAE,YAAY,GACvG,MAAM,qBAAqB,CAAC;AAQ7B;;;;GAIG;AACH,MAAM,OAAO,WAAY,SAAQ,YAAY;IAC3C,YAAmB,WAAuC,EAAE,OAAe,EAAE,WAA6B;QACxG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3C,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,SASX;AATD,WAAY,SAAS;IACnB,gCAAgC;IAChC,yCAAQ,CAAA;IACR,mJAAmJ;IACnJ,6CAAU,CAAA;IACV;;OAEG;IACH,mDAAa,CAAA;AACf,CAAC,EATW,SAAS,KAAT,SAAS,QASpB;AA4BD;;;;EAIE;AACF,MAAM,OAAO,qBAAsB,SAAQ,WAAW;IAC7C,gBAAgB,CAAqB;IAE5C,YAAY;IACL,MAAM,CAAU,OAAO,CAA6B,KAAU;QACnE,OAAO,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,eAAe,CAAC,2BAA2B,CAAC,CAAC;IAClF,CAAC;IACD,YAAY,OAAe,EAAE,WAA6B,EAAE,gBAAoC;QAC9F,KAAK,CAAC,eAAe,CAAC,2BAA2B,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACzE,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAC3C,CAAC;CACF;AAED,cAAc;AACd,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C,YAAmB,WAAmB,EAAE,OAAe;QACrD,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,iBAAiB,WAAW,GAAG,CAAC;IAC9C,CAAC;CACF;AAED,cAAc;AACd,MAAM,OAAO,kBAAmB,SAAQ,WAAW;IACjD,YAAmB,OAAe;QAChC,KAAK,CAAC,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAC3C,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,cAAc;AACd,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C,YAAmB,WAAmB,EAAE,IAAY,EAAE,OAAe,EAAE,WAA6B;QAClG,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;QACE,KAAK,CAAC,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IAC9C,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport {\r\n BentleyError, BentleyStatus, BriefcaseStatus, ChangeSetStatus, DbResult, IModelHubStatus, IModelStatus, LegacyITwinErrorWithNumber, LoggingMetaData,\r\n} from \"@itwin/core-bentley\";\r\n\r\n/** Numeric values for common errors produced by iTwin.js APIs, typically provided by [[IModelError]].\r\n * The values within each of these `enum`s are guaranteed not to conflict with one another.\r\n * @public\r\n */\r\nexport type IModelErrorNumber = IModelStatus | DbResult | BentleyStatus | BriefcaseStatus | ChangeSetStatus;\r\n\r\n/** The error type thrown by this module.\r\n * @see [[ITwinError]]\r\n * @see [[IModelErrorNumber]] for commonly-used error codes.\r\n * @public\r\n */\r\nexport class IModelError extends BentleyError {\r\n public constructor(errorNumber: IModelErrorNumber | number, message: string, getMetaData?: LoggingMetaData) {\r\n super(errorNumber, message, getMetaData);\r\n }\r\n}\r\n\r\n/** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).\r\n * @public\r\n */\r\nexport enum LockState {\r\n /** The element is not locked */\r\n None = 0,\r\n /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */\r\n Shared = 1,\r\n /** A Lock that permits modifications to an element and blocks other users from making modifications to it.\r\n * Holding an exclusive lock on an \"owner\" (a model or a parent element), implicitly exclusively locks all its members.\r\n */\r\n Exclusive = 2,\r\n}\r\n\r\n/** Detailed information about a particular object Lock that is causing the Lock update conflict.\r\n * An example of a lock update conflict would be attempting to use [LockControl.acquireLocks]($backend) on an object that is already locked by another Briefcase.\r\n * @public\r\n*/\r\nexport interface ConflictingLock {\r\n /** Id of the object that is causing conflict. */\r\n objectId: string;\r\n /**\r\n * The level of conflicting lock. Possible values are {@link LockState.Shared}, {@link LockState.Exclusive}.\r\n * See {@link LockState}.\r\n */\r\n state: LockState;\r\n /** An array of Briefcase ids that hold this lock. */\r\n briefcaseIds: number[];\r\n}\r\n\r\n/**\r\n * Interface that describes the contents of `ConflictingLocksError` without relying on that class, since\r\n * the exception may be marshalled across process boundaries and the class will not survive.\r\n * @see ConflictingLocksError.isError\r\n * @beta\r\n */\r\nexport interface ConflictingLocks extends LegacyITwinErrorWithNumber {\r\n conflictingLocks?: ConflictingLock[];\r\n}\r\n\r\n/**\r\n * An error raised when there is a lock conflict detected.\r\n * Typically this error would be thrown by [LockControl.acquireLocks]($backend) when you are requesting a lock on an element that is already held by another briefcase.\r\n * @public\r\n*/\r\nexport class ConflictingLocksError extends IModelError { // implements ConflictingLocks, but that's @beta\r\n public conflictingLocks?: ConflictingLock[];\r\n\r\n /** @beta */\r\n public static override isError<T extends ConflictingLocks>(error: any): error is T {\r\n return BentleyError.isError(error, IModelHubStatus.LockOwnedByAnotherBriefcase);\r\n }\r\n constructor(message: string, getMetaData?: LoggingMetaData, conflictingLocks?: ConflictingLock[]) {\r\n super(IModelHubStatus.LockOwnedByAnotherBriefcase, message, getMetaData);\r\n this.conflictingLocks = conflictingLocks;\r\n }\r\n}\r\n\r\n/** @public */\r\nexport class ServerError extends IModelError {\r\n public constructor(errorNumber: number, message: string) {\r\n super(errorNumber, message);\r\n this.name = `Server error (${errorNumber})`;\r\n }\r\n}\r\n\r\n/** @public */\r\nexport class ServerTimeoutError extends ServerError {\r\n public constructor(message: string) {\r\n super(IModelStatus.ServerTimeout, message);\r\n this.name = \"Server timeout error\";\r\n }\r\n}\r\n\r\n/** @public */\r\nexport class BackendError extends IModelError {\r\n public constructor(errorNumber: number, name: string, message: string, getMetaData?: LoggingMetaData) {\r\n super(errorNumber, message, getMetaData);\r\n this.name = name;\r\n }\r\n}\r\n\r\n/** Intended for API \"no content\" semantics where the error case should not trigger application failure monitoring systems.\r\n * @public\r\n */\r\nexport class NoContentError extends IModelError {\r\n public constructor() {\r\n super(IModelStatus.NoContent, \"No Content\");\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelVersion.js","sourceRoot":"","sources":["../../src/IModelVersion.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAaH;;GAEG;AACH,MAAM,OAAO,aAAa;IAChB,MAAM,CAAW;IACjB,OAAO,CAAW;IAClB,iBAAiB,CAAU;IAC3B,YAAY,CAAU;IAE9B,gBAAwB,CAAC;IAEzB,gDAAgD;IACzC,MAAM,CAAC,KAAK;QACjB,MAAM,OAAO,GAAG,IAAI,aAAa,EAAE,CAAC;QACpC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;QACtB,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,kDAAkD;IAC3C,MAAM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AAG,IAAI,CAAC,MAAM,CAAC;QAC9B,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC;QACxC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,uDAAuD;IACvD,IAAW,OAAO,KAAc,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAEvD,wDAAwD;IACxD,IAAW,QAAQ,KAAc,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAEzD;;;;;OAKG;IACI,gBAAgB,KAA8B,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAErF,sFAAsF;IAC/E,OAAO,KAAyB,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;CACnE","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 iModels\n */\n\nimport { ChangesetId } from \"./ChangesetProps\";\n\n/** Properties for IModelVersion\n * @public\n */\nexport type IModelVersionProps =\n { first: true, latest?: never, afterChangeSetId?: never, versionName?: never } |\n { latest: true, first?: never, afterChangeSetId?: never, versionName?: never } |\n { afterChangeSetId: string, first?: never, latest?: never, versionName?: never } |\n { versionName: string, first?: never, latest?: never, afterChangeSetId?: never };\n\n/** Option to specify the version of the iModel to be acquired and used\n * @public\n */\nexport class IModelVersion {\n private _first?: boolean;\n private _latest?: boolean;\n private _afterChangeSetId?: string;\n private _versionName?: string;\n\n private constructor() { }\n\n /** Describes the first version of the iModel */\n public static first(): IModelVersion {\n const version = new IModelVersion();\n version._first = true;\n return version;\n }\n\n /** Describes the latest version of the iModel */\n public static latest(): IModelVersion {\n const version = new IModelVersion();\n version._latest = true;\n return version;\n }\n\n /** Describes a version of the iModel by the last change set that needs\n * to be applied or merged to the iModel.\n * Note that all ChangeSets up to and and including the specified ChangeSet\n * needs to be applied.\n * If the changesetId is an empty string, it is assumed to be the first version\n * before any change sets have been applied.\n */\n public static asOfChangeSet(changesetId: string): IModelVersion {\n const version = new IModelVersion();\n\n if (changesetId === \"\") {\n version._first = true;\n return version;\n }\n\n version._afterChangeSetId = changesetId;\n return version;\n }\n\n /** Describes a version of the iModel with the specified version name */\n public static named(versionName: string): IModelVersion {\n const version = new IModelVersion();\n version._versionName = versionName;\n return version;\n }\n\n public toJSON(): IModelVersionProps {\n return this._versionName ? { versionName: this._versionName } :\n this._afterChangeSetId ? { afterChangeSetId: this._afterChangeSetId } :\n this._first ? { first: this._first } :\n { latest: true };\n }\n\n /** Creates a version from an IModelVersionProps */\n public static fromJSON(json: IModelVersionProps): IModelVersion {\n const version = new IModelVersion();\n version._first = json.first;\n version._afterChangeSetId = json.afterChangeSetId;\n version._latest = json.latest;\n version._versionName = json.versionName;\n return version;\n }\n\n /** Returns true if this describes the first version */\n public get isFirst(): boolean { return !!this._first; }\n\n /** Returns true if this describes the latest version */\n public get isLatest(): boolean { return !!this._latest; }\n\n /** Returns the last change set id to be applied to the iModel\n * to get to this specified version. @see asOfChangeSet().\n * Note that this method does not attempt to resolve the change set\n * if this describes the first version, last version, named version, etc.\n * @see evaluateChangeSet() for those use cases.\n */\n public getAsOfChangeSet(): ChangesetId | undefined { return this._afterChangeSetId; }\n\n /** Returns the name of the version if this describes a named version. @see named() */\n public getName(): string | undefined { return this._versionName; }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IModelVersion.js","sourceRoot":"","sources":["../../src/IModelVersion.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAaH;;GAEG;AACH,MAAM,OAAO,aAAa;IAChB,MAAM,CAAW;IACjB,OAAO,CAAW;IAClB,iBAAiB,CAAU;IAC3B,YAAY,CAAU;IAE9B,gBAAwB,CAAC;IAEzB,gDAAgD;IACzC,MAAM,CAAC,KAAK;QACjB,MAAM,OAAO,GAAG,IAAI,aAAa,EAAE,CAAC;QACpC,OA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AK,CAAC;QAC5B,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAClD,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC9B,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC;QACxC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,uDAAuD;IACvD,IAAW,OAAO,KAAc,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAEvD,wDAAwD;IACxD,IAAW,QAAQ,KAAc,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAEzD;;;;;OAKG;IACI,gBAAgB,KAA8B,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAErF,sFAAsF;IAC/E,OAAO,KAAyB,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;CACnE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport { ChangesetId } from \"./ChangesetProps\";\r\n\r\n/** Properties for IModelVersion\r\n * @public\r\n */\r\nexport type IModelVersionProps =\r\n { first: true, latest?: never, afterChangeSetId?: never, versionName?: never } |\r\n { latest: true, first?: never, afterChangeSetId?: never, versionName?: never } |\r\n { afterChangeSetId: string, first?: never, latest?: never, versionName?: never } |\r\n { versionName: string, first?: never, latest?: never, afterChangeSetId?: never };\r\n\r\n/** Option to specify the version of the iModel to be acquired and used\r\n * @public\r\n */\r\nexport class IModelVersion {\r\n private _first?: boolean;\r\n private _latest?: boolean;\r\n private _afterChangeSetId?: string;\r\n private _versionName?: string;\r\n\r\n private constructor() { }\r\n\r\n /** Describes the first version of the iModel */\r\n public static first(): IModelVersion {\r\n const version = new IModelVersion();\r\n version._first = true;\r\n return version;\r\n }\r\n\r\n /** Describes the latest version of the iModel */\r\n public static latest(): IModelVersion {\r\n const version = new IModelVersion();\r\n version._latest = true;\r\n return version;\r\n }\r\n\r\n /** Describes a version of the iModel by the last change set that needs\r\n * to be applied or merged to the iModel.\r\n * Note that all ChangeSets up to and and including the specified ChangeSet\r\n * needs to be applied.\r\n * If the changesetId is an empty string, it is assumed to be the first version\r\n * before any change sets have been applied.\r\n */\r\n public static asOfChangeSet(changesetId: string): IModelVersion {\r\n const version = new IModelVersion();\r\n\r\n if (changesetId === \"\") {\r\n version._first = true;\r\n return version;\r\n }\r\n\r\n version._afterChangeSetId = changesetId;\r\n return version;\r\n }\r\n\r\n /** Describes a version of the iModel with the specified version name */\r\n public static named(versionName: string): IModelVersion {\r\n const version = new IModelVersion();\r\n version._versionName = versionName;\r\n return version;\r\n }\r\n\r\n public toJSON(): IModelVersionProps {\r\n return this._versionName ? { versionName: this._versionName } :\r\n this._afterChangeSetId ? { afterChangeSetId: this._afterChangeSetId } :\r\n this._first ? { first: this._first } :\r\n { latest: true };\r\n }\r\n\r\n /** Creates a version from an IModelVersionProps */\r\n public static fromJSON(json: IModelVersionProps): IModelVersion {\r\n const version = new IModelVersion();\r\n version._first = json.first;\r\n version._afterChangeSetId = json.afterChangeSetId;\r\n version._latest = json.latest;\r\n version._versionName = json.versionName;\r\n return version;\r\n }\r\n\r\n /** Returns true if this describes the first version */\r\n public get isFirst(): boolean { return !!this._first; }\r\n\r\n /** Returns true if this describes the latest version */\r\n public get isLatest(): boolean { return !!this._latest; }\r\n\r\n /** Returns the last change set id to be applied to the iModel\r\n * to get to this specified version. @see asOfChangeSet().\r\n * Note that this method does not attempt to resolve the change set\r\n * if this describes the first version, last version, named version, etc.\r\n * @see evaluateChangeSet() for those use cases.\r\n */\r\n public getAsOfChangeSet(): ChangesetId | undefined { return this._afterChangeSetId; }\r\n\r\n /** Returns the name of the version if this describes a named version. @see named() */\r\n public getName(): string | undefined { return this._versionName; }\r\n}\r\n"]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gB,cAAc,KAAd,cAAc,QAsB9B;AAWD,YAAY;AACZ,MAAM,KAAW,mBAAmB,CAqBnC;AArBD,WAAiB,mBAAmB;IAClC,uDAAuD;IAC1C,yBAAK,GAAG,sBAAsB,CAAC;IAW5C,kDAAkD;IAClD,SAAgB,UAAU,CAAC,GAAQ,EAAE,OAAe,EAAE,UAAkB;QACtE,UAAU,CAAC,UAAU,CAAsB,EAAE,YAAY,EAAE,EAAE,KAAK,EAAL,oBAAA,KAAK,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;IACpG,CAAC;IAFe,8BAAU,aAEzB,CAAA;IACD,iEAAiE;IACjE,SAAgB,OAAO,CAAC,KAAc,EAAE,GAAS;QAC/C,OAAO,UAAU,CAAC,OAAO,CAAsB,KAAK,EAAE,oBAAA,KAAK,EAAE,GAAG,CAAC,IAAI,OAAO,KAAK,CAAC,UAAU,KAAK,QAAQ,CAAC;IAC5G,CAAC;IAFe,2BAAO,UAEtB,CAAA;AACH,CAAC,EArBgB,mBAAmB,KAAnB,mBAAmB,QAqBnC","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 iModels\n */\n\nimport { ITwinError } from \"@itwin/core-bentley\";\n\n/**\n * An error originating from the [SQLiteDb]($backend) API.\n * @beta\n */\nexport interface SqliteError extends ITwinError {\n /** The name of the database for this problem. */\n dbName: string;\n}\n\n/** @beta */\nexport namespace SqliteError {\n export const scope = \"itwin-Sqlite\";\n export type Key =\n \"already-open\" |\n \"incompatible-version\" |\n \"invalid-versions-property\" |\n \"readonly\";\n\n /** Determine whether an error object is a SqliteError */\n export function isError(error: unknown, key?: Key): error is SqliteError {\n return ITwinError.isError<SqliteError>(error, scope, key) && typeof error.dbName === \"string\";\n }\n\n /** Instantiate and throw a SqliteError */\n export function throwError(key: Key, message: string, dbName: string): never {\n ITwinError.throwError<SqliteError>({ iTwinErrorId: { scope, key }, message, dbName });\n }\n}\n\n/**\n * An error originating from the [CloudSqlite]($backend) API.\n * @beta\n */\nexport interface CloudSqliteError extends ITwinError {\n /** The name of the database that generated the error */\n readonly dbName?: string;\n /** The name of the container associated with the error */\n readonly containerId?: string;\n}\n\n/** @beta */\nexport namespace CloudSqliteError {\n export const scope = \"itwin-CloudSqlite\";\n export type Key =\n \"already-published\" |\n \"copy-error\" |\n \"invalid-name\" |\n \"no-version-available\" |\n \"not-a-function\" |\n \"service-not-available\" |\n /** The write lock cannot be acquired because it is currently held by somebody else.\n * @see WriteLockHeld for details\n */\n \"write-lock-held\" |\n /** The write lock on a container is not held, but is required for this operation */\n \"write-lock-not-held\";\n\n /** thrown when an attempt to acquire the write lock for a container fails because the lock is already held by somebody else (\"write-lock-held\"). */\n export interface WriteLockHeld extends CloudSqliteError {\n /** @internal */\n errorNumber: number;\n /** moniker of user currently holding container's lock */\n lockedBy: string;\n /** time the lock expires */\n expires: string;\n }\n\n /** Determine whether an error object is a CloudSqliteError */\n export function isError<T extends CloudSqliteError>(error: unknown, key?: Key): error is T {\n return ITwinError.isError<T>(error, scope, key);\n }\n\n /** Instantiate and throw a CloudSqliteError */\n export function throwError<T extends CloudSqliteError>(key: Key, e: Omit<T, \"name\" | \"iTwinErrorId\">): never {\n ITwinError.throwError<CloudSqliteError>({ ...e, iTwinErrorId: { scope, key } });\n }\n}\n\n/** Errors thrown by the [ViewStore]($backend) API.\n * @beta\n */\nexport interface ViewStoreError extends ITwinError {\n /** The name of the ViewStore that generated the error */\n viewStoreName?: string;\n}\n\n/** @beta */\nexport namespace ViewStoreError {\n export const scope = \"itwin-ViewStore\";\n export type Key =\n \"invalid-value\" |\n \"invalid-member\" |\n \"no-owner\" |\n \"not-found\" |\n \"not-unique\" |\n \"no-viewstore\" |\n \"group-error\";\n\n /** Determine whether an error object is a ViewStoreError */\n export function isError<T extends ViewStoreError>(error: unknown, key?: Key): error is T {\n return ITwinError.isError<T>(error, scope, key);\n }\n\n /** Instantiate and throw a ViewStoreError */\n export function throwError<T extends ViewStoreError>(key: Key, e: Omit<T, \"name\" | \"iTwinErrorId\">): never {\n ITwinError.throwError<ViewStoreError>({ ...e, iTwinErrorId: { scope, key } });\n }\n}\n\n/**\n * Errors thrown by the [Workspace]($backend) APIs.\n * @beta\n */\nexport namespace WorkspaceError {\n export const scope = \"itwin-Workspace\";\n export type Key =\n \"already-exists\" |\n \"container-exists\" |\n \"does-not-exist\" |\n \"invalid-name\" |\n \"no-cloud-container\" |\n \"load-error\" |\n \"load-errors\" |\n \"resource-exists\" |\n \"too-large\" |\n \"write-error\";\n\n /** Determine whether an error object is a WorkspaceError */\n export function isError<T extends ITwinError>(error: unknown, key?: Key): error is T {\n return ITwinError.isError<T>(error, scope, key);\n }\n\n export function throwError<T extends ITwinError>(key: Key, e: Omit<T, \"name\" | \"iTwinErrorId\">): never {\n ITwinError.throwError<ITwinError>({ ...e, iTwinErrorId: { key, scope } });\n }\n}\n\n\n/** Errors originating from the [ChannelControl]($backend) interface.\n * @beta\n */\nexport interface ChannelControlError extends ITwinError {\n /** The channel key that caused the error. */\n readonly channelKey: string;\n}\n\n/** @beta */\nexport namespace ChannelControlError {\n /** the ITwinError scope for `ChannelControlError`s. */\n export const scope = \"itwin-ChannelControl\";\n\n /** Keys that identify `ChannelControlError`s */\n export type Key =\n /** an attempt to create a channel within an existing channel */\n \"may-not-nest\" |\n /** an attempt to use a channel that was not \"allowed\" */\n \"not-allowed\" |\n /** the root channel already exists */\n \"root-exists\";\n\n /** Instantiate and throw a ChannelControlError */\n export function throwError(key: Key, message: string, channelKey: string): never {\n ITwinError.throwError<ChannelControlError>({ iTwinErrorId: { scope, key }, message, channelKey });\n }\n /** Determine whether an error object is a ChannelControlError */\n export function isError(error: unknown, key?: Key): error is ChannelControlError {\n return ITwinError.isError<ChannelControlError>(error, scope, key) && typeof error.channelKey === \"string\";\n }\n}\n"]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QAsB9B;AAWD,YAAY;AACZ,MAAM,KAAW,mBAAmB,CAqBnC;AArBD,WAAiB,mBAAmB;IAClC,uDAAuD;IAC1C,yBAAK,GAAG,sBAAsB,CAAC;IAW5C,kDAAkD;IAClD,SAAgB,UAAU,CAAC,GAAQ,EAAE,OAAe,EAAE,UAAkB;QACtE,UAAU,CAAC,UAAU,CAAsB,EAAE,YAAY,EAAE,EAAE,KAAK,EAAL,oBAAA,KAAK,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;IACpG,CAAC;IAFe,8BAAU,aAEzB,CAAA;IACD,iEAAiE;IACjE,SAAgB,OAAO,CAAC,KAAc,EAAE,GAAS;QAC/C,OAAO,UAAU,CAAC,OAAO,CAAsB,KAAK,EAAE,oBAAA,KAAK,EAAE,GAAG,CAAC,IAAI,OAAO,KAAK,CAAC,UAAU,KAAK,QAAQ,CAAC;IAC5G,CAAC;IAFe,2BAAO,UAEtB,CAAA;AACH,CAAC,EArBgB,mBAAmB,KAAnB,mBAAmB,QAqBnC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport { ITwinError } from \"@itwin/core-bentley\";\r\n\r\n/**\r\n * An error originating from the [SQLiteDb]($backend) API.\r\n * @beta\r\n */\r\nexport interface SqliteError extends ITwinError {\r\n /** The name of the database for this problem. */\r\n dbName: string;\r\n}\r\n\r\n/** @beta */\r\nexport namespace SqliteError {\r\n export const scope = \"itwin-Sqlite\";\r\n export type Key =\r\n \"already-open\" |\r\n \"incompatible-version\" |\r\n \"invalid-versions-property\" |\r\n \"readonly\";\r\n\r\n /** Determine whether an error object is a SqliteError */\r\n export function isError(error: unknown, key?: Key): error is SqliteError {\r\n return ITwinError.isError<SqliteError>(error, scope, key) && typeof error.dbName === \"string\";\r\n }\r\n\r\n /** Instantiate and throw a SqliteError */\r\n export function throwError(key: Key, message: string, dbName: string): never {\r\n ITwinError.throwError<SqliteError>({ iTwinErrorId: { scope, key }, message, dbName });\r\n }\r\n}\r\n\r\n/**\r\n * An error originating from the [CloudSqlite]($backend) API.\r\n * @beta\r\n */\r\nexport interface CloudSqliteError extends ITwinError {\r\n /** The name of the database that generated the error */\r\n readonly dbName?: string;\r\n /** The name of the container associated with the error */\r\n readonly containerId?: string;\r\n}\r\n\r\n/** @beta */\r\nexport namespace CloudSqliteError {\r\n export const scope = \"itwin-CloudSqlite\";\r\n export type Key =\r\n \"already-published\" |\r\n \"copy-error\" |\r\n \"invalid-name\" |\r\n \"no-version-available\" |\r\n \"not-a-function\" |\r\n \"service-not-available\" |\r\n /** The write lock cannot be acquired because it is currently held by somebody else.\r\n * @see WriteLockHeld for details\r\n */\r\n \"write-lock-held\" |\r\n /** The write lock on a container is not held, but is required for this operation */\r\n \"write-lock-not-held\";\r\n\r\n /** thrown when an attempt to acquire the write lock for a container fails because the lock is already held by somebody else (\"write-lock-held\"). */\r\n export interface WriteLockHeld extends CloudSqliteError {\r\n /** @internal */\r\n errorNumber: number;\r\n /** moniker of user currently holding container's lock */\r\n lockedBy: string;\r\n /** time the lock expires */\r\n expires: string;\r\n }\r\n\r\n /** Determine whether an error object is a CloudSqliteError */\r\n export function isError<T extends CloudSqliteError>(error: unknown, key?: Key): error is T {\r\n return ITwinError.isError<T>(error, scope, key);\r\n }\r\n\r\n /** Instantiate and throw a CloudSqliteError */\r\n export function throwError<T extends CloudSqliteError>(key: Key, e: Omit<T, \"name\" | \"iTwinErrorId\">): never {\r\n ITwinError.throwError<CloudSqliteError>({ ...e, iTwinErrorId: { scope, key } });\r\n }\r\n}\r\n\r\n/** Errors thrown by the [ViewStore]($backend) API.\r\n * @beta\r\n */\r\nexport interface ViewStoreError extends ITwinError {\r\n /** The name of the ViewStore that generated the error */\r\n viewStoreName?: string;\r\n}\r\n\r\n/** @beta */\r\nexport namespace ViewStoreError {\r\n export const scope = \"itwin-ViewStore\";\r\n export type Key =\r\n \"invalid-value\" |\r\n \"invalid-member\" |\r\n \"no-owner\" |\r\n \"not-found\" |\r\n \"not-unique\" |\r\n \"no-viewstore\" |\r\n \"group-error\";\r\n\r\n /** Determine whether an error object is a ViewStoreError */\r\n export function isError<T extends ViewStoreError>(error: unknown, key?: Key): error is T {\r\n return ITwinError.isError<T>(error, scope, key);\r\n }\r\n\r\n /** Instantiate and throw a ViewStoreError */\r\n export function throwError<T extends ViewStoreError>(key: Key, e: Omit<T, \"name\" | \"iTwinErrorId\">): never {\r\n ITwinError.throwError<ViewStoreError>({ ...e, iTwinErrorId: { scope, key } });\r\n }\r\n}\r\n\r\n/**\r\n * Errors thrown by the [Workspace]($backend) APIs.\r\n * @beta\r\n */\r\nexport namespace WorkspaceError {\r\n export const scope = \"itwin-Workspace\";\r\n export type Key =\r\n \"already-exists\" |\r\n \"container-exists\" |\r\n \"does-not-exist\" |\r\n \"invalid-name\" |\r\n \"no-cloud-container\" |\r\n \"load-error\" |\r\n \"load-errors\" |\r\n \"resource-exists\" |\r\n \"too-large\" |\r\n \"write-error\";\r\n\r\n /** Determine whether an error object is a WorkspaceError */\r\n export function isError<T extends ITwinError>(error: unknown, key?: Key): error is T {\r\n return ITwinError.isError<T>(error, scope, key);\r\n }\r\n\r\n export function throwError<T extends ITwinError>(key: Key, e: Omit<T, \"name\" | \"iTwinErrorId\">): never {\r\n ITwinError.throwError<ITwinError>({ ...e, iTwinErrorId: { key, scope } });\r\n }\r\n}\r\n\r\n\r\n/** Errors originating from the [ChannelControl]($backend) interface.\r\n * @beta\r\n */\r\nexport interface ChannelControlError extends ITwinError {\r\n /** The channel key that caused the error. */\r\n readonly channelKey: string;\r\n}\r\n\r\n/** @beta */\r\nexport namespace ChannelControlError {\r\n /** the ITwinError scope for `ChannelControlError`s. */\r\n export const scope = \"itwin-ChannelControl\";\r\n\r\n /** Keys that identify `ChannelControlError`s */\r\n export type Key =\r\n /** an attempt to create a channel within an existing channel */\r\n \"may-not-nest\" |\r\n /** an attempt to use a channel that was not \"allowed\" */\r\n \"not-allowed\" |\r\n /** the root channel already exists */\r\n \"root-exists\";\r\n\r\n /** Instantiate and throw a ChannelControlError */\r\n export function throwError(key: Key, message: string, channelKey: string): never {\r\n ITwinError.throwError<ChannelControlError>({ iTwinErrorId: { scope, key }, message, channelKey });\r\n }\r\n /** Determine whether an error object is a ChannelControlError */\r\n export function isError(error: unknown, key?: Key): error is ChannelControlError {\r\n return ITwinError.isError<ChannelControlError>(error, scope, key) && typeof error.channelKey === \"string\";\r\n }\r\n}\r\n"]}
|
package/lib/esm/Image.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.js","sourceRoot":"","sources":["../../src/Image.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;;;GAKG;AACH,MAAM,CAAN,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,uCAAuC;IACvC,yDAAQ,CAAA;IACR,sCAAsC;IACtC,uDAAO,CAAA;IACP,wBAAwB;IACxB,2DAAS,CAAA;AACX,CAAC,EAPW,iBAAiB,KAAjB,iBAAiB,QAO5B;AAED;;GAEG;AACH,MAAM,OAAO,WAAW;IACtB,sGAAsG;IACtF,IAAI,CAAa;IACjC,wCAAwC;IACxB,MAAM,CAAoB;IAC1C,+BAA+B;IACf,KAAK,CAAS;IAE9B,2DAA2D;IAC3D,IAAW,gBAAgB,KAAa,OAAO,WAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAE9F,0FAA0F;IACnF,MAAM,CAAC,mBAAmB,CAAC,MAAyB;QACzD,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,iBAAiB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;YACvC,KAAK,iBAAiB,CAAC,GAAG,CAAC,CAAC,OAAO,CAA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AAC,GAAG,IAAI,MAAM,CAAC,IAAI,YAAY,UAAU,CAAC;AACtF,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 Rendering\n */\n\n/** Format of an [[ImageBuffer]].\n * The format determines how many bytes are allocated for each pixel in the buffer and the semantics of each byte.\n * @see [[ImageBuffer.getNumBytesPerPixel]]\n * @public\n * @extensions\n */\nexport enum ImageBufferFormat {\n /** RGBA format - 4 bytes per pixel. */\n Rgba = 0,\n /** RGB format - 3 bytes per pixel. */\n Rgb = 2,\n /** 1 byte per pixel. */\n Alpha = 5,\n}\n\n/** Uncompressed rectangular bitmap image data.\n * @public\n */\nexport class ImageBuffer {\n /** Image data in which each pixel occupies 1 or more bytes depending of the [[ImageBufferFormat]]. */\n public readonly data: Uint8Array;\n /** Format of the bytes in the image. */\n public readonly format: ImageBufferFormat;\n /** Width of image in pixels */\n public readonly width: number;\n\n /** Return the number of bytes allocated for each pixel. */\n public get numBytesPerPixel(): number { return ImageBuffer.getNumBytesPerPixel(this.format); }\n\n /** Determine the number of bytes allocated to a single pixel for the specified format. */\n public static getNumBytesPerPixel(format: ImageBufferFormat): number {\n switch (format) {\n case ImageBufferFormat.Alpha: return 1;\n case ImageBufferFormat.Rgb: return 3;\n default: return 4;\n }\n }\n\n /** Get the height of this image in pixels. */\n public get height(): number { return ImageBuffer.computeHeight(this.data, this.format, this.width); }\n\n /** Create a new ImageBuffer.\n * @note The ImageBuffer takes ownership of the input Uint8Array.\n * @param data The uncompressed image bytes. Must be a multiple of the width times the number of bytes per pixel specified by the format.\n * @param format The format of the image.\n * @param width The width of the image in pixels.\n * @returns A new ImageBuffer.\n * @throws Error if the length of the Uint8Array is not appropriate for the specified width and format.\n */\n public static create(data: Uint8Array, format: ImageBufferFormat, width: number): ImageBuffer {\n if (!this.isValidData(data, format, width))\n throw new Error(\"The number of bytes supplied for ImageBuffer do not match its width and format.\");\n\n return new ImageBuffer(data, format, width);\n }\n\n private static isValidData(data: Uint8Array, format: ImageBufferFormat, width: number): boolean {\n const height = this.computeHeight(data, format, width);\n return width > 0 && height > 0 && Math.floor(width) === width && Math.floor(height) === height;\n }\n\n private static computeHeight(data: Uint8Array, format: ImageBufferFormat, width: number): number {\n return data.length / (width * this.getNumBytesPerPixel(format));\n }\n\n private constructor(data: Uint8Array, format: ImageBufferFormat, width: number) {\n this.data = data;\n this.format = format;\n this.width = width;\n }\n}\n\n/** Returns whether the input is a power of two.\n * @note Floating point inputs are truncated.\n * @public\n */\nexport function isPowerOfTwo(num: number): boolean {\n return 0 === (num & (num - 1));\n}\n\n/** Returns the first power-of-two value greater than or equal to the input.\n * @note Floating point inputs are truncated.\n * @public\n */\nexport function nextHighestPowerOfTwo(num: number): number {\n --num;\n for (let i = 1; i < 32; i <<= 1)\n num = num | num >> i;\n\n return num + 1;\n}\n\n/** The format of an ImageSource.\n * @public\n * @extensions\n */\nexport enum ImageSourceFormat {\n /** Image data is stored with JPEG compression. */\n Jpeg = 0,\n /** Image data is stored with PNG compression. */\n Png = 2,\n /** Image is stored as an Svg stream.\n * @note SVG is only valid for ImageSources in JavaScript. It *may not* be used for persistent textures.\n */\n Svg = 3,\n}\n\n/** Returns true if the numeric `format` value is a valid member of the [[ImageSourceFormat]] enumeration.\n * @public\n */\nexport function isValidImageSourceFormat(format: number): format is ImageSourceFormat {\n switch (format) {\n case ImageSourceFormat.Jpeg:\n case ImageSourceFormat.Png:\n case ImageSourceFormat.Svg:\n return true;\n default:\n return false;\n }\n}\n\n/** Image data encoded and compressed in either Jpeg or Png format.\n * @public\n */\nexport class ImageSource {\n /** The content of the image, compressed */\n public readonly data: Uint8Array | string;\n /** The compression type. */\n public readonly format: ImageSourceFormat;\n\n /** Construct a new ImageSource, which takes ownership of the Uint8Array. */\n public constructor(data: Uint8Array | string, format: ImageSourceFormat) {\n this.data = data;\n this.format = format;\n }\n}\n\n/** An [[ImageSource]] encoded in binary form as a Jpeg or Png, as opposed to one encoded\n * in string format as an Svg.\n * Only binary ImageSources can be used for [[Texture]]s stored in [[IModelDb]]s.\n * @public\n */\nexport interface BinaryImageSource {\n /** The format in which the [[data]] is encoded. */\n readonly format: ImageSourceFormat.Jpeg | ImageSourceFormat.Png;\n /** The image data encoded according to [[format]]. */\n readonly data: Uint8Array;\n}\n\n/** Returns true if `source` is a [[BinaryImageSource]].\n * @public\n */\nexport function isBinaryImageSource(source: ImageSource): source is BinaryImageSource {\n return source.format !== ImageSourceFormat.Svg && source.data instanceof Uint8Array;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Image.js","sourceRoot":"","sources":["../../src/Image.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;;;GAKG;AACH,MAAM,CAAN,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,uCAAuC;IACvC,yDAAQ,CAAA;IACR,sCAAsC;IACtC,uDAAO,CAAA;IACP,wBAAwB;IACxB,2DAAS,CAAA;AACX,CAAC,EAPW,iBAAiB,KAAjB,iBAAiB,QAO5B;AAED;;GAEG;AACH,MAAM,OAAO,WAAW;IACtB,sGAAsG;IACtF,IAAI,CAAa;IACjC,wCAAwC;IACxB,MAAM,CAAoB;IAC1C,+BAA+B;IACf,KAAK,CAAS;IAE9B,2DAA2D;IAC3D,IAAW,gBAAgB,KAAa,OAAO,WAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAE9F,0FAA0F;IACnF,MAAM,CAAC,mBAAmB,CAAC,MAAyB;QACzD,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,iBAAiB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;YACvC,KAAK,iBAAiB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;Q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;AACtF,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\n/** Format of an [[ImageBuffer]].\r\n * The format determines how many bytes are allocated for each pixel in the buffer and the semantics of each byte.\r\n * @see [[ImageBuffer.getNumBytesPerPixel]]\r\n * @public\r\n * @extensions\r\n */\r\nexport enum ImageBufferFormat {\r\n /** RGBA format - 4 bytes per pixel. */\r\n Rgba = 0,\r\n /** RGB format - 3 bytes per pixel. */\r\n Rgb = 2,\r\n /** 1 byte per pixel. */\r\n Alpha = 5,\r\n}\r\n\r\n/** Uncompressed rectangular bitmap image data.\r\n * @public\r\n */\r\nexport class ImageBuffer {\r\n /** Image data in which each pixel occupies 1 or more bytes depending of the [[ImageBufferFormat]]. */\r\n public readonly data: Uint8Array;\r\n /** Format of the bytes in the image. */\r\n public readonly format: ImageBufferFormat;\r\n /** Width of image in pixels */\r\n public readonly width: number;\r\n\r\n /** Return the number of bytes allocated for each pixel. */\r\n public get numBytesPerPixel(): number { return ImageBuffer.getNumBytesPerPixel(this.format); }\r\n\r\n /** Determine the number of bytes allocated to a single pixel for the specified format. */\r\n public static getNumBytesPerPixel(format: ImageBufferFormat): number {\r\n switch (format) {\r\n case ImageBufferFormat.Alpha: return 1;\r\n case ImageBufferFormat.Rgb: return 3;\r\n default: return 4;\r\n }\r\n }\r\n\r\n /** Get the height of this image in pixels. */\r\n public get height(): number { return ImageBuffer.computeHeight(this.data, this.format, this.width); }\r\n\r\n /** Create a new ImageBuffer.\r\n * @note The ImageBuffer takes ownership of the input Uint8Array.\r\n * @param data The uncompressed image bytes. Must be a multiple of the width times the number of bytes per pixel specified by the format.\r\n * @param format The format of the image.\r\n * @param width The width of the image in pixels.\r\n * @returns A new ImageBuffer.\r\n * @throws Error if the length of the Uint8Array is not appropriate for the specified width and format.\r\n */\r\n public static create(data: Uint8Array, format: ImageBufferFormat, width: number): ImageBuffer {\r\n if (!this.isValidData(data, format, width))\r\n throw new Error(\"The number of bytes supplied for ImageBuffer do not match its width and format.\");\r\n\r\n return new ImageBuffer(data, format, width);\r\n }\r\n\r\n private static isValidData(data: Uint8Array, format: ImageBufferFormat, width: number): boolean {\r\n const height = this.computeHeight(data, format, width);\r\n return width > 0 && height > 0 && Math.floor(width) === width && Math.floor(height) === height;\r\n }\r\n\r\n private static computeHeight(data: Uint8Array, format: ImageBufferFormat, width: number): number {\r\n return data.length / (width * this.getNumBytesPerPixel(format));\r\n }\r\n\r\n private constructor(data: Uint8Array, format: ImageBufferFormat, width: number) {\r\n this.data = data;\r\n this.format = format;\r\n this.width = width;\r\n }\r\n}\r\n\r\n/** Returns whether the input is a power of two.\r\n * @note Floating point inputs are truncated.\r\n * @public\r\n */\r\nexport function isPowerOfTwo(num: number): boolean {\r\n return 0 === (num & (num - 1));\r\n}\r\n\r\n/** Returns the first power-of-two value greater than or equal to the input.\r\n * @note Floating point inputs are truncated.\r\n * @public\r\n */\r\nexport function nextHighestPowerOfTwo(num: number): number {\r\n --num;\r\n for (let i = 1; i < 32; i <<= 1)\r\n num = num | num >> i;\r\n\r\n return num + 1;\r\n}\r\n\r\n/** The format of an ImageSource.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum ImageSourceFormat {\r\n /** Image data is stored with JPEG compression. */\r\n Jpeg = 0,\r\n /** Image data is stored with PNG compression. */\r\n Png = 2,\r\n /** Image is stored as an Svg stream.\r\n * @note SVG is only valid for ImageSources in JavaScript. It *may not* be used for persistent textures.\r\n */\r\n Svg = 3,\r\n}\r\n\r\n/** Returns true if the numeric `format` value is a valid member of the [[ImageSourceFormat]] enumeration.\r\n * @public\r\n */\r\nexport function isValidImageSourceFormat(format: number): format is ImageSourceFormat {\r\n switch (format) {\r\n case ImageSourceFormat.Jpeg:\r\n case ImageSourceFormat.Png:\r\n case ImageSourceFormat.Svg:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\n/** Image data encoded and compressed in either Jpeg or Png format.\r\n * @public\r\n */\r\nexport class ImageSource {\r\n /** The content of the image, compressed */\r\n public readonly data: Uint8Array | string;\r\n /** The compression type. */\r\n public readonly format: ImageSourceFormat;\r\n\r\n /** Construct a new ImageSource, which takes ownership of the Uint8Array. */\r\n public constructor(data: Uint8Array | string, format: ImageSourceFormat) {\r\n this.data = data;\r\n this.format = format;\r\n }\r\n}\r\n\r\n/** An [[ImageSource]] encoded in binary form as a Jpeg or Png, as opposed to one encoded\r\n * in string format as an Svg.\r\n * Only binary ImageSources can be used for [[Texture]]s stored in [[IModelDb]]s.\r\n * @public\r\n */\r\nexport interface BinaryImageSource {\r\n /** The format in which the [[data]] is encoded. */\r\n readonly format: ImageSourceFormat.Jpeg | ImageSourceFormat.Png;\r\n /** The image data encoded according to [[format]]. */\r\n readonly data: Uint8Array;\r\n}\r\n\r\n/** Returns true if `source` is a [[BinaryImageSource]].\r\n * @public\r\n */\r\nexport function isBinaryImageSource(source: ImageSource): source is BinaryImageSource {\r\n return source.format !== ImageSourceFormat.Svg && source.data instanceof Uint8Array;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IpcAppProps.js","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAuBH;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,GAAG,cAAc,CAAC,SAAS,gBAAgB,QAAQ,EAAE,CAAC;AAwBpH,gBAAgB;AAChB,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,sBAAsB;IACjC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,mBAAmB;IACzB,YAAY,EAAE,4BAA4B;CAClC,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 { GuidString, Id64String, IModelStatus, LogLevel, OpenMode } from \"@itwin/core-bentley\";\nimport { Range3dProps, XYZProps } from \"@itwin/core-geometry\";\nimport { OpenBriefcaseProps, OpenCheckpointArgs } from \"./BriefcaseTypes\";\nimport { ChangedEntities } from \"./ChangedEntities\";\nimport { ChangesetIndex, ChangesetIndexAndId } from \"./ChangesetProps\";\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\nimport { EcefLocationProps, IModelConnectionProps, IModelRpcProps, RootSubjectProps, SnapshotOpenOptions, StandaloneOpenOptions } from \"./IModel\";\nimport { ModelGeometryChangesProps } from \"./ModelGeometryChanges\";\n\n/** Options for pulling changes into iModel.\n * @internal\n */\nexport interface PullChangesOptions {\n /** Enables progress reporting. */\n reportProgress?: boolean;\n /** Interval for reporting progress (in milliseconds). */\n progressInterval?: number;\n /** Enables checks for abort. */\n enableCancellation?: boolean;\n}\n\n/** Get IPC channel name used for reporting progress of pulling changes into iModel.\n * @internal\n */\nexport const getPullChangesIpcChannel = (iModelId: string) => `${ipcAppChannels.functions}/pullChanges/${iModelId}`;\n\n/** Identifies a list of tile content Ids belonging to a single tile tree.\n * @internal\n */\nexport interface TileTreeContentIds {\n treeId: string;\n contentIds: string[];\n}\n\n/** Specifies a [GeometricModel]($backend)'s Id and a Guid identifying the current state of the geometry contained within the model.\n * @see [TxnManager.onModelGeometryChanged]($backend) and [BriefcaseTxns.onModelGeometryChanged]($frontend).\n * @public\n * @extensions\n */\nexport interface ModelIdAndGeometryGuid {\n /** The model's Id. */\n id: Id64String;\n /** A unique identifier for the current state of the model's geometry. If the guid differs between two revisions of the same iModel, it indicates that the geometry differs.\n * This is primarily an implementation detail used to determine whether [Tile]($frontend)s produced for one revision are compatible with another revision.\n */\n guid: GuidString;\n}\n\n/** @internal */\nexport const ipcAppChannels = {\n functions: \"itwinjs-core/ipc-app\",\n appNotify: \"itwinjs-core/ipcApp-notify\",\n txns: \"itwinjs-core/txns\",\n editingScope: \"itwinjs-core/editing-scope\",\n} as const;\n\n/**\n * Interface implemented by the frontend [NotificationHandler]($common) to be notified of events from IpcApp backend.\n * @internal\n */\nexport interface IpcAppNotifications {\n notifyApp: () => void;\n}\n\n/** @internal */\nexport interface NotifyEntitiesChangedMetadata {\n /** Class full name (\"Schema:Class\") */\n name: string;\n /** The indices in [[NotifyEntitiesChangedArgs.meta]] of each of this class's **direct** base classes. */\n bases: number[];\n}\n\n/** Arguments supplied to [[TxnNotifications.notifyElementsChanged]] and [[TxnNotifications.notifyModelsChanged]].\n * @internal\n */\nexport interface NotifyEntitiesChangedArgs extends ChangedEntities {\n /** An array of the same length as [[ChangedEntities.inserted]] (or empty if that array is undefined), containing the index in the [[meta]] array at which the\n * metadata for each entity's class is located.\n */\n insertedMeta: number[];\n /** See insertedMeta. */\n updatedMeta: number[];\n /** See insertedMeta. */\n deletedMeta: number[];\n\n /** Metadata describing each unique class of entity in this set of changes, followed by each unique direct or indirect base class of those classes. */\n meta: NotifyEntitiesChangedMetadata[];\n}\n\n/** Interface implemented by the frontend [NotificationHandler]($common) to be notified of changes to an iModel.\n * @see [TxnManager]($backend) for the source of these events.\n * @see [BriefcaseTxns]($frontend) for the frontend implementation.\n * @internal\n */\nexport interface TxnNotifications {\n notifyElementsChanged: (changes: NotifyEntitiesChangedArgs) => void;\n notifyModelsChanged: (changes: NotifyEntitiesChangedArgs) => void;\n notifyGeometryGuidsChanged: (changes: ModelIdAndGeometryGuid[]) => void;\n notifyCommit: () => void;\n notifyCommitted: (hasPendingTxns: boolean, time: number) => void;\n notifyReplayExternalTxns: () => void;\n notifyReplayedExternalTxns: () => void;\n notifyChangesApplied: () => void;\n notifyBeforeUndoRedo: (isUndo: boolean) => void;\n notifyAfterUndoRedo: (isUndo: boolean) => void;\n notifyPulledChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\n notifyPushedChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\n\n notifyIModelNameChanged: (name: string) => void;\n notifyRootSubjectChanged: (subject: RootSubjectProps) => void;\n notifyProjectExtentsChanged: (extents: Range3dProps) => void;\n notifyGlobalOriginChanged: (origin: XYZProps) => void;\n notifyEcefLocationChanged: (ecef: EcefLocationProps | undefined) => void;\n notifyGeographicCoordinateSystemChanged: (gcs: GeographicCRSProps | undefined) => void;\n}\n\n/**\n * Interface registered by the frontend [NotificationHandler]($common) to be notified of changes to an iModel during an [GraphicalEditingScope]($frontend).\n * @internal\n */\nexport interface EditingScopeNotifications {\n notifyGeometryChanged: (modelProps: ModelGeometryChangesProps[]) => void;\n}\n\n/**\n * The methods that may be invoked via Ipc from the frontend of an IpcApp and are implemented on its backend.\n * @internal\n */\nexport interface IpcAppFunctions {\n /** Send frontend log to backend.\n * @param _level Specify log level.\n * @param _category Specify log category.\n * @param _message Specify log message.\n * @param _metaData metaData if any.\n */\n log: (_timestamp: number, _level: LogLevel, _category: string, _message: string, _metaData?: any) => Promise<void>;\n\n /** see BriefcaseConnection.openFile */\n openBriefcase: (args: OpenBriefcaseProps) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.openStandalone */\n openCheckpoint: (args: OpenCheckpointArgs) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.openStandalone */\n openStandalone: (filePath: string, openMode: OpenMode, opts?: StandaloneOpenOptions) => Promise<IModelConnectionProps>;\n /** see SnapshotConnection.openFile */\n openSnapshot: (filePath: string, opts?: SnapshotOpenOptions) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.close */\n closeIModel: (key: string) => Promise<void>;\n /** see BriefcaseConnection.saveChanges */\n saveChanges: (key: string, description?: string) => Promise<void>;\n /** see BriefcaseConnection.abandonChanges */\n abandonChanges: (key: string) => Promise<void>;\n /** see BriefcaseTxns.hasPendingTxns */\n hasPendingTxns: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.isUndoPossible */\n isUndoPossible: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.isRedoPossible */\n isRedoPossible: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.getUndoString */\n getUndoString: (key: string) => Promise<string>;\n /** see BriefcaseTxns.getRedoString */\n getRedoString: (key: string) => Promise<string>;\n\n /** see BriefcaseConnection.pullChanges */\n pullChanges: (key: string, toIndex?: ChangesetIndex, options?: PullChangesOptions) => Promise<ChangesetIndexAndId>;\n /** Cancels pull of changes. */\n cancelPullChangesRequest: (key: string) => Promise<void>;\n /** see BriefcaseConnection.pushChanges */\n pushChanges: (key: string, description: string) => Promise<ChangesetIndexAndId>;\n /** Cancels currently pending or active generation of tile content. */\n cancelTileContentRequests: (tokenProps: IModelRpcProps, _contentIds: TileTreeContentIds[]) => Promise<void>;\n\n /** Cancel element graphics requests.\n * @see [[IModelTileRpcInterface.requestElementGraphics]].\n */\n cancelElementGraphicsRequests: (key: string, _requestIds: string[]) => Promise<void>;\n\n toggleGraphicalEditingScope: (key: string, _startSession: boolean) => Promise<boolean>;\n isGraphicalEditingSupported: (key: string) => Promise<boolean>;\n\n reverseTxns: (key: string, numOperations: number) => Promise<IModelStatus>;\n reverseAllTxn: (key: string) => Promise<IModelStatus>;\n reinstateTxn: (key: string) => Promise<IModelStatus>;\n restartTxnSession: (key: string) => Promise<void>;\n\n /** Query the number of concurrent threads supported by the host's IO or CPU thread pool. */\n queryConcurrency: (pool: \"io\" | \"cpu\") => Promise<number>;\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"IpcAppProps.js","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAuBH;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,GAAG,cAAc,CAAC,SAAS,gBAAgB,QAAQ,EAAE,CAAC;AAwBpH,gBAAgB;AAChB,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,sBAAsB;IACjC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,mBAAmB;IACzB,YAAY,EAAE,4BAA4B;CAClC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module NativeApp\r\n */\r\n\r\nimport { GuidString, Id64String, IModelStatus, LogLevel, OpenMode } from \"@itwin/core-bentley\";\r\nimport { Range3dProps, XYZProps } from \"@itwin/core-geometry\";\r\nimport { OpenBriefcaseProps, OpenCheckpointArgs } from \"./BriefcaseTypes\";\r\nimport { ChangedEntities } from \"./ChangedEntities\";\r\nimport { ChangesetIndex, ChangesetIndexAndId } from \"./ChangesetProps\";\r\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\r\nimport { EcefLocationProps, IModelConnectionProps, IModelRpcProps, RootSubjectProps, SnapshotOpenOptions, StandaloneOpenOptions } from \"./IModel\";\r\nimport { ModelGeometryChangesProps } from \"./ModelGeometryChanges\";\r\n\r\n/** Options for pulling changes into iModel.\r\n * @internal\r\n */\r\nexport interface PullChangesOptions {\r\n /** Enables progress reporting. */\r\n reportProgress?: boolean;\r\n /** Interval for reporting progress (in milliseconds). */\r\n progressInterval?: number;\r\n /** Enables checks for abort. */\r\n enableCancellation?: boolean;\r\n}\r\n\r\n/** Get IPC channel name used for reporting progress of pulling changes into iModel.\r\n * @internal\r\n */\r\nexport const getPullChangesIpcChannel = (iModelId: string) => `${ipcAppChannels.functions}/pullChanges/${iModelId}`;\r\n\r\n/** Identifies a list of tile content Ids belonging to a single tile tree.\r\n * @internal\r\n */\r\nexport interface TileTreeContentIds {\r\n treeId: string;\r\n contentIds: string[];\r\n}\r\n\r\n/** Specifies a [GeometricModel]($backend)'s Id and a Guid identifying the current state of the geometry contained within the model.\r\n * @see [TxnManager.onModelGeometryChanged]($backend) and [BriefcaseTxns.onModelGeometryChanged]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ModelIdAndGeometryGuid {\r\n /** The model's Id. */\r\n id: Id64String;\r\n /** A unique identifier for the current state of the model's geometry. If the guid differs between two revisions of the same iModel, it indicates that the geometry differs.\r\n * This is primarily an implementation detail used to determine whether [Tile]($frontend)s produced for one revision are compatible with another revision.\r\n */\r\n guid: GuidString;\r\n}\r\n\r\n/** @internal */\r\nexport const ipcAppChannels = {\r\n functions: \"itwinjs-core/ipc-app\",\r\n appNotify: \"itwinjs-core/ipcApp-notify\",\r\n txns: \"itwinjs-core/txns\",\r\n editingScope: \"itwinjs-core/editing-scope\",\r\n} as const;\r\n\r\n/**\r\n * Interface implemented by the frontend [NotificationHandler]($common) to be notified of events from IpcApp backend.\r\n * @internal\r\n */\r\nexport interface IpcAppNotifications {\r\n notifyApp: () => void;\r\n}\r\n\r\n/** @internal */\r\nexport interface NotifyEntitiesChangedMetadata {\r\n /** Class full name (\"Schema:Class\") */\r\n name: string;\r\n /** The indices in [[NotifyEntitiesChangedArgs.meta]] of each of this class's **direct** base classes. */\r\n bases: number[];\r\n}\r\n\r\n/** Arguments supplied to [[TxnNotifications.notifyElementsChanged]] and [[TxnNotifications.notifyModelsChanged]].\r\n * @internal\r\n */\r\nexport interface NotifyEntitiesChangedArgs extends ChangedEntities {\r\n /** An array of the same length as [[ChangedEntities.inserted]] (or empty if that array is undefined), containing the index in the [[meta]] array at which the\r\n * metadata for each entity's class is located.\r\n */\r\n insertedMeta: number[];\r\n /** See insertedMeta. */\r\n updatedMeta: number[];\r\n /** See insertedMeta. */\r\n deletedMeta: number[];\r\n\r\n /** Metadata describing each unique class of entity in this set of changes, followed by each unique direct or indirect base class of those classes. */\r\n meta: NotifyEntitiesChangedMetadata[];\r\n}\r\n\r\n/** Interface implemented by the frontend [NotificationHandler]($common) to be notified of changes to an iModel.\r\n * @see [TxnManager]($backend) for the source of these events.\r\n * @see [BriefcaseTxns]($frontend) for the frontend implementation.\r\n * @internal\r\n */\r\nexport interface TxnNotifications {\r\n notifyElementsChanged: (changes: NotifyEntitiesChangedArgs) => void;\r\n notifyModelsChanged: (changes: NotifyEntitiesChangedArgs) => void;\r\n notifyGeometryGuidsChanged: (changes: ModelIdAndGeometryGuid[]) => void;\r\n notifyCommit: () => void;\r\n notifyCommitted: (hasPendingTxns: boolean, time: number) => void;\r\n notifyReplayExternalTxns: () => void;\r\n notifyReplayedExternalTxns: () => void;\r\n notifyChangesApplied: () => void;\r\n notifyBeforeUndoRedo: (isUndo: boolean) => void;\r\n notifyAfterUndoRedo: (isUndo: boolean) => void;\r\n notifyPulledChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\r\n notifyPushedChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\r\n\r\n notifyIModelNameChanged: (name: string) => void;\r\n notifyRootSubjectChanged: (subject: RootSubjectProps) => void;\r\n notifyProjectExtentsChanged: (extents: Range3dProps) => void;\r\n notifyGlobalOriginChanged: (origin: XYZProps) => void;\r\n notifyEcefLocationChanged: (ecef: EcefLocationProps | undefined) => void;\r\n notifyGeographicCoordinateSystemChanged: (gcs: GeographicCRSProps | undefined) => void;\r\n}\r\n\r\n/**\r\n * Interface registered by the frontend [NotificationHandler]($common) to be notified of changes to an iModel during an [GraphicalEditingScope]($frontend).\r\n * @internal\r\n */\r\nexport interface EditingScopeNotifications {\r\n notifyGeometryChanged: (modelProps: ModelGeometryChangesProps[]) => void;\r\n}\r\n\r\n/**\r\n * The methods that may be invoked via Ipc from the frontend of an IpcApp and are implemented on its backend.\r\n * @internal\r\n */\r\nexport interface IpcAppFunctions {\r\n /** Send frontend log to backend.\r\n * @param _level Specify log level.\r\n * @param _category Specify log category.\r\n * @param _message Specify log message.\r\n * @param _metaData metaData if any.\r\n */\r\n log: (_timestamp: number, _level: LogLevel, _category: string, _message: string, _metaData?: any) => Promise<void>;\r\n\r\n /** see BriefcaseConnection.openFile */\r\n openBriefcase: (args: OpenBriefcaseProps) => Promise<IModelConnectionProps>;\r\n /** see BriefcaseConnection.openStandalone */\r\n openCheckpoint: (args: OpenCheckpointArgs) => Promise<IModelConnectionProps>;\r\n /** see BriefcaseConnection.openStandalone */\r\n openStandalone: (filePath: string, openMode: OpenMode, opts?: StandaloneOpenOptions) => Promise<IModelConnectionProps>;\r\n /** see SnapshotConnection.openFile */\r\n openSnapshot: (filePath: string, opts?: SnapshotOpenOptions) => Promise<IModelConnectionProps>;\r\n /** see BriefcaseConnection.close */\r\n closeIModel: (key: string) => Promise<void>;\r\n /** see BriefcaseConnection.saveChanges */\r\n saveChanges: (key: string, description?: string) => Promise<void>;\r\n /** see BriefcaseConnection.abandonChanges */\r\n abandonChanges: (key: string) => Promise<void>;\r\n /** see BriefcaseTxns.hasPendingTxns */\r\n hasPendingTxns: (key: string) => Promise<boolean>;\r\n /** see BriefcaseTxns.isUndoPossible */\r\n isUndoPossible: (key: string) => Promise<boolean>;\r\n /** see BriefcaseTxns.isRedoPossible */\r\n isRedoPossible: (key: string) => Promise<boolean>;\r\n /** see BriefcaseTxns.getUndoString */\r\n getUndoString: (key: string) => Promise<string>;\r\n /** see BriefcaseTxns.getRedoString */\r\n getRedoString: (key: string) => Promise<string>;\r\n\r\n /** see BriefcaseConnection.pullChanges */\r\n pullChanges: (key: string, toIndex?: ChangesetIndex, options?: PullChangesOptions) => Promise<ChangesetIndexAndId>;\r\n /** Cancels pull of changes. */\r\n cancelPullChangesRequest: (key: string) => Promise<void>;\r\n /** see BriefcaseConnection.pushChanges */\r\n pushChanges: (key: string, description: string) => Promise<ChangesetIndexAndId>;\r\n /** Cancels currently pending or active generation of tile content. */\r\n cancelTileContentRequests: (tokenProps: IModelRpcProps, _contentIds: TileTreeContentIds[]) => Promise<void>;\r\n\r\n /** Cancel element graphics requests.\r\n * @see [[IModelTileRpcInterface.requestElementGraphics]].\r\n */\r\n cancelElementGraphicsRequests: (key: string, _requestIds: string[]) => Promise<void>;\r\n\r\n toggleGraphicalEditingScope: (key: string, _startSession: boolean) => Promise<boolean>;\r\n isGraphicalEditingSupported: (key: string) => Promise<boolean>;\r\n\r\n reverseTxns: (key: string, numOperations: number) => Promise<IModelStatus>;\r\n reverseAllTxn: (key: string) => Promise<IModelStatus>;\r\n reinstateTxn: (key: string) => Promise<IModelStatus>;\r\n restartTxnSession: (key: string) => Promise<void>;\r\n\r\n /** Query the number of concurrent threads supported by the host's IO or CPU thread pool. */\r\n queryConcurrency: (pool: \"io\" | \"cpu\") => Promise<number>;\r\n}\r\n\r\n"]}
|