@itwin/core-backend 3.0.0-dev.76 → 3.0.0-dev.80
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/lib/{AliCloudStorageService.d.ts → cjs/AliCloudStorageService.d.ts} +0 -0
- package/lib/cjs/AliCloudStorageService.d.ts.map +1 -0
- package/lib/{AliCloudStorageService.js → cjs/AliCloudStorageService.js} +0 -0
- package/lib/cjs/AliCloudStorageService.js.map +1 -0
- package/lib/{BackendHubAccess.d.ts → cjs/BackendHubAccess.d.ts} +0 -0
- package/lib/cjs/BackendHubAccess.d.ts.map +1 -0
- package/lib/{BackendHubAccess.js → cjs/BackendHubAccess.js} +0 -0
- package/lib/cjs/BackendHubAccess.js.map +1 -0
- package/lib/{BackendLoggerCategory.d.ts → cjs/BackendLoggerCategory.d.ts} +0 -0
- package/lib/cjs/BackendLoggerCategory.d.ts.map +1 -0
- package/lib/{BackendLoggerCategory.js → cjs/BackendLoggerCategory.js} +0 -0
- package/lib/cjs/BackendLoggerCategory.js.map +1 -0
- package/lib/{BisCoreSchema.d.ts → cjs/BisCoreSchema.d.ts} +0 -0
- package/lib/cjs/BisCoreSchema.d.ts.map +1 -0
- package/lib/{BisCoreSchema.js → cjs/BisCoreSchema.js} +0 -0
- package/lib/cjs/BisCoreSchema.js.map +1 -0
- package/lib/{BriefcaseManager.d.ts → cjs/BriefcaseManager.d.ts} +0 -0
- package/lib/cjs/BriefcaseManager.d.ts.map +1 -0
- package/lib/{BriefcaseManager.js → cjs/BriefcaseManager.js} +2 -2
- package/lib/cjs/BriefcaseManager.js.map +1 -0
- package/lib/{Category.d.ts → cjs/Category.d.ts} +0 -0
- package/lib/cjs/Category.d.ts.map +1 -0
- package/lib/{Category.js → cjs/Category.js} +0 -0
- package/lib/cjs/Category.js.map +1 -0
- package/lib/{ChangeSummaryManager.d.ts → cjs/ChangeSummaryManager.d.ts} +1 -1
- package/lib/cjs/ChangeSummaryManager.d.ts.map +1 -0
- package/lib/{ChangeSummaryManager.js → cjs/ChangeSummaryManager.js} +0 -0
- package/lib/cjs/ChangeSummaryManager.js.map +1 -0
- package/lib/{ChangedElementsDb.d.ts → cjs/ChangedElementsDb.d.ts} +0 -0
- package/lib/cjs/ChangedElementsDb.d.ts.map +1 -0
- package/lib/{ChangedElementsDb.js → cjs/ChangedElementsDb.js} +0 -0
- package/lib/cjs/ChangedElementsDb.js.map +1 -0
- package/lib/{ChangedElementsManager.d.ts → cjs/ChangedElementsManager.d.ts} +0 -0
- package/lib/cjs/ChangedElementsManager.d.ts.map +1 -0
- package/lib/{ChangedElementsManager.js → cjs/ChangedElementsManager.js} +0 -0
- package/lib/cjs/ChangedElementsManager.js.map +1 -0
- package/lib/{CheckpointManager.d.ts → cjs/CheckpointManager.d.ts} +3 -1
- package/lib/cjs/CheckpointManager.d.ts.map +1 -0
- package/lib/{CheckpointManager.js → cjs/CheckpointManager.js} +2 -2
- package/lib/cjs/CheckpointManager.js.map +1 -0
- package/lib/{ClassRegistry.d.ts → cjs/ClassRegistry.d.ts} +0 -0
- package/lib/cjs/ClassRegistry.d.ts.map +1 -0
- package/lib/{ClassRegistry.js → cjs/ClassRegistry.js} +0 -0
- package/lib/cjs/ClassRegistry.js.map +1 -0
- package/lib/{CloudStorageBackend.d.ts → cjs/CloudStorageBackend.d.ts} +0 -0
- package/lib/cjs/CloudStorageBackend.d.ts.map +1 -0
- package/lib/{CloudStorageBackend.js → cjs/CloudStorageBackend.js} +3 -3
- package/lib/cjs/CloudStorageBackend.js.map +1 -0
- package/lib/{CodeSpecs.d.ts → cjs/CodeSpecs.d.ts} +0 -0
- package/lib/cjs/CodeSpecs.d.ts.map +1 -0
- package/lib/{CodeSpecs.js → cjs/CodeSpecs.js} +0 -0
- package/lib/cjs/CodeSpecs.js.map +1 -0
- package/lib/{ConcurrentQuery.d.ts → cjs/ConcurrentQuery.d.ts} +0 -0
- package/lib/cjs/ConcurrentQuery.d.ts.map +1 -0
- package/lib/{ConcurrentQuery.js → cjs/ConcurrentQuery.js} +0 -0
- package/lib/cjs/ConcurrentQuery.js.map +1 -0
- package/lib/{DevTools.d.ts → cjs/DevTools.d.ts} +0 -0
- package/lib/cjs/DevTools.d.ts.map +1 -0
- package/lib/{DevTools.js → cjs/DevTools.js} +3 -3
- package/lib/cjs/DevTools.js.map +1 -0
- package/lib/{DisplayStyle.d.ts → cjs/DisplayStyle.d.ts} +0 -0
- package/lib/cjs/DisplayStyle.d.ts.map +1 -0
- package/lib/{DisplayStyle.js → cjs/DisplayStyle.js} +5 -2
- package/lib/cjs/DisplayStyle.js.map +1 -0
- package/lib/{ECDb.d.ts → cjs/ECDb.d.ts} +0 -0
- package/lib/cjs/ECDb.d.ts.map +1 -0
- package/lib/{ECDb.js → cjs/ECDb.js} +51 -85
- package/lib/cjs/ECDb.js.map +1 -0
- package/lib/{ECSchemaXmlContext.d.ts → cjs/ECSchemaXmlContext.d.ts} +0 -0
- package/lib/cjs/ECSchemaXmlContext.d.ts.map +1 -0
- package/lib/{ECSchemaXmlContext.js → cjs/ECSchemaXmlContext.js} +0 -0
- package/lib/cjs/ECSchemaXmlContext.js.map +1 -0
- package/lib/{ECSqlStatement.d.ts → cjs/ECSqlStatement.d.ts} +0 -0
- package/lib/cjs/ECSqlStatement.d.ts.map +1 -0
- package/lib/{ECSqlStatement.js → cjs/ECSqlStatement.js} +0 -0
- package/lib/cjs/ECSqlStatement.js.map +1 -0
- package/lib/{Element.d.ts → cjs/Element.d.ts} +0 -0
- package/lib/cjs/Element.d.ts.map +1 -0
- package/lib/{Element.js → cjs/Element.js} +11 -4
- package/lib/cjs/Element.js.map +1 -0
- package/lib/{ElementAspect.d.ts → cjs/ElementAspect.d.ts} +0 -0
- package/lib/cjs/ElementAspect.d.ts.map +1 -0
- package/lib/{ElementAspect.js → cjs/ElementAspect.js} +0 -0
- package/lib/cjs/ElementAspect.js.map +1 -0
- package/lib/{ElementGraphics.d.ts → cjs/ElementGraphics.d.ts} +0 -0
- package/lib/cjs/ElementGraphics.d.ts.map +1 -0
- package/lib/{ElementGraphics.js → cjs/ElementGraphics.js} +0 -0
- package/lib/cjs/ElementGraphics.js.map +1 -0
- package/lib/{Entity.d.ts → cjs/Entity.d.ts} +0 -0
- package/lib/cjs/Entity.d.ts.map +1 -0
- package/lib/{Entity.js → cjs/Entity.js} +0 -0
- package/lib/cjs/Entity.js.map +1 -0
- package/lib/{ExportGraphics.d.ts → cjs/ExportGraphics.d.ts} +0 -0
- package/lib/cjs/ExportGraphics.d.ts.map +1 -0
- package/lib/{ExportGraphics.js → cjs/ExportGraphics.js} +0 -0
- package/lib/cjs/ExportGraphics.js.map +1 -0
- package/lib/{ExternalSource.d.ts → cjs/ExternalSource.d.ts} +0 -0
- package/lib/cjs/ExternalSource.d.ts.map +1 -0
- package/lib/{ExternalSource.js → cjs/ExternalSource.js} +0 -0
- package/lib/cjs/ExternalSource.js.map +1 -0
- package/lib/{GeometrySummary.d.ts → cjs/GeometrySummary.d.ts} +0 -0
- package/lib/cjs/GeometrySummary.d.ts.map +1 -0
- package/lib/{GeometrySummary.js → cjs/GeometrySummary.js} +0 -0
- package/lib/cjs/GeometrySummary.js.map +1 -0
- package/lib/{IModelCloneContext.d.ts → cjs/IModelCloneContext.d.ts} +0 -0
- package/lib/cjs/IModelCloneContext.d.ts.map +1 -0
- package/lib/{IModelCloneContext.js → cjs/IModelCloneContext.js} +0 -0
- package/lib/cjs/IModelCloneContext.js.map +1 -0
- package/lib/{IModelDb.d.ts → cjs/IModelDb.d.ts} +4 -6
- package/lib/cjs/IModelDb.d.ts.map +1 -0
- package/lib/{IModelDb.js → cjs/IModelDb.js} +99 -104
- package/lib/cjs/IModelDb.js.map +1 -0
- package/lib/{IModelHost.d.ts → cjs/IModelHost.d.ts} +1 -2
- package/lib/cjs/IModelHost.d.ts.map +1 -0
- package/lib/{IModelHost.js → cjs/IModelHost.js} +11 -6
- package/lib/cjs/IModelHost.js.map +1 -0
- package/lib/{IModelHubBackend.d.ts → cjs/IModelHubBackend.d.ts} +0 -0
- package/lib/cjs/IModelHubBackend.d.ts.map +1 -0
- package/lib/{IModelHubBackend.js → cjs/IModelHubBackend.js} +6 -6
- package/lib/cjs/IModelHubBackend.js.map +1 -0
- package/lib/{IModelJsFs.d.ts → cjs/IModelJsFs.d.ts} +0 -0
- package/lib/cjs/IModelJsFs.d.ts.map +1 -0
- package/lib/{IModelJsFs.js → cjs/IModelJsFs.js} +0 -0
- package/lib/cjs/IModelJsFs.js.map +1 -0
- package/lib/{IModelSchemaLoader.d.ts → cjs/IModelSchemaLoader.d.ts} +0 -0
- package/lib/cjs/IModelSchemaLoader.d.ts.map +1 -0
- package/lib/{IModelSchemaLoader.js → cjs/IModelSchemaLoader.js} +0 -0
- package/lib/cjs/IModelSchemaLoader.js.map +1 -0
- package/lib/{IpcHost.d.ts → cjs/IpcHost.d.ts} +0 -0
- package/lib/cjs/IpcHost.d.ts.map +1 -0
- package/lib/{IpcHost.js → cjs/IpcHost.js} +0 -0
- package/lib/cjs/IpcHost.js.map +1 -0
- package/lib/{LineStyle.d.ts → cjs/LineStyle.d.ts} +0 -0
- package/lib/cjs/LineStyle.d.ts.map +1 -0
- package/lib/{LineStyle.js → cjs/LineStyle.js} +0 -0
- package/lib/cjs/LineStyle.js.map +1 -0
- package/lib/{LocalhostIpcHost.d.ts → cjs/LocalhostIpcHost.d.ts} +0 -0
- package/lib/cjs/LocalhostIpcHost.d.ts.map +1 -0
- package/lib/{LocalhostIpcHost.js → cjs/LocalhostIpcHost.js} +0 -0
- package/lib/cjs/LocalhostIpcHost.js.map +1 -0
- package/lib/{Material.d.ts → cjs/Material.d.ts} +0 -0
- package/lib/cjs/Material.d.ts.map +1 -0
- package/lib/{Material.js → cjs/Material.js} +0 -0
- package/lib/cjs/Material.js.map +1 -0
- package/lib/{Model.d.ts → cjs/Model.d.ts} +0 -0
- package/lib/cjs/Model.d.ts.map +1 -0
- package/lib/{Model.js → cjs/Model.js} +1 -1
- package/lib/cjs/Model.js.map +1 -0
- package/lib/{NativeAppStorage.d.ts → cjs/NativeAppStorage.d.ts} +0 -0
- package/lib/cjs/NativeAppStorage.d.ts.map +1 -0
- package/lib/{NativeAppStorage.js → cjs/NativeAppStorage.js} +0 -0
- package/lib/cjs/NativeAppStorage.js.map +1 -0
- package/lib/{NativeHost.d.ts → cjs/NativeHost.d.ts} +2 -2
- package/lib/cjs/NativeHost.d.ts.map +1 -0
- package/lib/{NativeHost.js → cjs/NativeHost.js} +4 -1
- package/lib/cjs/NativeHost.js.map +1 -0
- package/lib/{NavigationRelationship.d.ts → cjs/NavigationRelationship.d.ts} +0 -0
- package/lib/cjs/NavigationRelationship.d.ts.map +1 -0
- package/lib/{NavigationRelationship.js → cjs/NavigationRelationship.js} +0 -0
- package/lib/cjs/NavigationRelationship.js.map +1 -0
- package/lib/{PromiseMemoizer.d.ts → cjs/PromiseMemoizer.d.ts} +0 -0
- package/lib/cjs/PromiseMemoizer.d.ts.map +1 -0
- package/lib/{PromiseMemoizer.js → cjs/PromiseMemoizer.js} +0 -0
- package/lib/cjs/PromiseMemoizer.js.map +1 -0
- package/lib/{Relationship.d.ts → cjs/Relationship.d.ts} +0 -0
- package/lib/cjs/Relationship.d.ts.map +1 -0
- package/lib/{Relationship.js → cjs/Relationship.js} +0 -0
- package/lib/cjs/Relationship.js.map +1 -0
- package/lib/{RpcBackend.d.ts → cjs/RpcBackend.d.ts} +0 -0
- package/lib/cjs/RpcBackend.d.ts.map +1 -0
- package/lib/{RpcBackend.js → cjs/RpcBackend.js} +0 -0
- package/lib/cjs/RpcBackend.js.map +1 -0
- package/lib/{SQLiteDb.d.ts → cjs/SQLiteDb.d.ts} +0 -0
- package/lib/cjs/SQLiteDb.d.ts.map +1 -0
- package/lib/{SQLiteDb.js → cjs/SQLiteDb.js} +0 -0
- package/lib/cjs/SQLiteDb.js.map +1 -0
- package/lib/{Schema.d.ts → cjs/Schema.d.ts} +0 -0
- package/lib/cjs/Schema.d.ts.map +1 -0
- package/lib/{Schema.js → cjs/Schema.js} +0 -0
- package/lib/cjs/Schema.js.map +1 -0
- package/lib/{ServerBasedLocks.d.ts → cjs/ServerBasedLocks.d.ts} +0 -0
- package/lib/cjs/ServerBasedLocks.d.ts.map +1 -0
- package/lib/{ServerBasedLocks.js → cjs/ServerBasedLocks.js} +0 -0
- package/lib/cjs/ServerBasedLocks.js.map +1 -0
- package/lib/{SqliteStatement.d.ts → cjs/SqliteStatement.d.ts} +0 -0
- package/lib/cjs/SqliteStatement.d.ts.map +1 -0
- package/lib/{SqliteStatement.js → cjs/SqliteStatement.js} +0 -0
- package/lib/cjs/SqliteStatement.js.map +1 -0
- package/lib/{Texture.d.ts → cjs/Texture.d.ts} +0 -0
- package/lib/cjs/Texture.d.ts.map +1 -0
- package/lib/{Texture.js → cjs/Texture.js} +0 -0
- package/lib/cjs/Texture.js.map +1 -0
- package/lib/{TxnManager.d.ts → cjs/TxnManager.d.ts} +0 -0
- package/lib/cjs/TxnManager.d.ts.map +1 -0
- package/lib/{TxnManager.js → cjs/TxnManager.js} +0 -0
- package/lib/cjs/TxnManager.js.map +1 -0
- package/lib/{ViewDefinition.d.ts → cjs/ViewDefinition.d.ts} +0 -0
- package/lib/cjs/ViewDefinition.d.ts.map +1 -0
- package/lib/{ViewDefinition.js → cjs/ViewDefinition.js} +0 -0
- package/lib/cjs/ViewDefinition.js.map +1 -0
- package/lib/{assets → cjs/assets}/IModelChange.02.00.00.ecschema.xml +0 -0
- package/lib/{core-backend.d.ts → cjs/core-backend.d.ts} +0 -0
- package/lib/cjs/core-backend.d.ts.map +1 -0
- package/lib/{core-backend.js → cjs/core-backend.js} +0 -0
- package/lib/cjs/core-backend.js.map +1 -0
- package/lib/{domains → cjs/domains}/FunctionalElements.d.ts +0 -0
- package/lib/cjs/domains/FunctionalElements.d.ts.map +1 -0
- package/lib/{domains → cjs/domains}/FunctionalElements.js +0 -0
- package/lib/cjs/domains/FunctionalElements.js.map +1 -0
- package/lib/{domains → cjs/domains}/FunctionalSchema.d.ts +0 -0
- package/lib/cjs/domains/FunctionalSchema.d.ts.map +1 -0
- package/lib/{domains → cjs/domains}/FunctionalSchema.js +0 -0
- package/lib/cjs/domains/FunctionalSchema.js.map +1 -0
- package/lib/{domains → cjs/domains}/GenericElements.d.ts +0 -0
- package/lib/cjs/domains/GenericElements.d.ts.map +1 -0
- package/lib/{domains → cjs/domains}/GenericElements.js +0 -0
- package/lib/cjs/domains/GenericElements.js.map +1 -0
- package/lib/{domains → cjs/domains}/GenericSchema.d.ts +0 -0
- package/lib/cjs/domains/GenericSchema.d.ts.map +1 -0
- package/lib/{domains → cjs/domains}/GenericSchema.js +0 -0
- package/lib/cjs/domains/GenericSchema.js.map +1 -0
- package/lib/{rpc-impl → cjs/rpc-impl}/DevToolsRpcImpl.d.ts +0 -0
- package/lib/cjs/rpc-impl/DevToolsRpcImpl.d.ts.map +1 -0
- package/lib/{rpc-impl → cjs/rpc-impl}/DevToolsRpcImpl.js +0 -0
- package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -0
- package/lib/{rpc-impl → cjs/rpc-impl}/IModelReadRpcImpl.d.ts +0 -0
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -0
- package/lib/{rpc-impl → cjs/rpc-impl}/IModelReadRpcImpl.js +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -0
- package/lib/{rpc-impl → cjs/rpc-impl}/IModelTileRpcImpl.d.ts +0 -0
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.d.ts.map +1 -0
- package/lib/{rpc-impl → cjs/rpc-impl}/IModelTileRpcImpl.js +6 -3
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -0
- package/lib/{rpc-impl → cjs/rpc-impl}/RpcBriefcaseUtility.d.ts +0 -0
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -0
- package/lib/{rpc-impl → cjs/rpc-impl}/RpcBriefcaseUtility.js +9 -8
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -0
- package/lib/{rpc-impl → cjs/rpc-impl}/SnapshotIModelRpcImpl.d.ts +0 -0
- package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts.map +1 -0
- package/lib/{rpc-impl → cjs/rpc-impl}/SnapshotIModelRpcImpl.js +1 -1
- package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -0
- package/lib/{rpc-impl → cjs/rpc-impl}/WipRpcImpl.d.ts +1 -2
- package/lib/cjs/rpc-impl/WipRpcImpl.d.ts.map +1 -0
- package/lib/{rpc-impl → cjs/rpc-impl}/WipRpcImpl.js +1 -2
- package/lib/cjs/rpc-impl/WipRpcImpl.js.map +1 -0
- package/package.json +37 -41
- package/lib/AliCloudStorageService.d.ts.map +0 -1
- package/lib/AliCloudStorageService.js.map +0 -1
- package/lib/BackendHubAccess.d.ts.map +0 -1
- package/lib/BackendHubAccess.js.map +0 -1
- package/lib/BackendLoggerCategory.d.ts.map +0 -1
- package/lib/BackendLoggerCategory.js.map +0 -1
- package/lib/BisCoreSchema.d.ts.map +0 -1
- package/lib/BisCoreSchema.js.map +0 -1
- package/lib/BriefcaseManager.d.ts.map +0 -1
- package/lib/BriefcaseManager.js.map +0 -1
- package/lib/Category.d.ts.map +0 -1
- package/lib/Category.js.map +0 -1
- package/lib/ChangeSummaryManager.d.ts.map +0 -1
- package/lib/ChangeSummaryManager.js.map +0 -1
- package/lib/ChangedElementsDb.d.ts.map +0 -1
- package/lib/ChangedElementsDb.js.map +0 -1
- package/lib/ChangedElementsManager.d.ts.map +0 -1
- package/lib/ChangedElementsManager.js.map +0 -1
- package/lib/CheckpointManager.d.ts.map +0 -1
- package/lib/CheckpointManager.js.map +0 -1
- package/lib/ClassRegistry.d.ts.map +0 -1
- package/lib/ClassRegistry.js.map +0 -1
- package/lib/CloudStorageBackend.d.ts.map +0 -1
- package/lib/CloudStorageBackend.js.map +0 -1
- package/lib/CodeSpecs.d.ts.map +0 -1
- package/lib/CodeSpecs.js.map +0 -1
- package/lib/ConcurrentQuery.d.ts.map +0 -1
- package/lib/ConcurrentQuery.js.map +0 -1
- package/lib/DevTools.d.ts.map +0 -1
- package/lib/DevTools.js.map +0 -1
- package/lib/DisplayStyle.d.ts.map +0 -1
- package/lib/DisplayStyle.js.map +0 -1
- package/lib/ECDb.d.ts.map +0 -1
- package/lib/ECDb.js.map +0 -1
- package/lib/ECSchemaXmlContext.d.ts.map +0 -1
- package/lib/ECSchemaXmlContext.js.map +0 -1
- package/lib/ECSqlStatement.d.ts.map +0 -1
- package/lib/ECSqlStatement.js.map +0 -1
- package/lib/Element.d.ts.map +0 -1
- package/lib/Element.js.map +0 -1
- package/lib/ElementAspect.d.ts.map +0 -1
- package/lib/ElementAspect.js.map +0 -1
- package/lib/ElementGraphics.d.ts.map +0 -1
- package/lib/ElementGraphics.js.map +0 -1
- package/lib/Entity.d.ts.map +0 -1
- package/lib/Entity.js.map +0 -1
- package/lib/ExportGraphics.d.ts.map +0 -1
- package/lib/ExportGraphics.js.map +0 -1
- package/lib/ExternalSource.d.ts.map +0 -1
- package/lib/ExternalSource.js.map +0 -1
- package/lib/GeometrySummary.d.ts.map +0 -1
- package/lib/GeometrySummary.js.map +0 -1
- package/lib/IModelCloneContext.d.ts.map +0 -1
- package/lib/IModelCloneContext.js.map +0 -1
- package/lib/IModelDb.d.ts.map +0 -1
- package/lib/IModelDb.js.map +0 -1
- package/lib/IModelHost.d.ts.map +0 -1
- package/lib/IModelHost.js.map +0 -1
- package/lib/IModelHubBackend.d.ts.map +0 -1
- package/lib/IModelHubBackend.js.map +0 -1
- package/lib/IModelJsFs.d.ts.map +0 -1
- package/lib/IModelJsFs.js.map +0 -1
- package/lib/IModelSchemaLoader.d.ts.map +0 -1
- package/lib/IModelSchemaLoader.js.map +0 -1
- package/lib/IpcHost.d.ts.map +0 -1
- package/lib/IpcHost.js.map +0 -1
- package/lib/LineStyle.d.ts.map +0 -1
- package/lib/LineStyle.js.map +0 -1
- package/lib/LocalhostIpcHost.d.ts.map +0 -1
- package/lib/LocalhostIpcHost.js.map +0 -1
- package/lib/Material.d.ts.map +0 -1
- package/lib/Material.js.map +0 -1
- package/lib/Model.d.ts.map +0 -1
- package/lib/Model.js.map +0 -1
- package/lib/NativeAppStorage.d.ts.map +0 -1
- package/lib/NativeAppStorage.js.map +0 -1
- package/lib/NativeHost.d.ts.map +0 -1
- package/lib/NativeHost.js.map +0 -1
- package/lib/NavigationRelationship.d.ts.map +0 -1
- package/lib/NavigationRelationship.js.map +0 -1
- package/lib/PromiseMemoizer.d.ts.map +0 -1
- package/lib/PromiseMemoizer.js.map +0 -1
- package/lib/Relationship.d.ts.map +0 -1
- package/lib/Relationship.js.map +0 -1
- package/lib/RpcBackend.d.ts.map +0 -1
- package/lib/RpcBackend.js.map +0 -1
- package/lib/SQLiteDb.d.ts.map +0 -1
- package/lib/SQLiteDb.js.map +0 -1
- package/lib/Schema.d.ts.map +0 -1
- package/lib/Schema.js.map +0 -1
- package/lib/ServerBasedLocks.d.ts.map +0 -1
- package/lib/ServerBasedLocks.js.map +0 -1
- package/lib/SqliteStatement.d.ts.map +0 -1
- package/lib/SqliteStatement.js.map +0 -1
- package/lib/Texture.d.ts.map +0 -1
- package/lib/Texture.js.map +0 -1
- package/lib/TxnManager.d.ts.map +0 -1
- package/lib/TxnManager.js.map +0 -1
- package/lib/ViewDefinition.d.ts.map +0 -1
- package/lib/ViewDefinition.js.map +0 -1
- package/lib/core-backend.d.ts.map +0 -1
- package/lib/core-backend.js.map +0 -1
- package/lib/domains/FunctionalElements.d.ts.map +0 -1
- package/lib/domains/FunctionalElements.js.map +0 -1
- package/lib/domains/FunctionalSchema.d.ts.map +0 -1
- package/lib/domains/FunctionalSchema.js.map +0 -1
- package/lib/domains/GenericElements.d.ts.map +0 -1
- package/lib/domains/GenericElements.js.map +0 -1
- package/lib/domains/GenericSchema.d.ts.map +0 -1
- package/lib/domains/GenericSchema.js.map +0 -1
- package/lib/rpc-impl/DevToolsRpcImpl.d.ts.map +0 -1
- package/lib/rpc-impl/DevToolsRpcImpl.js.map +0 -1
- package/lib/rpc-impl/IModelReadRpcImpl.d.ts.map +0 -1
- package/lib/rpc-impl/IModelReadRpcImpl.js.map +0 -1
- package/lib/rpc-impl/IModelTileRpcImpl.d.ts.map +0 -1
- package/lib/rpc-impl/IModelTileRpcImpl.js.map +0 -1
- package/lib/rpc-impl/RpcBriefcaseUtility.d.ts.map +0 -1
- package/lib/rpc-impl/RpcBriefcaseUtility.js.map +0 -1
- package/lib/rpc-impl/SnapshotIModelRpcImpl.d.ts.map +0 -1
- package/lib/rpc-impl/SnapshotIModelRpcImpl.js.map +0 -1
- package/lib/rpc-impl/WipRpcImpl.d.ts.map +0 -1
- package/lib/rpc-impl/WipRpcImpl.js.map +0 -1
package/lib/IModelHost.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IModelHost.js","sourceRoot":"","sources":["../src/IModelHost.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yBAAyB;AACzB,6BAA6B;AAC7B,iCAAiC;AACjC,wEAAgE;AAChE,sDAA+I;AAE/I,oDAA8E;AAC9E,8DAAyE;AAEzE,gEAA6D;AAC7D,qEAAkE;AAElE,mEAAgE;AAChE,mDAAgD;AAChD,yDAAsD;AACtD,+DAAwI;AAExI,iEAA8D;AAC9D,2DAAwD;AACxD,yDAAsD;AACtD,6CAA0C;AAC1C,gEAA6D;AAC7D,oEAAiE;AACjE,oEAAiE;AACjE,4EAAyE;AACzE,sDAAmD;AACnD,6CAAoD;AAEpD,MAAM,cAAc,GAAG,6CAAqB,CAAC,UAAU,CAAC;AAqCxD;;GAEG;AACH,MAAa,uBAAuB;IAApC;QAuCE;;WAEG;QACI,2BAAsB,GAAG,uBAAuB,CAAC,yBAAyB,CAAC;QAClF;;WAEG;QACI,8BAAyB,GAAG,uBAAuB,CAAC,yBAAyB,CAAC;QAUrF;;WAEG;QACI,6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AAe,KAAa,OAAO,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAEhG,8DAA8D;IACvD,MAAM,KAAK,gBAAgB;QAChC,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACxC,CAAC;IAED,+BAA+B;IACxB,MAAM,KAAK,MAAM;QACtB,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC;IACrB,CAAC;CACF;AAdD,wCAcC;AAED;;;;GAIG;AACH,MAAsB,gBAAgB;IACpC;;;OAGG;IACI,aAAa,CAAC,QAAgB,IAAwB,OAAO,SAAS,CAAC,CAAC,CAAC;IAChF;;;;OAIG;IACI,UAAU,CAAC,OAAe;QAC/B,MAAM,gBAAgB,GAAuB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzE,IAAI,SAAS,KAAK,gBAAgB,EAAE;YAClC,MAAM,IAAI,yBAAW,CAAC,2BAAY,CAAC,QAAQ,EAAE,GAAG,OAAO,eAAe,CAAC,CAAC;SACzE;QACD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IACD;;;OAGG;IACI,kBAAkB,CAAC,UAAkB,IAAwB,OAAO,UAAU,CAAC,CAAC,CAAC;IACxF;;;;OAIG;IACI,eAAe,CAAC,UAAkB;QACvC,MAAM,gBAAgB,GAAuB,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;QACjF,IAAI,SAAS,KAAK,gBAAgB,EAAE;YAClC,MAAM,IAAI,yBAAW,CAAC,2BAAY,CAAC,QAAQ,EAAE,GAAG,UAAU,eAAe,CAAC,CAAC;SAC5E;QACD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF;AAnCD,4CAmCC","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 IModelHost\r\n */\r\n\r\nimport * as os from \"os\";\r\nimport * as path from \"path\";\r\nimport * as semver from \"semver\";\r\nimport { HttpRequestHost } from \"@bentley/backend-itwin-client\";\r\nimport { AccessToken, assert, BeEvent, Guid, GuidString, IModelStatus, Logger, LogLevel, Mutable, ProcessDetector } from \"@itwin/core-bentley\";\r\nimport { IModelClient } from \"@bentley/imodelhub-client\";\r\nimport { BentleyStatus, IModelError, SessionProps } from \"@itwin/core-common\";\r\nimport { IModelJsNative, NativeLibrary } from \"@bentley/imodeljs-native\";\r\nimport { AuthorizationClient } from \"@bentley/itwin-client\";\r\nimport { TelemetryManager } from \"@bentley/telemetry-client\";\r\nimport { AliCloudStorageService } from \"./AliCloudStorageService\";\r\nimport { BackendHubAccess } from \"./BackendHubAccess\";\r\nimport { BackendLoggerCategory } from \"./BackendLoggerCategory\";\r\nimport { BisCoreSchema } from \"./BisCoreSchema\";\r\nimport { BriefcaseManager } from \"./BriefcaseManager\";\r\nimport { AzureBlobStorage, CloudStorageService, CloudStorageServiceCredentials, CloudStorageTileUploader } from \"./CloudStorageBackend\";\r\nimport { Config as ConcurrentQueryConfig } from \"./ConcurrentQuery\";\r\nimport { FunctionalSchema } from \"./domains/FunctionalSchema\";\r\nimport { GenericSchema } from \"./domains/GenericSchema\";\r\nimport { IModelHubBackend } from \"./IModelHubBackend\";\r\nimport { IModelJsFs } from \"./IModelJsFs\";\r\nimport { DevToolsRpcImpl } from \"./rpc-impl/DevToolsRpcImpl\";\r\nimport { IModelReadRpcImpl } from \"./rpc-impl/IModelReadRpcImpl\";\r\nimport { IModelTileRpcImpl } from \"./rpc-impl/IModelTileRpcImpl\";\r\nimport { SnapshotIModelRpcImpl } from \"./rpc-impl/SnapshotIModelRpcImpl\";\r\nimport { WipRpcImpl } from \"./rpc-impl/WipRpcImpl\";\r\nimport { initializeRpcBackend } from \"./RpcBackend\";\r\n\r\nconst loggerCategory = BackendLoggerCategory.IModelHost;\r\n\r\n// cspell:ignore nodereport fatalerror apicall alicloud rpcs\r\n\r\n/** @alpha */\r\nexport interface CrashReportingConfigNameValuePair {\r\n name: string;\r\n value: string;\r\n}\r\n\r\n/** Configuration of the crash-reporting system.\r\n * @alpha\r\n */\r\nexport interface CrashReportingConfig {\r\n /** The directory to which *.dmp and/or iModelJsNativeCrash*.properties.txt files are written. This directory will be created if it does not already exist. */\r\n crashDir: string;\r\n /** max # .dmp files that may exist in crashDir. The default is 50. */\r\n maxDumpsInDir?: number;\r\n /** Enable crash-dumps? If so, .dmp and .properties.txt files will be generated and written to crashDir in the event of an unhandled native-code exception. If not, only .properties.txt files will be written. The default is false. */\r\n enableCrashDumps?: boolean;\r\n /** If enableCrashDumps is true, do you want a full-memory dump? Defaults to false. */\r\n wantFullMemoryDumps?: boolean;\r\n /** Enable node-report? If so, node-report files will be generated in the event of an unhandled exception or fatal error and written to crashDir. The default is false. */\r\n enableNodeReport?: boolean;\r\n /** Additional name, value pairs to write to iModelJsNativeCrash*.properties.txt file in the event of a crash. */\r\n params?: CrashReportingConfigNameValuePair[];\r\n /** Run this .js file to process .dmp and node-report files in the event of a crash.\r\n * This script will be executed with a single command-line parameter: the name of the dump or node-report file.\r\n * In the case of a dump file, there will be a second file with the same basename and the extension \".properties.txt\".\r\n * Since it runs in a separate process, this script will have no access to the Javascript\r\n * context of the exiting backend. No default.\r\n */\r\n dumpProcessorScriptFileName?: string;\r\n /** Upload crash dump and node-reports to Bentley's crash-reporting service? Defaults to false */\r\n uploadToBentley?: boolean;\r\n}\r\n\r\n/** Configuration of core-backend.\r\n * @public\r\n */\r\nexport class IModelHostConfiguration {\r\n\r\n /**\r\n * Root of the directory holding all the files that iModel.js caches\r\n * - If not specified at startup a platform specific default is used -\r\n * - Windows: $(HOMEDIR)/AppData/Local/iModelJs/\r\n * - Mac/iOS: $(HOMEDIR)/Library/Caches/iModelJs/\r\n * - Linux: $(HOMEDIR)/.cache/iModelJs/\r\n * where $(HOMEDIR) is documented [here](https://nodejs.org/api/os.html#os_os_homedir)\r\n * - if specified, ensure it is set to a folder with read/write access.\r\n * - Sub-folders within this folder organize various caches -\r\n * - bc/ -> Briefcases\r\n * - appSettings/ -> Offline application settings (only relevant in native applications)\r\n * - etc.\r\n * @see [[IModelHost.cacheDir]] for the value it's set to after startup\r\n */\r\n public cacheDir?: string;\r\n\r\n /** The directory where the app's assets are found. */\r\n public appAssetsDir?: string;\r\n\r\n /** The kind of iModel server to use. Defaults to iModelHubClient */\r\n public imodelClient?: IModelClient;\r\n\r\n /** The credentials to use for the tile cache service. If omitted, a local cache will be used.\r\n * @beta\r\n */\r\n public tileCacheCredentials?: CloudStorageServiceCredentials;\r\n\r\n /** Whether to restrict tile cache URLs by client IP address (if available).\r\n * @beta\r\n */\r\n public restrictTileUrlsByClientIp?: boolean;\r\n\r\n /** Whether to compress cached tiles.\r\n * Defaults to `true`.\r\n */\r\n public compressCachedTiles?: boolean;\r\n\r\n /** The time, in milliseconds, for which [IModelTileRpcInterface.requestTileTreeProps]($common) should wait before returning a \"pending\" status.\r\n * @internal\r\n */\r\n public tileTreeRequestTimeout = IModelHostConfiguration.defaultTileRequestTimeout;\r\n /** The time, in milliseconds, for which [IModelTileRpcInterface.requestTileContent]($common) should wait before returning a \"pending\" status.\r\n * @internal\r\n */\r\n public tileContentRequestTimeout = IModelHostConfiguration.defaultTileRequestTimeout;\r\n /** The default time, in milliseconds, used for [[tileTreeRequestTimeout]] and [[tileContentRequestTimeout]]. To change this, override one or both of those properties.\r\n * @internal\r\n */\r\n public static defaultTileRequestTimeout = 20 * 1000;\r\n\r\n /** The default time, in seconds, used for [[logTileLoadTimeThreshold]]. To change this, override that property.\r\n * @internal\r\n */\r\n public static defaultLogTileLoadTimeThreshold = 40;\r\n /** The backend will log when a tile took longer to load than this threshold in seconds.\r\n * @internal\r\n */\r\n public logTileLoadTimeThreshold: number = IModelHostConfiguration.defaultLogTileLoadTimeThreshold;\r\n\r\n /** The default size, in bytes, used for [[logTileSizeThreshold]]. To change this, override that property.\r\n * @internal\r\n */\r\n public static defaultLogTileSizeThreshold = 20 * 1000000;\r\n /** The backend will log when a tile is loaded with a size in bytes above this threshold.\r\n * @internal\r\n */\r\n public logTileSizeThreshold: number = IModelHostConfiguration.defaultLogTileSizeThreshold;\r\n\r\n /** Crash-reporting configuration\r\n * @alpha\r\n */\r\n public crashReportingConfig?: CrashReportingConfig;\r\n\r\n public concurrentQuery: ConcurrentQueryConfig = {\r\n concurrent: os.cpus().length,\r\n autoExpireTimeForCompletedQuery: 2 * 60, // 2 minutes\r\n minMonitorInterval: 1, // 1 seconds\r\n idleCleanupTime: 30 * 60, // 30 minutes\r\n cachedStatementsPerThread: 40,\r\n maxQueueSize: (os.cpus().length) * 500,\r\n pollInterval: 50,\r\n useSharedCache: false,\r\n useUncommittedRead: false,\r\n resetStatisticsInterval: 60, // minutes\r\n logStatisticsInterval: 5, // minutes\r\n quota: {\r\n maxTimeAllowed: 60, // 1 Minute\r\n maxMemoryAllowed: 2 * 1024 * 1024, // 2 MB\r\n },\r\n };\r\n}\r\n\r\n/** IModelHost initializes ($backend) and captures its configuration. A backend must call [[IModelHost.startup]] before using any backend classes.\r\n * See [the learning article]($docs/learning/backend/IModelHost.md)\r\n * @public\r\n */\r\nexport class IModelHost {\r\n private constructor() { }\r\n public static authorizationClient?: AuthorizationClient;\r\n\r\n /** @alpha */\r\n public static readonly telemetry = new TelemetryManager();\r\n\r\n public static backendVersion = \"\";\r\n private static _cacheDir = \"\";\r\n\r\n private static _platform?: typeof IModelJsNative;\r\n /** @internal */\r\n public static get platform(): typeof IModelJsNative {\r\n if (this._platform === undefined)\r\n throw new Error(\"IModelHost.startup must be called first\");\r\n return this._platform;\r\n }\r\n\r\n public static configuration?: IModelHostConfiguration;\r\n /** Event raised just after the backend IModelHost was started */\r\n public static readonly onAfterStartup = new BeEvent<() => void>();\r\n\r\n /** Event raised just before the backend IModelHost is to be shut down */\r\n public static readonly onBeforeShutdown = new BeEvent<() => void>();\r\n\r\n /** @internal */\r\n public static readonly session: Mutable<SessionProps> = { applicationId: \"2686\", applicationVersion: \"1.0.0\", sessionId: \"\" };\r\n\r\n /** A uniqueId for this session */\r\n public static get sessionId() { return this.session.sessionId; }\r\n public static set sessionId(id: GuidString) { this.session.sessionId = id; }\r\n\r\n /** The Id of this application - needs to be set only if it is an agent application. The applicationId will otherwise originate at the frontend. */\r\n public static get applicationId() { return this.session.applicationId; }\r\n public static set applicationId(id: string) { this.session.applicationId = id; }\r\n\r\n /** The version of this application - needs to be set if is an agent application. The applicationVersion will otherwise originate at the frontend. */\r\n public static get applicationVersion() { return this.session.applicationVersion; }\r\n public static set applicationVersion(version: string) { this.session.applicationVersion = version; }\r\n\r\n /** Root of the directory holding all the files that iModel.js caches */\r\n public static get cacheDir(): string { return this._cacheDir; }\r\n\r\n /** The optional [[FileNameResolver]] that resolves keys and partial file names for snapshot iModels. */\r\n public static snapshotFileNameResolver?: FileNameResolver;\r\n\r\n /** Get the current access token for this IModelHost, or a blank string if none is available.\r\n * @note for web backends, this will *always* return a blank string because the backend itself has no token (but never needs one either.)\r\n * For all IpcHosts, where this backend is servicing a single frontend, this will be the user's token. For ElectronHost, the backend\r\n * obtains the token and forwards it to the frontend.\r\n * @note accessTokens expire periodically and are automatically refreshed, if possible. Therefore tokens should not be saved, and the value\r\n * returned by this method may change over time throughout the course of a session.\r\n */\r\n public static async getAccessToken(): Promise<AccessToken> {\r\n try {\r\n return (await this.authorizationClient?.getAccessToken()) ?? \"\";\r\n } catch (e) {\r\n return \"\";\r\n }\r\n }\r\n\r\n /** @internal */\r\n public static flushLog() {\r\n return this.platform.DgnDb.flushLog();\r\n }\r\n /** @internal */\r\n public static loadNative(): void {\r\n const platform = Platform.load();\r\n this.registerPlatform(platform);\r\n }\r\n\r\n private static registerPlatform(platform: typeof IModelJsNative): void {\r\n this._platform = platform;\r\n if (undefined === platform)\r\n return;\r\n\r\n if (!ProcessDetector.isMobileAppBackend)\r\n this.validateNativePlatformVersion();\r\n\r\n platform.logger = Logger;\r\n }\r\n\r\n private static validateNativePlatformVersion(): void {\r\n const requiredVersion = require(\"../package.json\").dependencies[\"@bentley/imodeljs-native\"]; // eslint-disable-line @typescript-eslint/no-var-requires\r\n const thisVersion = this.platform.version;\r\n if (semver.satisfies(thisVersion, requiredVersion))\r\n return;\r\n if (IModelJsFs.existsSync(path.join(__dirname, \"DevBuild.txt\"))) {\r\n console.log(\"Bypassing version checks for development build\"); // eslint-disable-line no-console\r\n return;\r\n }\r\n this._platform = undefined;\r\n throw new IModelError(IModelStatus.BadRequest, `imodeljs-native version is (${thisVersion}). core-backend requires version (${requiredVersion})`);\r\n }\r\n\r\n /**\r\n * @beta\r\n * @note A reference implementation is set by default for [AzureBlobStorage]. To supply a different implementation for any service provider (such as AWS),\r\n * set this property with a custom [CloudStorageService] and also set [IModelHostConfiguration.tileCacheCredentials] using \"external\" for the service name.\r\n * Note that the account and access key members of [CloudStorageServiceCredentials] may have blank values unless the custom service implementation uses them.\r\n */\r\n public static tileCacheService: CloudStorageService;\r\n\r\n /** @internal */\r\n public static tileUploader: CloudStorageTileUploader;\r\n\r\n private static _hubAccess: BackendHubAccess;\r\n /** @internal */\r\n public static setHubAccess(hubAccess: BackendHubAccess) { this._hubAccess = hubAccess; }\r\n\r\n /** Provides access to the IModelHub for this IModelHost\r\n * @beta\r\n */\r\n public static get hubAccess(): BackendHubAccess { return this._hubAccess; }\r\n\r\n private static _isValid = false;\r\n /** Returns true if IModelHost is started. */\r\n public static get isValid() { return this._isValid; }\r\n /** This method must be called before any iModel.js services are used.\r\n * @param configuration Host configuration data.\r\n * Raises [[onAfterStartup]].\r\n * @see [[shutdown]].\r\n */\r\n public static async startup(configuration: IModelHostConfiguration = new IModelHostConfiguration()): Promise<void> {\r\n if (this._isValid)\r\n return; // we're already initialized\r\n this._isValid = true;\r\n\r\n if (IModelHost.sessionId === \"\")\r\n IModelHost.sessionId = Guid.createValue();\r\n\r\n this.logStartup();\r\n\r\n await HttpRequestHost.initialize(); // Initialize configuration for HTTP requests at the backend.\r\n\r\n this.backendVersion = require(\"../package.json\").version; // eslint-disable-line @typescript-eslint/no-var-requires\r\n initializeRpcBackend();\r\n\r\n if (this._platform === undefined) {\r\n try {\r\n this.loadNative();\r\n } catch (error) {\r\n Logger.logError(loggerCategory, \"Error registering/loading the native platform API\", () => (configuration));\r\n throw error;\r\n }\r\n }\r\n\r\n if (configuration.crashReportingConfig && configuration.crashReportingConfig.crashDir && !ProcessDetector.isElectronAppBackend && !ProcessDetector.isMobileAppBackend) {\r\n this.platform.setCrashReporting(configuration.crashReportingConfig);\r\n\r\n Logger.logTrace(loggerCategory, \"Configured crash reporting\", () => ({\r\n enableCrashDumps: configuration.crashReportingConfig?.enableCrashDumps,\r\n wantFullMemoryDumps: configuration.crashReportingConfig?.wantFullMemoryDumps,\r\n enableNodeReport: configuration.crashReportingConfig?.enableNodeReport,\r\n uploadToBentley: configuration.crashReportingConfig?.uploadToBentley,\r\n }));\r\n\r\n if (configuration.crashReportingConfig.enableNodeReport) {\r\n try {\r\n // node-report reports on V8 fatal errors and unhandled exceptions/Promise rejections.\r\n const nodereport = require(\"node-report/api\"); // eslint-disable-line @typescript-eslint/no-var-requires\r\n nodereport.setEvents(\"exception+fatalerror+apicall\");\r\n nodereport.setDirectory(configuration.crashReportingConfig.crashDir);\r\n nodereport.setVerbose(\"yes\");\r\n Logger.logTrace(loggerCategory, \"Configured native crash reporting (node-report)\");\r\n } catch (err) {\r\n Logger.logWarning(loggerCategory, \"node-report is not installed.\");\r\n }\r\n }\r\n }\r\n\r\n this.setupCacheDirs(configuration);\r\n IModelHubBackend.setIModelClient(configuration.imodelClient);\r\n BriefcaseManager.initialize(this._briefcaseCacheDir);\r\n\r\n [\r\n IModelReadRpcImpl,\r\n IModelTileRpcImpl,\r\n SnapshotIModelRpcImpl,\r\n WipRpcImpl,\r\n DevToolsRpcImpl,\r\n ].forEach((rpc) => rpc.register()); // register all of the RPC implementations\r\n\r\n [\r\n BisCoreSchema,\r\n GenericSchema,\r\n FunctionalSchema,\r\n ].forEach((schema) => schema.registerSchema()); // register all of the schemas\r\n\r\n IModelHost._hubAccess = IModelHubBackend;\r\n IModelHost.configuration = configuration;\r\n IModelHost.setupTileCache();\r\n\r\n this.platform.setUseTileCache(configuration.tileCacheCredentials ? false : true);\r\n\r\n process.once(\"beforeExit\", IModelHost.shutdown);\r\n IModelHost.onAfterStartup.raiseEvent();\r\n }\r\n\r\n private static _briefcaseCacheDir: string;\r\n\r\n private static logStartup() {\r\n if (!Logger.isEnabled(loggerCategory, LogLevel.Trace))\r\n return;\r\n\r\n // Extract the iModel details from environment - note this is very specific to Bentley hosted backends, but is quite useful for tracing\r\n let startupInfo: any = {};\r\n const serviceName = process.env.FABRIC_SERVICE_NAME;\r\n if (serviceName) {\r\n // e.g., fabric:/iModelWebViewer3.0/iModelJSGuest/1/08daaeb3-b56f-480b-9051-7efc834d18ae/512d971d-b641-4735-bb1c-c07ab3e44ce7/c1315fcce125ca40b2d405bb7809214daf8b4c85\r\n const serviceNameComponents = serviceName.split(\"/\");\r\n if (serviceNameComponents.length === 7) {\r\n startupInfo = {\r\n ...startupInfo,\r\n contextId: serviceNameComponents[4],\r\n iModelId: serviceNameComponents[5],\r\n changeSetId: serviceNameComponents[6],\r\n };\r\n }\r\n }\r\n\r\n Logger.logTrace(loggerCategory, \"IModelHost.startup\", () => startupInfo);\r\n }\r\n\r\n private static setupCacheDirs(configuration: IModelHostConfiguration) {\r\n this._cacheDir = configuration.cacheDir ? path.normalize(configuration.cacheDir) : NativeLibrary.defaultCacheDir;\r\n IModelJsFs.recursiveMkDirSync(this._cacheDir); // make sure the directory for cacheDir exists.\r\n this._briefcaseCacheDir = path.join(this._cacheDir, \"imodels\");\r\n }\r\n\r\n /** This method must be called when an iModel.js services is shut down. Raises [[onBeforeShutdown]] */\r\n public static async shutdown(): Promise<void> {\r\n // NB: This method is set as a node listener where `this` is unbound\r\n if (!IModelHost._isValid)\r\n return;\r\n\r\n IModelHost._isValid = false;\r\n IModelHost.onBeforeShutdown.raiseEvent();\r\n IModelHost.configuration = undefined;\r\n process.removeListener(\"beforeExit\", IModelHost.shutdown);\r\n }\r\n\r\n /**\r\n * Add or update a property that should be included in a crash report.\r\n * @param name The name of the property\r\n * @param value The value of the property\r\n * @alpha\r\n */\r\n public static setCrashReportProperty(name: string, value: string): void {\r\n assert(undefined !== this._platform);\r\n this._platform.setCrashReportProperty(name, value);\r\n }\r\n\r\n /**\r\n * Remove a previously defined property so that will not be included in a crash report.\r\n * @param name The name of the property\r\n * @alpha\r\n */\r\n public static removeCrashReportProperty(name: string): void {\r\n assert(undefined !== this._platform);\r\n this._platform.setCrashReportProperty(name, undefined);\r\n }\r\n\r\n /**\r\n * Get all properties that will be included in a crash report.\r\n * @alpha\r\n */\r\n public static getCrashReportProperties(): CrashReportingConfigNameValuePair[] {\r\n assert(undefined !== this._platform);\r\n return this._platform.getCrashReportProperties();\r\n }\r\n\r\n /** The directory where application assets may be found */\r\n public static get appAssetsDir(): string | undefined { return undefined !== IModelHost.configuration ? IModelHost.configuration.appAssetsDir : undefined; }\r\n\r\n /** The time, in milliseconds, for which [IModelTileRpcInterface.requestTileTreeProps]($common) should wait before returning a \"pending\" status.\r\n * @internal\r\n */\r\n public static get tileTreeRequestTimeout(): number {\r\n return undefined !== IModelHost.configuration ? IModelHost.configuration.tileTreeRequestTimeout : IModelHostConfiguration.defaultTileRequestTimeout;\r\n }\r\n /** The time, in milliseconds, for which [IModelTileRpcInterface.requestTileContent]($common) should wait before returning a \"pending\" status.\r\n * @internal\r\n */\r\n public static get tileContentRequestTimeout(): number {\r\n return undefined !== IModelHost.configuration ? IModelHost.configuration.tileContentRequestTimeout : IModelHostConfiguration.defaultTileRequestTimeout;\r\n }\r\n\r\n /** The backend will log when a tile took longer to load than this threshold in seconds. */\r\n public static get logTileLoadTimeThreshold(): number { return undefined !== IModelHost.configuration ? IModelHost.configuration.logTileLoadTimeThreshold : IModelHostConfiguration.defaultLogTileLoadTimeThreshold; }\r\n /** The backend will log when a tile is loaded with a size in bytes above this threshold. */\r\n public static get logTileSizeThreshold(): number { return undefined !== IModelHost.configuration ? IModelHost.configuration.logTileSizeThreshold : IModelHostConfiguration.defaultLogTileSizeThreshold; }\r\n\r\n /** Whether external tile caching is active.\r\n * @internal\r\n */\r\n public static get usingExternalTileCache(): boolean {\r\n return undefined !== IModelHost.configuration?.tileCacheCredentials;\r\n }\r\n\r\n /** Whether to restrict tile cache URLs by client IP address.\r\n * @internal\r\n */\r\n public static get restrictTileUrlsByClientIp(): boolean { return undefined !== IModelHost.configuration && (IModelHost.configuration.restrictTileUrlsByClientIp ? true : false); }\r\n\r\n /** Whether to compress cached tiles.\r\n * @internal\r\n */\r\n public static get compressCachedTiles(): boolean { return false !== IModelHost.configuration?.compressCachedTiles; }\r\n\r\n private static setupTileCache() {\r\n const config = IModelHost.configuration!;\r\n const credentials = config.tileCacheCredentials;\r\n if (undefined === credentials)\r\n return;\r\n\r\n IModelHost.tileUploader = new CloudStorageTileUploader();\r\n\r\n if (credentials.service === \"azure\" && !IModelHost.tileCacheService) {\r\n IModelHost.tileCacheService = new AzureBlobStorage(credentials);\r\n } else if (credentials.service === \"alicloud\") {\r\n IModelHost.tileCacheService = new AliCloudStorageService(credentials);\r\n } else if (credentials.service !== \"external\") {\r\n throw new IModelError(BentleyStatus.ERROR, \"Unsupported cloud service credentials for tile cache.\");\r\n }\r\n }\r\n}\r\n\r\n/** Information about the platform on which the app is running. Also see [[KnownLocations]] and [[IModelJsFs]].\r\n * @public\r\n */\r\nexport class Platform {\r\n /** Get the name of the platform. */\r\n public static get platformName(): \"win32\" | \"linux\" | \"darwin\" | \"ios\" | \"android\" | \"uwp\" {\r\n return process.platform as any;\r\n }\r\n\r\n /** @internal */\r\n public static load(): typeof IModelJsNative {\r\n return ProcessDetector.isMobileAppBackend ? (process as any)._linkedBinding(\"iModelJsNative\") : NativeLibrary.load();\r\n }\r\n}\r\n\r\n/** Well known directories that may be used by the application. Also see [[Platform]]\r\n * @public\r\n */\r\nexport class KnownLocations {\r\n\r\n /** The directory where the imodeljs-native assets are stored. */\r\n public static get nativeAssetsDir(): string { return IModelHost.platform.DgnDb.getAssetsDir(); }\r\n\r\n /** The directory where the core-backend assets are stored. */\r\n public static get packageAssetsDir(): string {\r\n return path.join(__dirname, \"assets\");\r\n }\r\n\r\n /** The temporary directory. */\r\n public static get tmpdir(): string {\r\n return os.tmpdir();\r\n }\r\n}\r\n\r\n/** Extend this class to provide custom file name resolution behavior.\r\n * @note Only `tryResolveKey` and/or `tryResolveFileName` need to be overridden as the implementations of `resolveKey` and `resolveFileName` work for most purposes.\r\n * @see [[IModelHost.snapshotFileNameResolver]]\r\n * @public\r\n */\r\nexport abstract class FileNameResolver {\r\n /** Resolve a file name from the specified key.\r\n * @param _fileKey The key that identifies the file name in a `Map` or other similar data structure.\r\n * @returns The resolved file name or `undefined` if not found.\r\n */\r\n public tryResolveKey(_fileKey: string): string | undefined { return undefined; }\r\n /** Resolve a file name from the specified key.\r\n * @param fileKey The key that identifies the file name in a `Map` or other similar data structure.\r\n * @returns The resolved file name.\r\n * @throws [[IModelError]] if not found.\r\n */\r\n public resolveKey(fileKey: string): string {\r\n const resolvedFileName: string | undefined = this.tryResolveKey(fileKey);\r\n if (undefined === resolvedFileName) {\r\n throw new IModelError(IModelStatus.NotFound, `${fileKey} not resolved`);\r\n }\r\n return resolvedFileName;\r\n }\r\n /** Resolve the input file name, which may be a partial name, into a full path file name.\r\n * @param inFileName The partial file name.\r\n * @returns The resolved full path file name or `undefined` if not found.\r\n */\r\n public tryResolveFileName(inFileName: string): string | undefined { return inFileName; }\r\n /** Resolve the input file name, which may be a partial name, into a full path file name.\r\n * @param inFileName The partial file name.\r\n * @returns The resolved full path file name.\r\n * @throws [[IModelError]] if not found.\r\n */\r\n public resolveFileName(inFileName: string): string {\r\n const resolvedFileName: string | undefined = this.tryResolveFileName(inFileName);\r\n if (undefined === resolvedFileName) {\r\n throw new IModelError(IModelStatus.NotFound, `${inFileName} not resolved`);\r\n }\r\n return resolvedFileName;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IModelHubBackend.d.ts","sourceRoot":"","sources":["../src/IModelHubBackend.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAiC,UAAU,EAAmD,MAAM,qBAAqB,CAAC;AACjI,OAAO,EACW,SAAS,EAA8G,YAAY,EACrH,IAAI,EACnC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACa,kBAAkB,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAe,aAAa,EAAE,YAAY,EACvI,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,wBAAwB,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,oBAAoB,EAAE,WAAW,EAC3I,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,uBAAuB,EAC9D,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAKtD,gBAAgB;AAChB,qBAAa,gBAAgB;IAE3B,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAe;IAC5C,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAAS;IAC3C,OAAO,CAAC,MAAM,CAAC,UAAU,CAA+H;WAE1I,eAAe,CAAC,MAAM,CAAC,EAAE,YAAY;IAKnD,WAAkB,uBAAuB,IAAI,OAAO,CAEnD;IAED,WAAkB,YAAY,IAAI,YAAY,CAK7C;mBAEoB,cAAc;WAGf,kBAAkB,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC;WAM7D,4BAA4B,CAAC,GAAG,EAAE,WAAW,GAAG;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,cAAc,CAAC;WASjG,uBAAuB,CAAC,GAAG,EAAE,WAAW,GAAG;QAAE,OAAO,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,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC5E,CAAC;;AAlYH,4CAmYC;AAhYgB,oCAAmB,GAAG,KAAK,CAAC;AAC5B,2BAAU,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,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 HubAccess\r\n */\r\n\r\nimport { join } from \"path\";\r\nimport { AzureFileHandler } from \"@bentley/backend-itwin-client\";\r\nimport { BentleyError, BriefcaseStatus, GuidString, IModelHubStatus, IModelStatus, Logger, OpenMode } from \"@itwin/core-bentley\";\r\nimport {\r\n BriefcaseQuery, ChangeSet, ChangeSetQuery, ChangesType, CheckpointQuery, CheckpointV2, CheckpointV2Query, CodeQuery, IModelBankClient, IModelClient,\r\n IModelHubClient, IModelQuery, Lock, LockQuery, LockType, VersionQuery,\r\n} from \"@bentley/imodelhub-client\";\r\nimport {\r\n BriefcaseIdValue, ChangesetFileProps, ChangesetId, ChangesetIndex, ChangesetProps, CodeProps, IModelError, IModelVersion, LocalDirName,\r\n} from \"@itwin/core-common\";\r\nimport { ProgressCallback, UserCancelledError } from \"@bentley/itwin-client\";\r\nimport {\r\n AcquireNewBriefcaseIdArg, BriefcaseDbArg, BriefcaseIdArg, ChangesetArg, ChangesetRangeArg, CheckPointArg, CreateNewIModelProps, IModelIdArg,\r\n IModelNameArg, ITwinIdArg, LockProps, V2CheckpointAccessProps,\r\n} from \"./BackendHubAccess\";\r\nimport { BriefcaseManager } from \"./BriefcaseManager\";\r\nimport { CheckpointProps } from \"./CheckpointManager\";\r\nimport { BriefcaseLocalValue, IModelDb, SnapshotDb, TokenArg } from \"./IModelDb\";\r\nimport { IModelHost } from \"./IModelHost\";\r\nimport { IModelJsFs } from \"./IModelJsFs\";\r\n\r\n/** @internal */\r\nexport class IModelHubBackend {\r\n\r\n private static _imodelClient?: IModelClient;\r\n private static _isIModelBankClient = false;\r\n private static changeSet0 = { id: \"\", changesType: 0, description: \"revision0\", parentId: \"\", briefcaseId: 0, pushDate: \"\", userCreated: \"\", index: 0 };\r\n\r\n public static setIModelClient(client?: IModelClient) {\r\n this._imodelClient = client;\r\n this._isIModelBankClient = client instanceof IModelBankClient;\r\n }\r\n\r\n public static get isUsingIModelBankClient(): boolean {\r\n return this._isIModelBankClient;\r\n }\r\n\r\n public static get iModelClient(): IModelClient {\r\n if (!this._imodelClient)\r\n this._imodelClient = new IModelHubClient(new AzureFileHandler());\r\n\r\n return this._imodelClient;\r\n }\r\n\r\n private static async getAccessToken(arg: TokenArg) {\r\n return arg.accessToken ?? await IModelHost.getAccessToken();\r\n }\r\n public static async getLatestChangeset(arg: IModelIdArg): Promise<ChangesetProps> {\r\n const accessToken = await this.getAccessToken(arg);\r\n const changeSets: ChangeSet[] = await this.iModelClient.changeSets.get(accessToken, arg.iModelId, new ChangeSetQuery().top(1).latest());\r\n return (changeSets.length === 0) ? this.changeSet0 : this.toChangeSetProps(changeSets[changeSets.length - 1]);\r\n }\r\n\r\n public static async getChangesetFromNamedVersion(arg: IModelIdArg & { versionName: string }): Promise<ChangesetProps> {\r\n const accessToken = await this.getAccessToken(arg);\r\n const versions = await this.iModelClient.versions.get(accessToken, arg.iModelId, new VersionQuery().select(\"ChangeSetId\").byName(arg.versionName));\r\n if (!versions[0] || !versions[0].changeSetId)\r\n throw new IModelError(IModelStatus.NotFound, `Named version ${arg.versionName} not found`);\r\n\r\n return this.queryChangeset({ ...arg, changeset: { id: versions[0].changeSetId } });\r\n }\r\n\r\n public static async getChangesetFromVersion(arg: IModelIdArg & { version: IModelVersion }): Promise<ChangesetProps> {\r\n const version = arg.version;\r\n if (version.isFirst)\r\n return this.queryChangeset({ ...arg, changeset: { index: 0 } });\r\n\r\n const asOf = version.getAsOfChangeSet();\r\n if (asOf)\r\n return this.queryChangeset({ ...arg, changeset: { id: asOf } });\r\n\r\n const versionName = version.getName();\r\n if (versionName)\r\n return this.getChangesetFromNamedVersion({ ...arg, versionName });\r\n\r\n return this.getLatestChangeset(arg);\r\n }\r\n\r\n public static async createNewIModel(arg: CreateNewIModelProps): Promise<GuidString> {\r\n if (this.isUsingIModelBankClient)\r\n throw new IModelError(IModelStatus.BadRequest, \"This is a iModelHub only operation\");\r\n\r\n const revision0 = join(IModelHost.cacheDir, \"temp-revision0.bim\");\r\n IModelJsFs.removeSync(revision0);\r\n if (!arg.revision0) { // if they didn't supply a revision0 file, create a blank one.\r\n const blank = SnapshotDb.createEmpty(revision0, { rootSubject: { name: arg.description ?? arg.iModelName } });\r\n blank.saveChanges();\r\n blank.close();\r\n } else {\r\n IModelJsFs.copySync(revision0, arg.revision0);\r\n }\r\n\r\n const nativeDb = IModelDb.openDgnDb({ path: revision0 }, OpenMode.ReadWrite);\r\n try {\r\n nativeDb.setITwinId(arg.iTwinId);\r\n // nativeDb.setDbGuid(this.iModelId); NEEDS_WORK - iModelHub should accept this value, not create it.\r\n nativeDb.saveChanges();\r\n nativeDb.deleteAllTxns(); // necessary before resetting briefcaseId\r\n nativeDb.resetBriefcaseId(BriefcaseIdValue.Unassigned);\r\n nativeDb.saveLocalValue(BriefcaseLocalValue.NoLocking, arg.noLocks ? \"true\" : undefined);\r\n nativeDb.saveChanges();\r\n } finally {\r\n nativeDb.closeIModel();\r\n }\r\n\r\n const accessToken = await this.getAccessToken(arg);\r\n const hubIModel = await this.iModelClient.iModels.create(accessToken, arg.iTwinId, arg.iModelName, { path: revision0, description: arg.description });\r\n IModelJsFs.removeSync(revision0);\r\n return hubIModel.wsgId;\r\n }\r\n\r\n public static async deleteIModel(arg: IModelIdArg & ITwinIdArg): Promise<void> {\r\n const dirName = BriefcaseManager.getIModelPath(arg.iModelId);\r\n if (IModelJsFs.existsSync(dirName)) {\r\n IModelJsFs.purgeDirSync(dirName);\r\n IModelJsFs.rmdirSync(dirName);\r\n }\r\n\r\n const accessToken = await this.getAccessToken(arg);\r\n return this.iModelClient.iModels.delete(accessToken, arg.iTwinId, arg.iModelId);\r\n }\r\n\r\n public static async queryIModelByName(arg: IModelNameArg): Promise<GuidString | undefined> {\r\n const accessToken = await this.getAccessToken(arg);\r\n const iModels = await this.iModelClient.iModels.get(accessToken, arg.iTwinId, new IModelQuery().byName(arg.iModelName));\r\n return iModels.length === 0 ? undefined : iModels[0].id!;\r\n }\r\n\r\n public static async pushChangeset(arg: IModelIdArg & { changesetProps: ChangesetFileProps }): Promise<ChangesetIndex> {\r\n const changeset = new ChangeSet();\r\n const changesetProps = arg.changesetProps;\r\n changeset.id = changesetProps.id;\r\n changeset.parentId = changesetProps.parentId;\r\n changeset.changesType = changesetProps.changesType as number;\r\n changeset.fileSize = changesetProps.size!.toString();\r\n changeset.description = changesetProps.description;\r\n changeset.briefcaseId = changesetProps.briefcaseId;\r\n if (changeset.description.length >= 255) {\r\n Logger.logWarning(\"imodelhub-access\", `pushChanges - Truncating description to 255 characters. ${changeset.description}`);\r\n changeset.description = changeset.description.slice(0, 254);\r\n }\r\n\r\n const accessToken = await this.getAccessToken(arg);\r\n return +(await this.iModelClient.changeSets.create(accessToken, arg.iModelId, changeset, changesetProps.pathname)).index!;\r\n }\r\n\r\n /** Releases a briefcaseId from iModelHub. After this call it is illegal to generate changesets for the released briefcaseId.\r\n * @note generally, this method should not be called directly. Instead use [[deleteBriefcaseFiles]].\r\n * @see deleteBriefcaseFiles\r\n */\r\n public static async releaseBriefcase(arg: BriefcaseIdArg): Promise<void> {\r\n const { briefcaseId, iModelId } = arg;\r\n const accessToken = await this.getAccessToken(arg);\r\n try {\r\n await this.iModelClient.briefcases.get(accessToken, iModelId, new BriefcaseQuery().byId(briefcaseId));\r\n } catch (error) {\r\n throw error;\r\n }\r\n\r\n await this.iModelClient.briefcases.delete(accessToken, iModelId, briefcaseId);\r\n }\r\n\r\n public static async getMyBriefcaseIds(arg: IModelIdArg): Promise<number[]> {\r\n const accessToken = await this.getAccessToken(arg);\r\n const myHubBriefcases = await this.iModelClient.briefcases.get(accessToken, arg.iModelId, new BriefcaseQuery().ownedByMe().selectDownloadUrl());\r\n const myBriefcaseIds: number[] = [];\r\n for (const hubBc of myHubBriefcases)\r\n myBriefcaseIds.push(hubBc.briefcaseId!); // save the list of briefcaseIds we already own.\r\n return myBriefcaseIds;\r\n }\r\n\r\n public static async acquireNewBriefcaseId(arg: AcquireNewBriefcaseIdArg): Promise<number> {\r\n const accessToken = await this.getAccessToken(arg);\r\n const briefcase = await this.iModelClient.briefcases.create(accessToken, arg.iModelId);\r\n\r\n if (!briefcase)\r\n throw new IModelError(BriefcaseStatus.CannotAcquire, \"Could not acquire briefcase\");\r\n\r\n return briefcase.briefcaseId!;\r\n }\r\n\r\n public static toChangeSetProps(cs: ChangeSet): ChangesetProps {\r\n return {\r\n id: cs.wsgId, parentId: cs.parentId ? cs.parentId : \"\", briefcaseId: cs.briefcaseId!, pushDate: cs.pushDate!,\r\n description: cs.description ?? \"\", changesType: (cs.changesType ?? ChangesType.Regular) as number, userCreated: cs.userCreated!,\r\n index: +cs.index!,\r\n };\r\n }\r\n private static toChangeSetFileProps(cs: ChangeSet, basePath: string): ChangesetFileProps {\r\n const csProps = this.toChangeSetProps(cs) as ChangesetFileProps;\r\n csProps.pathname = join(basePath, cs.fileName!);\r\n return csProps;\r\n }\r\n\r\n public static async downloadChangeset(arg: ChangesetArg & { targetDir: LocalDirName }): Promise<ChangesetFileProps> {\r\n const accessToken = await this.getAccessToken(arg);\r\n const changeSetsPath = BriefcaseManager.getChangeSetsPath(arg.iModelId);\r\n\r\n // NEEDS_WORK - allow download by index\r\n const cSet = await this.queryChangeset(arg);\r\n const changeSets = await this.iModelClient.changeSets.download(accessToken, arg.iModelId, new ChangeSetQuery().byId(cSet.id), changeSetsPath);\r\n if (undefined === changeSets)\r\n throw new IModelError(IModelStatus.NotFound, `Cannot download changeset`);\r\n\r\n return this.toChangeSetFileProps(changeSets[0], arg.targetDir);\r\n }\r\n\r\n public static async queryChangeset(arg: ChangesetArg): Promise<ChangesetProps> {\r\n const hasIndex = (undefined !== arg.changeset.index);\r\n if ((hasIndex && arg.changeset.index <= 0) || arg.changeset.id === \"\")\r\n return this.changeSet0;\r\n\r\n const query = new ChangeSetQuery();\r\n if (hasIndex)\r\n query.filter(`Index+eq+${arg.changeset.index}`);\r\n else\r\n query.byId(arg.changeset.id);\r\n\r\n const accessToken = await this.getAccessToken(arg);\r\n const changeSets = await this.iModelClient.changeSets.get(accessToken, arg.iModelId, query);\r\n if (undefined === changeSets)\r\n throw new IModelError(IModelStatus.NotFound, `Changeset not found`);\r\n\r\n return this.toChangeSetProps(changeSets[0]);\r\n }\r\n\r\n private static async getQueryFromRange(arg: ChangesetRangeArg): Promise<ChangeSetQuery | undefined> {\r\n const query = new ChangeSetQuery();\r\n if (!arg.range)\r\n return query; // returns all changesets\r\n\r\n const range = arg.range;\r\n const after = range.first === 0 ? \"\" : (await this.queryChangeset({ ...arg, changeset: { index: range.first } })).parentId;\r\n\r\n if (!range.end)\r\n query.fromId(after); //\r\n else {\r\n const last = (await this.queryChangeset({ ...arg, changeset: { index: range.end } })).id;\r\n if (range.end === 0 || after === last)\r\n return undefined;\r\n query.betweenChangeSets(last, after); // note: weird order is necessary because second arg being blank means \"from start\"\r\n }\r\n\r\n return query;\r\n }\r\n\r\n /** queries for change sets in the specified range. */\r\n public static async queryChangesets(arg: ChangesetRangeArg): Promise<ChangesetProps[]> {\r\n const query = await this.getQueryFromRange(arg);\r\n const val: ChangesetProps[] = [];\r\n if (query) {\r\n const accessToken = await this.getAccessToken(arg);\r\n const changeSets = await this.iModelClient.changeSets.get(accessToken, arg.iModelId, query);\r\n\r\n for (const cs of changeSets)\r\n val.push(this.toChangeSetProps(cs));\r\n }\r\n return val;\r\n }\r\n\r\n /** Downloads change sets in the specified range. */\r\n public static async downloadChangesets(arg: ChangesetRangeArg & { targetDir: LocalDirName }): Promise<ChangesetFileProps[]> {\r\n const val: ChangesetFileProps[] = [];\r\n const query = await this.getQueryFromRange(arg);\r\n if (query) {\r\n const accessToken = await this.getAccessToken(arg);\r\n const changeSets = await this.iModelClient.changeSets.download(accessToken, arg.iModelId, query, arg.targetDir);\r\n\r\n for (const cs of changeSets)\r\n val.push(this.toChangeSetFileProps(cs, arg.targetDir));\r\n }\r\n return val;\r\n }\r\n\r\n public static async downloadV1Checkpoint(arg: CheckPointArg): Promise<ChangesetId> {\r\n const checkpoint = arg.checkpoint;\r\n let checkpointQuery = new CheckpointQuery().selectDownloadUrl();\r\n checkpointQuery = checkpointQuery.precedingCheckpoint(checkpoint.changeset.id);\r\n const accessToken = await this.getAccessToken(checkpoint);\r\n const checkpoints = await this.iModelClient.checkpoints.get(accessToken, checkpoint.iModelId, checkpointQuery);\r\n if (checkpoints.length !== 1)\r\n throw new IModelError(BriefcaseStatus.VersionNotFound, \"no checkpoints not found\");\r\n\r\n const cancelRequest: any = {};\r\n const progressCallback: ProgressCallback = (progress) => {\r\n if (arg.onProgress && arg.onProgress(progress.loaded, progress.total!) !== 0)\r\n cancelRequest.cancel?.();\r\n };\r\n\r\n await this.iModelClient.checkpoints.download(accessToken, checkpoints[0], arg.localFile, progressCallback, cancelRequest);\r\n return checkpoints[0].mergedChangeSetId!;\r\n }\r\n\r\n public static async queryV2Checkpoint(arg: CheckpointProps): Promise<V2CheckpointAccessProps | undefined> {\r\n const checkpointQuery = new CheckpointV2Query().byChangeSetId(arg.changeset.id).selectContainerAccessKey();\r\n const accessToken = await this.getAccessToken(arg);\r\n const checkpoints = await this.iModelClient.checkpointsV2.get(accessToken, arg.iModelId, checkpointQuery);\r\n if (checkpoints.length < 1)\r\n return undefined;\r\n\r\n const { containerAccessKeyContainer, containerAccessKeySAS, containerAccessKeyAccount, containerAccessKeyDbName } = checkpoints[0];\r\n if (!containerAccessKeyContainer || !containerAccessKeySAS || !containerAccessKeyAccount || !containerAccessKeyDbName)\r\n throw new Error(\"Invalid V2 checkpoint in iModelHub\");\r\n\r\n return {\r\n container: containerAccessKeyContainer,\r\n auth: containerAccessKeySAS,\r\n user: containerAccessKeyAccount,\r\n dbAlias: containerAccessKeyDbName,\r\n storageType: \"azure?sas=1\",\r\n };\r\n }\r\n\r\n public static async downloadV2Checkpoint(arg: CheckPointArg): Promise<ChangesetId> {\r\n const checkpoint = arg.checkpoint;\r\n let checkpointQuery = new CheckpointV2Query();\r\n checkpointQuery = checkpointQuery.precedingCheckpointV2(checkpoint.changeset.id).selectContainerAccessKey();\r\n const accessToken = await this.getAccessToken(checkpoint);\r\n let checkpoints: CheckpointV2[] = [];\r\n try {\r\n checkpoints = await this.iModelClient.checkpointsV2.get(accessToken, checkpoint.iModelId, checkpointQuery);\r\n } catch (error) {\r\n if (error instanceof BentleyError && error.errorNumber === IModelHubStatus.Unknown)\r\n throw new IModelError(IModelStatus.NotFound, \"V2 checkpoints not supported\");\r\n throw error;\r\n }\r\n\r\n if (checkpoints.length !== 1)\r\n throw new IModelError(IModelStatus.NotFound, \"V2 checkpoint not found\");\r\n\r\n const { containerAccessKeyContainer, containerAccessKeySAS, containerAccessKeyAccount, containerAccessKeyDbName } = checkpoints[0];\r\n if (!containerAccessKeyContainer || !containerAccessKeySAS || !containerAccessKeyAccount || !containerAccessKeyDbName)\r\n throw new IModelError(IModelStatus.NotFound, \"invalid V2 checkpoint\");\r\n\r\n const downloader = new IModelHost.platform.DownloadV2Checkpoint({\r\n container: containerAccessKeyContainer,\r\n auth: containerAccessKeySAS,\r\n storageType: \"azure?sas=1\",\r\n user: containerAccessKeyAccount,\r\n dbAlias: containerAccessKeyDbName,\r\n writeable: false,\r\n localFile: arg.localFile,\r\n });\r\n\r\n let timer: NodeJS.Timeout | undefined;\r\n try {\r\n let total = 0;\r\n const onProgress = arg.onProgress;\r\n if (onProgress) {\r\n timer = setInterval(async () => { // set an interval timer to show progress every 250ms\r\n const progress = downloader.getProgress();\r\n total = progress.total;\r\n if (onProgress(progress.loaded, progress.total))\r\n downloader.cancelDownload();\r\n }, 250);\r\n }\r\n await downloader.downloadPromise;\r\n onProgress?.(total, total); // make sure we call progress func one last time when download completes\r\n } catch (err: any) {\r\n throw (err.message === \"cancelled\") ? new UserCancelledError(BriefcaseStatus.DownloadCancelled, \"download cancelled\") : err;\r\n } finally {\r\n if (timer)\r\n clearInterval(timer);\r\n }\r\n return checkpoints[0].changeSetId!;\r\n }\r\n\r\n public static async releaseAllLocks(arg: BriefcaseDbArg) {\r\n const accessToken = await this.getAccessToken(arg);\r\n return this.iModelClient.locks.deleteAll(accessToken, arg.iModelId, arg.briefcaseId);\r\n }\r\n\r\n public static async releaseAllCodes(arg: BriefcaseDbArg) {\r\n const accessToken = await this.getAccessToken(arg);\r\n return this.iModelClient.codes.deleteAll(accessToken, arg.iModelId, arg.briefcaseId);\r\n }\r\n\r\n public static async queryAllLocks(arg: BriefcaseDbArg): Promise<LockProps[]> {\r\n const accessToken = await this.getAccessToken(arg);\r\n const heldLocks = await this.iModelClient.locks.get(accessToken, arg.iModelId, new LockQuery().byBriefcaseId(arg.briefcaseId));\r\n return heldLocks.map((lock) => ({ id: lock.objectId!, state: lock.lockLevel! as number }));\r\n }\r\n\r\n public static async queryAllCodes(arg: BriefcaseDbArg): Promise<CodeProps[]> {\r\n const accessToken = await this.getAccessToken(arg);\r\n const reservedCodes = await this.iModelClient.codes.get(accessToken, arg.iModelId, new CodeQuery().byBriefcaseId(arg.briefcaseId));\r\n return reservedCodes.map((code) => ({ spec: code.codeSpecId!, scope: code.codeScope!, value: code.value! }));\r\n }\r\n\r\n public static toHubLock(arg: BriefcaseDbArg, reqLock: LockProps): Lock {\r\n const lock = new Lock();\r\n lock.briefcaseId = arg.briefcaseId;\r\n lock.lockLevel = reqLock.state as number;\r\n lock.lockType = LockType.Element;\r\n lock.objectId = reqLock.id;\r\n lock.releasedWithChangeSet = arg.changeset.id;\r\n lock.seedFileId = arg.iModelId;\r\n return lock;\r\n }\r\n\r\n public static toHubLocks(arg: BriefcaseDbArg & { locks: LockProps[] }): Lock[] {\r\n return arg.locks.map((lock) => this.toHubLock(arg, lock));\r\n }\r\n\r\n public static async acquireLocks(arg: BriefcaseDbArg & { locks: LockProps[] }): Promise<void> {\r\n const hubLocks = this.toHubLocks(arg);\r\n const accessToken = await this.getAccessToken(arg);\r\n await this.iModelClient.locks.update(accessToken, arg.iModelId, hubLocks);\r\n }\r\n}\r\n"]}
|
package/lib/IModelJsFs.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IModelJsFs.d.ts","sourceRoot":"","sources":["../src/IModelJsFs.ts"],"names":[],"mappings":";AAeA;;GAEG;AACH,qBAAa,eAAe;IAEjB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,MAAM;IACf,OAAO,EAAE,MAAM;IACf,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,OAAO;IACpB,MAAM,EAAE,OAAO;IACf,QAAQ,EAAE,OAAO;IACjB,cAAc,EAAE,OAAO;IACvB,UAAU,EAAE,OAAO;gBARnB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,OAAO,EACpB,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,OAAO,EACjB,cAAc,EAAE,OAAO,EACvB,UAAU,EAAE,OAAO;CAE7B;AAED;;GAEG;AACH,qBAAa,UAAU;IAErB,oCAAoC;WACtB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAEnD,qBAAqB;WACP,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAEhD,mDAAmD;WACrC,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AAE;gBAC5C,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aACvB;SACF;QACD,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACnB,UAAU,CAAC,WAAW,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,uEAAuE;IAChE,MAAM,CAAC,kBAAkB,CAAC,OAAe;QAC9C,IAAI,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC;YAChC,OAAO;QACT,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACzC,IAAI,UAAU,KAAK,OAAO;YACxB,UAAU,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;QAC5C,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAED,sCAAsC;IAC/B,MAAM,CAAC,YAAY,CAAC,OAAe;QACxC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC;YACjC,OAAO;QAET,UAAU,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,QAAgB,EAAE,KAAc,EAAE,EAAE;YACnE,IAAI,KAAK,EAAE;gBACT,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;gBAClC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;aACjC;iBAAM;gBACL,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;aACjC;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAhID,gCAgIC","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\n/** @packageDocumentation\n * @module Portability\n */\n\n// cspell: ignore wflag\n\nimport * as fs from \"fs-extra\";\nimport * as path from \"path\";\n\n/* TODO: define File Mode Constants: S_IWUSR, et al. */\n/** Information about a file. See [[IModelJsFs.lstatSync]]\n * @public\n */\nexport class IModelJsFsStats {\n constructor(\n public size: number,\n public atimeMs: number,\n public mtimeMs: number,\n public birthtimeMs: number,\n public isDirectory: boolean,\n public isFile: boolean,\n public isSocket: boolean,\n public isSymbolicLink: boolean,\n public isReadOnly: boolean,\n ) { }\n}\n\n/** File system operations that are defined on all platforms. See also [[Platform]] and [[KnownLocations]]\n * @public\n */\nexport class IModelJsFs {\n\n /** Does file or directory exist? */\n public static existsSync(pathname: string): boolean { return fs.existsSync(pathname); }\n\n /** Delete a file. */\n public static unlinkSync(pathname: string): void { fs.unlinkSync(pathname); }\n\n /** Delete a file or remove a directory (rm -r). */\n public static removeSync(pathname: string): void { fs.removeSync(pathname); }\n\n /** Create a directory. */\n public static mkdirSync(pathname: string): void { fs.mkdirSync(pathname); }\n\n /** Remove a directory. */\n public static rmdirSync(pathname: string): void { fs.rmdirSync(pathname); }\n\n /** Write to a file. */\n public static writeFileSync(pathname: string, data: string | Uint8Array, wflag: string = \"w\"): void { fs.writeFileSync(pathname, data, { flag: wflag }); }\n\n /** Append to a file. */\n public static appendFileSync(pathname: string, str: string): void { fs.appendFileSync(pathname, str); }\n\n /** Make a copy of a file */\n public static copySync(src: string, dest: string, opts?: any): void { fs.copySync(src, dest, opts); }\n\n /** Get the file and directory names in the specified directory. Excludes \".\" and \"..\". */\n public static readdirSync(pathname: string): string[] { return fs.readdirSync(pathname); }\n\n /** Read file */\n public static readFileSync(pathname: string): string | Buffer { return fs.readFileSync(pathname); }\n\n /** Test if the current user has permission to write to a file. */\n private static isFileWritable(pathname: string): boolean {\n try {\n fs.accessSync(pathname, fs.constants.W_OK);\n return true;\n } catch (_err) {\n return false;\n }\n }\n\n /** Get information about a file. */\n public static lstatSync(pathname: string): IModelJsFsStats | undefined {\n const stats = fs.lstatSync(pathname);\n if (stats === undefined)\n return undefined;\n\n return new IModelJsFsStats(\n stats.size,\n stats.atime.getTime(),\n stats.mtime.getTime(),\n stats.birthtime.getTime(),\n stats.isDirectory(),\n stats.isFile(),\n stats.isSocket(),\n stats.isSymbolicLink(),\n !IModelJsFs.isFileWritable(pathname));\n }\n\n /**\n * Finds files recursively based on a pattern\n * @param rootDir Directory from where to start searching for files.\n * @param pattern A Regex that would be match to basename of files including extension\n * @returns list of file that match the pattern.\n */\n public static recursiveFindSync(rootDir: string, pattern: RegExp): string[] {\n const files: string[] = [];\n IModelJsFs.walkDirSync(rootDir, (pathname: string, isDir: boolean) => {\n if (!isDir) {\n const fileName = path.basename(pathname);\n if (pattern.test(fileName)) {\n files.push(pathname);\n }\n }\n return true;\n });\n return files;\n }\n\n /**\n * Walks a directory in breadth first fashion\n * @param rootDir directory from where the traversal starts\n * @param cb callback that would be called with full path of file or directory\n */\n public static walkDirSync(rootDir: string, cb: (pathname: string, isDir: boolean) => boolean): void {\n const subDir = [];\n for (const childPath of IModelJsFs.readdirSync(rootDir)) {\n const fullPath = path.join(rootDir, childPath);\n const isDir = IModelJsFs.lstatSync(fullPath)?.isDirectory;\n if (!cb(fullPath, isDir!)) {\n return;\n }\n // Need to check if the directory still exists in case the callback has deleted it.\n if (isDir && IModelJsFs.existsSync(fullPath)) {\n subDir.push(fullPath);\n }\n }\n subDir.forEach((v) => {\n IModelJsFs.walkDirSync(v, cb);\n });\n }\n\n /** Create a directory, recursively setting up the path as necessary */\n public static recursiveMkDirSync(dirPath: string) {\n if (IModelJsFs.existsSync(dirPath))\n return;\n const parentPath = path.dirname(dirPath);\n if (parentPath !== dirPath)\n IModelJsFs.recursiveMkDirSync(parentPath);\n IModelJsFs.mkdirSync(dirPath);\n }\n\n /** Remove a directory, recursively */\n public static purgeDirSync(dirPath: string) {\n if (!IModelJsFs.existsSync(dirPath))\n return;\n\n IModelJsFs.walkDirSync(dirPath, (pathName: string, isDir: boolean) => {\n if (isDir) {\n IModelJsFs.purgeDirSync(pathName);\n IModelJsFs.removeSync(pathName);\n } else {\n IModelJsFs.unlinkSync(pathName);\n }\n return true;\n });\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IModelSchemaLoader.d.ts","sourceRoot":"","sources":["../src/IModelSchemaLoader.ts"],"names":[],"mappings":"AAMA,OAAO,EAA6B,MAAM,EAA6C,MAAM,0BAA0B,CAAC;AAGxH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;GAMG;AACH,qBAAa,kBAAkB;IAIV,OAAO,CAAC,OAAO;IAHlC,OAAO,CAAC,QAAQ,CAAgB;IAEhC,gBAAgB;gBACW,OAAO,EAAE,QAAQ;IAM5C;;;OAGG;IACI,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;IAQzD;;;OAGG;IACI,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;CAMzE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IModelSchemaLoader.js","sourceRoot":"","sources":["../src/IModelSchemaLoader.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,sDAAmD;AACnD,gEAAwH;AACxH,oDAAiD;AAIjD;;;;;;GAMG;AACH,MAAa,kBAAkB;IAG7B,gBAAgB;IAChB,YAA2B,OAAiB;QAAjB,YAAO,GAAP,OAAO,CAAU;QAC1C,IAAI,CAAC,QAAQ,GAAG,IAAI,iCAAa,EAAE,CAAC;QACpC,MAAM,OAAO,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtD,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IAED;;;OAGG;IACI,SAAS,CAAmB,UAAkB;QACnD,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,CAAC,MAAM;YACT,MAAM,IAAI,yBAAW,CAAC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S,KAAK,GAAG,CAAC,KAAK,EAAE;YAC3B,IAAI,2BAAY,CAAC,QAAQ,KAAK,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE;gBAC9C,OAAO,SAAS,CAAC;aAClB;YACD,MAAM,IAAI,yBAAW,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,kBAAkB,UAAU,EAAE,CAAC,CAAC;SACzE;QACD,OAAO,GAAG,CAAC,MAAM,CAAC;IACpB,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\r\nimport { IModelStatus } from \"@itwin/core-bentley\";\r\nimport { ECVersion, ISchemaLocater, Schema, SchemaContext, SchemaKey, SchemaMatchType } from \"@itwin/ecschema-metadata\";\r\nimport { IModelError } from \"@itwin/core-common\";\r\nimport { IModelJsNative } from \"@bentley/imodeljs-native\";\r\nimport { IModelDb } from \"./IModelDb\";\r\n\r\n/**\r\n * A utility class for retrieving EC Schema objects from an iModel. Loaded schemas are held in memory within\r\n * a schema context managed by IModelSchemaLoader. The IModelSchemaLoader object should be held in memory if\r\n * multiple calls to [[getSchema]] or [[tryGetSchema]] is a possibility, thereby avoiding unnecessary schema\r\n * retrievals from an iModel.\r\n * @alpha\r\n */\r\nexport class IModelSchemaLoader {\r\n private _context: SchemaContext;\r\n\r\n /** @internal */\r\n public constructor(private _iModel: IModelDb) {\r\n this._context = new SchemaContext();\r\n const locater = new IModelSchemaLocater(this._iModel);\r\n this._context.addLocater(locater);\r\n }\r\n\r\n /** Get a schema by name\r\n * @param schemaName a string with the name of the schema to load.\r\n * @throws [IModelError]($common) if the schema is not found or cannot be loaded.\r\n */\r\n public getSchema<T extends Schema>(schemaName: string): T {\r\n const schema = this.tryGetSchema(schemaName);\r\n if (!schema)\r\n throw new IModelError(IModelStatus.NotFound, `reading schema=${schemaName}`);\r\n\r\n return schema as T;\r\n }\r\n\r\n /** Attempts to get a schema by name\r\n * @param schemaName a string with the name of the schema to load.\r\n * @throws [IModelError]($common) if the schema exists, but cannot be loaded.\r\n */\r\n public tryGetSchema<T extends Schema>(schemaName: string): T | undefined {\r\n // SchemaKey version is not used when locating schema in an iModel, so the version is arbitrary.\r\n const key = new SchemaKey(schemaName, new ECVersion(1, 0, 0));\r\n const schema = this._context.getSchemaSync(key, SchemaMatchType.Latest);\r\n return schema as T;\r\n }\r\n}\r\n\r\n/**\r\n * A private ISchemaLocater implementation for locating and retrieving EC Schema objects from an iModel\r\n * @alpha\r\n */\r\nclass IModelSchemaLocater implements ISchemaLocater {\r\n /** @internal */\r\n public constructor(private _iModel: IModelDb) { }\r\n\r\n /** Get a schema by [SchemaKey]\r\n * @param schemaKey The [SchemaKey] that identifies the schema.\r\n * @param matchType The [SchemaMatchType] to used for comparing schema versions.\r\n * @param context The [SchemaContext] used to facilitate schema location.\r\n * @throws [IModelError]($common) if the schema exists, but cannot be loaded.\r\n */\r\n public async getSchema<T extends Schema>(schemaKey: SchemaKey, matchType: SchemaMatchType, context?: SchemaContext | undefined): Promise<T | undefined> {\r\n return this.getSchemaSync(schemaKey, matchType, context) as T;\r\n }\r\n\r\n /** Get a schema by [SchemaKey] synchronously.\r\n * @param schemaKey The [SchemaKey] that identifies the schema.\r\n * * @param matchType The [SchemaMatchType] to used for comparing schema versions.\r\n * @param context The [SchemaContext] used to facilitate schema location.\r\n * @throws [IModelError]($common) if the schema exists, but cannot be loaded.\r\n */\r\n public getSchemaSync<T extends Schema>(schemaKey: SchemaKey, _matchType: SchemaMatchType, context?: SchemaContext | undefined): T | undefined {\r\n const schemaProps = this.getSchemaString(schemaKey.name);\r\n if (!schemaProps)\r\n return undefined;\r\n\r\n context = context ? context : new SchemaContext();\r\n return Schema.fromJsonSync(schemaProps, context) as T;\r\n }\r\n\r\n /** Read schema data from the iModel as JSON string\r\n * @param schemaName A string with the name of the schema to load.\r\n * @returns A string with the JSON for the schema or `undefined` if the schema is not found.\r\n * @throws [IModelError]($common) if the schema exists, but cannot be loaded.\r\n */\r\n private getSchemaString(schemaName: string): string | undefined {\r\n const val: IModelJsNative.ErrorStatusOrResult<any, any> = this._iModel.nativeDb.getSchema(schemaName);\r\n if (undefined !== val.error) {\r\n if (IModelStatus.NotFound === val.error.status) {\r\n return undefined;\r\n }\r\n throw new IModelError(val.error.status, `reading schema=${schemaName}`);\r\n }\r\n return val.result;\r\n }\r\n}\r\n"]}
|
package/lib/IpcHost.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IpcHost.d.ts","sourceRoot":"","sources":["../src/IpcHost.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EACgC,yBAAyB,EAC9D,mBAAmB,EAAmB,WAAW,EAAE,gBAAgB,EAAoC,cAAc,EACjG,gBAAgB,EACrC,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAY,YAAY,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAc,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAGnE;;;IAGI;AACJ,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,uBAAuB,CAAC;IACrC,OAAO,CAAC,EAAE;QACR,wGAAwG;QACxG,MAAM,CAAC,EAAE,gBAAgB,CAAC;QAE1B,iDAAiD;QACjD,UAAU,CAAC,EAAE;YACX,OAAO,CAAC,EAAE,OAAO,CAAC;SACnB,CAAC;KACH,CAAC;CACH;AAED;;;;GAIG;AACH,qBAAa,OAAO;IAClB,OAAc,OAAO,UAAS;IAC9B,OAAO,CAAC,MAAM,CAAC,IAAI,CAA+B;IAClD,2EAA2E;IAC3E,OAAO,CAAC,MAAM,KAAK,GAAG,GAA2C;IACjE,gIAAgI;IAChI,WAAkB,OAAO,IAAI,OAAO,CAAoC;IAExE;;;;OAIG;WACW,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EA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AAS,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACvD,CAAC;IACM,KAAK,CAAC,YAAY,CAAC,GAAW;QACnC,OAAO,mBAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;IACzD,CAAC;IACM,KAAK,CAAC,iBAAiB,CAAC,GAAW;QACxC,OAAO,mBAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,iBAAiB,EAAE,CAAC;IAC9D,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,IAAkB;QAC9C,OAAO,uBAAU,CAAC,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACpD,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 NativeApp\r\n */\r\n\r\nimport { BentleyError, IModelStatus, Logger, LogLevel, OpenMode } from \"@itwin/core-bentley\";\r\nimport {\r\n ChangesetIndex, ChangesetIndexAndId, EditingScopeNotifications, IModelConnectionProps, IModelError, IModelRpcProps, IpcAppChannel, IpcAppFunctions,\r\n IpcAppNotifications, IpcInvokeReturn, IpcListener, IpcSocketBackend, iTwinChannel, OpenBriefcaseProps, RemoveFunction, StandaloneOpenOptions,\r\n TileTreeContentIds, TxnNotifications,\r\n} from \"@itwin/core-common\";\r\nimport { IModelJsNative } from \"@bentley/imodeljs-native\";\r\nimport { BriefcaseDb, IModelDb, StandaloneDb } from \"./IModelDb\";\r\nimport { IModelHost, IModelHostConfiguration } from \"./IModelHost\";\r\nimport { cancelTileContentRequests } from \"./rpc-impl/IModelTileRpcImpl\";\r\n\r\n/**\r\n * Options for [[IpcHost.startup]]\r\n * @public\r\n */\r\nexport interface IpcHostOpts {\r\n iModelHost?: IModelHostConfiguration;\r\n ipcHost?: {\r\n /** The Ipc socket to use for communications with frontend. Allows undefined only for headless tests. */\r\n socket?: IpcSocketBackend;\r\n\r\n /** don't send stack information on exceptions */\r\n exceptions?: {\r\n noStack?: boolean;\r\n };\r\n };\r\n}\r\n\r\n/**\r\n * Used by applications that have a dedicated backend. IpcHosts may send messages to their corresponding IpcApp.\r\n * @note if either end terminates, the other must too.\r\n * @public\r\n */\r\nexport class IpcHost {\r\n public static noStack = false;\r\n private static _ipc: IpcSocketBackend | undefined;\r\n /** Get the implementation of the [IpcSocketBackend]($common) interface. */\r\n private static get ipc(): IpcSocketBackend { return this._ipc!; }\r\n /** Determine whether Ipc is available for this backend. This will only be true if [[startup]] has been called on this class. */\r\n public static get isValid(): boolean { return undefined !== this._ipc; }\r\n\r\n /**\r\n * Send a message to the frontend over an Ipc channel.\r\n * @param channel the name of the channel matching the name registered with [[IpcApp.addListener]].\r\n * @param data The content of the message.\r\n */\r\n public static send(channel: string, ...data: any[]): void {\r\n this.ipc.send(iTwinChannel(channel), ...data);\r\n }\r\n\r\n /**\r\n * Establish a handler for an Ipc channel to receive [[Frontend.invoke]] calls\r\n * @param channel The name of the channel for this handler.\r\n * @param handler A function that supplies the implementation for `channel`\r\n * @note returns A function to call to remove the handler.\r\n */\r\n public static handle(channel: string, handler: (...args: any[]) => Promise<any>): RemoveFunction {\r\n return this.ipc.handle(iTwinChannel(channel), handler);\r\n }\r\n /**\r\n * Establish a handler to receive messages sent via [[IpcApp.send]].\r\n * @param channel The name of the channel for the messages.\r\n * @param listener A function called when messages are sent over `channel`\r\n * @note returns A function to call to remove the listener.\r\n */\r\n public static addListener(channel: string, listener: IpcListener): RemoveFunction {\r\n return this.ipc.addListener(iTwinChannel(channel), listener);\r\n }\r\n /**\r\n * Remove a previously registered listener\r\n * @param channel The name of the channel for the listener previously registered with [[addListener]]\r\n * @param listener The function passed to [[addListener]]\r\n */\r\n public static removeListener(channel: string, listener: IpcListener): void {\r\n this.ipc.removeListener(iTwinChannel(channel), listener);\r\n }\r\n\r\n private static notify(channel: string, briefcase: BriefcaseDb | StandaloneDb, methodName: string, ...args: any[]) {\r\n if (this.isValid)\r\n return this.send(`${channel}:${briefcase.key}`, methodName, ...args);\r\n }\r\n\r\n /** @internal */\r\n public static notifyIpcFrontend<T extends keyof IpcAppNotifications>(methodName: T, ...args: Parameters<IpcAppNotifications[T]>) {\r\n return IpcHost.send(IpcAppChannel.AppNotify, methodName, ...args);\r\n }\r\n\r\n /** @internal */\r\n public static notifyTxns<T extends keyof TxnNotifications>(briefcase: BriefcaseDb | StandaloneDb, methodName: T, ...args: Parameters<TxnNotifications[T]>) {\r\n this.notify(IpcAppChannel.Txns, briefcase, methodName, ...args);\r\n }\r\n\r\n /** @internal */\r\n public static notifyEditingScope<T extends keyof EditingScopeNotifications>(briefcase: BriefcaseDb | StandaloneDb, methodName: T, ...args: Parameters<EditingScopeNotifications[T]>) {\r\n this.notify(IpcAppChannel.EditingScope, briefcase, methodName, ...args);\r\n }\r\n\r\n /**\r\n * Start the backend of an Ipc app.\r\n * @param opt\r\n * @note this method calls [[IModelHost.startup]] internally.\r\n */\r\n public static async startup(opt?: IpcHostOpts): Promise<void> {\r\n this._ipc = opt?.ipcHost?.socket;\r\n if (opt?.ipcHost?.exceptions?.noStack)\r\n this.noStack = true;\r\n\r\n if (this.isValid) { // for tests, we use IpcHost but don't have a frontend\r\n IpcAppHandler.register();\r\n }\r\n\r\n await IModelHost.startup(opt?.iModelHost);\r\n }\r\n\r\n /** Shutdown IpcHost backend. Also calls [[IModelHost.shutdown]] */\r\n public static async shutdown(): Promise<void> {\r\n this._ipc = undefined;\r\n await IModelHost.shutdown();\r\n }\r\n}\r\n\r\n/**\r\n * Base class for all implementations of an Ipc interface.\r\n *\r\n * Create a subclass to implement your Ipc interface. Your class should be declared like this:\r\n * ```ts\r\n * class MyHandler extends IpcHandler implements MyInterface\r\n * ```\r\n * to ensure all methods and signatures are correct.\r\n *\r\n * Then, call `MyClass.register` at startup to connect your class to your channel.\r\n * @public\r\n */\r\nexport abstract class IpcHandler {\r\n /** All subclasses must implement this method to specify their channel name. */\r\n public abstract get channelName(): string;\r\n\r\n /**\r\n * Register this class as the handler for methods on its channel. This static method creates a new instance\r\n * that becomes the handler and is `this` when its methods are called.\r\n * @returns A function that can be called to remove the handler.\r\n * @note this method should only be called once per channel. If it is called multiple times, subsequent calls replace the previous ones.\r\n */\r\n public static register(): RemoveFunction {\r\n const impl = new (this as any)() as IpcHandler; // create an instance of subclass. \"as any\" is necessary because base class is abstract\r\n return IpcHost.handle(impl.channelName, async (_evt: Event, funcName: string, ...args: any[]): Promise<IpcInvokeReturn> => {\r\n try {\r\n const func = (impl as any)[funcName];\r\n if (typeof func !== \"function\")\r\n throw new IModelError(IModelStatus.FunctionNotFound, `Method \"${impl.constructor.name}.${funcName}\" not found on IpcHandler registered for channel: ${impl.channelName}`);\r\n\r\n return { result: await func.call(impl, ...args) };\r\n } catch (err) {\r\n const ret: IpcInvokeReturn = {\r\n error: {\r\n name: (err && typeof (err) === \"object\") ? err.constructor.name : \"Unknown Error\",\r\n message: BentleyError.getErrorMessage(err),\r\n errorNumber: (err as any).errorNumber ?? 0,\r\n },\r\n };\r\n if (!IpcHost.noStack)\r\n ret.error.stack = BentleyError.getErrorStack(err);\r\n return ret;\r\n }\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Implementation of IpcAppFunctions\r\n */\r\nclass IpcAppHandler extends IpcHandler implements IpcAppFunctions {\r\n public get channelName() { return IpcAppChannel.Functions; }\r\n\r\n public async log(_timestamp: number, level: LogLevel, category: string, message: string, metaData?: any): Promise<void> {\r\n switch (level) {\r\n case LogLevel.Error:\r\n Logger.logError(category, message, metaData);\r\n break;\r\n case LogLevel.Info:\r\n Logger.logInfo(category, message, metaData);\r\n break;\r\n case LogLevel.Trace:\r\n Logger.logTrace(category, message, metaData);\r\n break;\r\n case LogLevel.Warning:\r\n Logger.logWarning(category, message, metaData);\r\n break;\r\n }\r\n }\r\n\r\n public async cancelTileContentRequests(tokenProps: IModelRpcProps, contentIds: TileTreeContentIds[]): Promise<void> {\r\n return cancelTileContentRequests(tokenProps, contentIds);\r\n }\r\n public async cancelElementGraphicsRequests(key: string, requestIds: string[]): Promise<void> {\r\n return IModelDb.findByKey(key).nativeDb.cancelElementGraphicsRequests(requestIds);\r\n }\r\n public async openBriefcase(args: OpenBriefcaseProps): Promise<IModelConnectionProps> {\r\n const db = await BriefcaseDb.open(args);\r\n return db.toJSON();\r\n }\r\n public async openStandalone(filePath: string, openMode: OpenMode, opts?: StandaloneOpenOptions): Promise<IModelConnectionProps> {\r\n return StandaloneDb.openFile(filePath, openMode, opts).getConnectionProps();\r\n }\r\n public async closeIModel(key: string): Promise<void> {\r\n IModelDb.findByKey(key).close();\r\n }\r\n public async saveChanges(key: string, description?: string): Promise<void> {\r\n IModelDb.findByKey(key).saveChanges(description);\r\n }\r\n public async hasPendingTxns(key: string): Promise<boolean> {\r\n return IModelDb.findByKey(key).nativeDb.hasPendingTxns();\r\n }\r\n\r\n public async isUndoPossible(key: string): Promise<boolean> {\r\n return IModelDb.findByKey(key).nativeDb.isUndoPossible();\r\n }\r\n public async isRedoPossible(key: string): Promise<boolean> {\r\n return IModelDb.findByKey(key).nativeDb.isRedoPossible();\r\n }\r\n public async getUndoString(key: string): Promise<string> {\r\n return IModelDb.findByKey(key).nativeDb.getUndoString();\r\n }\r\n public async getRedoString(key: string): Promise<string> {\r\n return IModelDb.findByKey(key).nativeDb.getUndoString();\r\n }\r\n\r\n public async pullChanges(key: string, toIndex?: ChangesetIndex): Promise<ChangesetIndexAndId> {\r\n const iModelDb = BriefcaseDb.findByKey(key);\r\n await iModelDb.pullChanges({ toIndex });\r\n return iModelDb.changeset as ChangesetIndexAndId;\r\n }\r\n public async pushChanges(key: string, description: string): Promise<ChangesetIndexAndId> {\r\n const iModelDb = BriefcaseDb.findByKey(key);\r\n await iModelDb.pushChanges({ description });\r\n return iModelDb.changeset as ChangesetIndexAndId;\r\n }\r\n\r\n public async toggleGraphicalEditingScope(key: string, startSession: boolean): Promise<boolean> {\r\n const val: IModelJsNative.ErrorStatusOrResult<any, boolean> = IModelDb.findByKey(key).nativeDb.setGeometricModelTrackingEnabled(startSession);\r\n if (val.error)\r\n throw new IModelError(val.error.status, \"Failed to toggle graphical editing scope\");\r\n\r\n return val.result!;\r\n }\r\n public async isGraphicalEditingSupported(key: string): Promise<boolean> {\r\n return IModelDb.findByKey(key).nativeDb.isGeometricModelTrackingSupported();\r\n }\r\n\r\n public async reverseTxns(key: string, numOperations: number): Promise<IModelStatus> {\r\n return IModelDb.findByKey(key).nativeDb.reverseTxns(numOperations);\r\n }\r\n public async reverseAllTxn(key: string): Promise<IModelStatus> {\r\n return IModelDb.findByKey(key).nativeDb.reverseAll();\r\n }\r\n public async reinstateTxn(key: string): Promise<IModelStatus> {\r\n return IModelDb.findByKey(key).nativeDb.reinstateTxn();\r\n }\r\n public async restartTxnSession(key: string): Promise<void> {\r\n return IModelDb.findByKey(key).nativeDb.restartTxnSession();\r\n }\r\n\r\n public async queryConcurrency(pool: \"io\" | \"cpu\"): Promise<number> {\r\n return IModelHost.platform.queryConcurrency(pool);\r\n }\r\n}\r\n"]}
|
package/lib/LineStyle.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LineStyle.d.ts","sourceRoot":"","sources":["../src/LineStyle.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAgB,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAkC,UAAU,EAAkB,MAAM,oBAAoB,CAAC;AAEhG,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;;GASG;AACH,yBAAiB,mBAAmB,CAAC;IAEnC,4CAA4C;IAC5C,KAAY,aAAa;QACvB,kEAAkE;QAClE,WAAW,IAAI;QACf,+DAA+D;QAC/D,QAAQ,IAAI;QACZ,oEAAoE;QACpE,aAAa,IAAI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EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAC5I,CAAC;KACF;IArJY,yBAAK,QAqJjB,CAAA;AACH,CAAC,EA7agB,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QA6anC","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 Symbology\n */\n\nimport { Id64String, IModelStatus } from \"@itwin/core-bentley\";\nimport { FilePropertyProps, IModelError, LinePixels, LineStyleProps } from \"@itwin/core-common\";\nimport { GeometryPart, LineStyle } from \"./Element\";\nimport { IModelDb } from \"./IModelDb\";\n\n/** A line style definition is a uniquely named pattern that repeats as it is displayed along a curve path. In the absence of a line style, curve display is limited to solid lines with a width in pixels.\n * There are three varieties of line styles:\n * - A style described by a stroke pattern (series of dashes and gaps) that may also include symbol graphics.\n * - A style using pre-defined pixel bit patterns [[LinePixels]] for dashed display (Code1-Code7).\n * - A style that uses a texture.\n *\n * A definition is defined by one or more components. A component is saved as a \"file property\" and can be referenced by other components. The line style definition references a component\n * by file property id and type and is saved as a dictionary element.\n * @public\n */\nexport namespace LineStyleDefinition {\n\n /** Line style component type identifiers */\n export enum ComponentType {\n /** Component type for [[LineStyleDefinition.PointSymbolProps]] */\n PointSymbol = 1,\n /** Component type for [[LineStyleDefinition.CompoundProps]] */\n Compound = 2,\n /** Component type for [[LineStyleDefinition.StrokePatternProps]] */\n StrokePattern = 3,\n /** Component type for [[LineStyleDefinition.StrokePointProps]] */\n StrokePoint = 4,\n /** Component type for [[LinePixels]], never saved as a file property */\n Internal = 6,\n /** Component type for [[LineStyleDefinition.RasterImageProps]] */\n RasterImage = 7,\n }\n\n /** Mask of values for StrokeMode */\n export enum StrokeMode {\n /** Stroke represents a blank space */\n Gap = 0x00,\n /** Stroke represents a solid dash */\n Dash = 0x01,\n /** Treat stroke as rigid and continue past a corner to complete the stroke as opposed to breaking at the corner */\n Ray = 0x02,\n /** Stroke length can be stretched when [[LineStyleDefinition.StrokePatternOptions.Iteration]] and [[LineStyleDefinition.StrokePatternOptions.AutoPhase]] options are set, applicable to both Gap and Dash strokes */\n Scale = 0x04,\n /** Invert stroke in first stroke pattern */\n FirstInvert = 0x08,\n /** Invert stroke in last stroke pattern */\n LastInvert = 0x10,\n }\n\n /** Define constant width or tapered strokes with distance specified in meters */\n export enum StrokeWidth {\n /** Stroke draws as one pixel wide line */\n None = 0,\n /** Half [[LineStyleDefinition.StrokeProps.orgWidth]] and [[LineStyleDefinition.StrokeProps.endWidth]] applied to left side of stroke */\n Left = 1,\n /** Half [[LineStyleDefinition.StrokeProps.orgWidth]] and [[LineStyleDefinition.StrokeProps.endWidth]] applied to right side of stroke */\n Right = 2,\n /** Half [[LineStyleDefinition.StrokeProps.orgWidth]] and [[LineStyleDefinition.StrokeProps.endWidth]] applied to both sides of stroke */\n Full = 3,\n }\n\n /** Controls appearance of stroke end caps. If StrokeCap is >= Hexagon, the end cap is stroked as an arc and the value of\n * StrokeCap indicates the number of vectors in the arc.\n */\n export enum StrokeCap {\n /** Stroke displays as a closed polygon */\n Closed = 0,\n /** Stroke displays lines at specified width instead of a polygon */\n Open = 1,\n /** Stroke length extended by half the stroke width */\n Extended = 2,\n /** Stroke end cap is a hexagon */\n Hexagon = 3,\n /** Stroke end cap is an octagon */\n Octagon = 4,\n /** Stroke end cap is a decagon */\n Decagon = 5,\n /** Stroke end cap is an arc */\n Arc = 30,\n }\n\n /** A stroke representing either a dash or gap in a stroke pattern */\n export interface StrokeProps {\n /** Length of stroke in meters */\n length: number;\n /** Width at start of stroke. Behavior controlled by [[LineStyleDefinition.StrokeWidth]], choose value other than [[LineStyleDefinition.StrokeWidth.None]] */\n orgWidth?: number;\n /** Width at end of stroke, same as start width if not present. Behavior controlled by [[LineStyleDefinition.StrokeWidth]], choose value other than [[LineStyleDefinition.StrokeWidth.None]] */\n endWidth?: number;\n /** Type and behavior of stroke */\n strokeMode?: StrokeMode;\n /** How to apply orgWidth and endWidth to stroke */\n widthMode?: StrokeWidth;\n /** Appearance of stroke end cap */\n capMode?: StrokeCap;\n }\n\n export type Strokes = StrokeProps[];\n\n /** Options to control how stroke pattern is applied to underlying curve */\n export enum StrokePatternOptions {\n /** Use default stroke behavior */\n None = 0x00,\n /** [[LineStyleDefinition.StrokePatternProps.phase]] represents fractional distance into first stroke of pattern */\n AutoPhase = 0x01,\n /** Use [[LineStyleDefinition.StrokePatternProps.maxIter]] to limit the number of iterations of the stroke pattern */\n Iteration = 0x08,\n /** Single segment mode restarts the stroke pattern at corners instead of continuing around corners */\n Segment = 0x10,\n /** Center the line style and stretch the ends */\n CenterStretch = 0x20,\n }\n\n /** Stroke pattern component definition [[LineStyleDefinition.ComponentType.StrokePattern]].\n * A stroke pattern component consists of a series of dashes and gaps having specified lengths and widths in meters. Simple dash-dot type line styles that do not\n * include point symbols can be created by referencing a stroke pattern component by its file property id.\n */\n export interface StrokePatternProps {\n /** Name for this stroke pattern */\n descr: string;\n /** Skip into the pattern before starting to draw. Value treated as fraction of the first stroke when [[LineStyleDefinition.StrokePatternOptions.AutoPhase]] set. Value used as distance when [[LineStyleDefinition.StrokePatternOptions.CenterStretch]] is not set. */\n phase?: number;\n /** Options mask for this stroke pattern */\n options?: StrokePatternOptions;\n /** The entire stroke pattern will be repeated no more than maxIter on curve or segment when [[LineStyleDefinition.StrokePatternOptions.Iteration]] is set and stroke pattern includes stretchable strokes. */\n maxIter?: number;\n /** Array of strokes, maximum number that will be used is 32 */\n strokes: Strokes;\n }\n\n /** Flags to identify point symbol behavior */\n export enum PointSymbolFlags {\n /** Default symbol behavior */\n None = 0x0,\n /** Symbol includes 3d geometry */\n Is3d = 0x01,\n /** Symbol does not allow scaling */\n NoScale = 0x02,\n }\n\n /** Point symbol component definition [[LineStyleDefinition.ComponentType.PointSymbol]].\n * A point symbol component identifies a GeometryPart for reference by a [[LineStyleDefinition.SymbolProps]].\n */\n export interface PointSymbolProps {\n /** GeometryPart Id to use as a pattern symbol */\n geomPartId: Id64String;\n /** GeometryPart.bbox.low.x */\n baseX?: number;\n /** GeometryPart.bbox.low.y */\n baseY?: number;\n /** GeometryPart.bbox.low.z */\n baseZ?: number;\n /** GeometryPart.bbox.high.x */\n sizeX?: number;\n /** GeometryPart.bbox.high.y */\n sizeY?: number;\n /** GeometryPart.bbox.high.z */\n sizeZ?: number;\n /** Symbol behavior flags */\n symFlags?: PointSymbolFlags;\n /** Symbol scale, defaults to 1 */\n scale?: number;\n }\n\n /** Symbol options for location, orientation, and behavior */\n export enum SymbolOptions {\n /** No point symbol */\n None = 0x00,\n /** Symbol at origin of stroke */\n Origin = 0x01,\n /** Symbol at end of stroke */\n End = 0x02,\n /** symbol at center of stroke */\n Center = 0x03,\n /** Symbol at curve start point */\n CurveOrigin = 0x0004,\n /** Symbol at curve end point */\n CurveEnd = 0x0008,\n /** Symbol at each vertex */\n CurveVertex = 0x0010,\n /** Adjust symbol rotation left->right */\n AdjustRotation = 0x0020,\n /** Angle of symbol not relative to stroke direction */\n AbsoluteRotation = 0x0040,\n /** No scale on variable strokes */\n NoScale = 0x0100,\n /** No clip on partial strokes */\n NoClip = 0x0200,\n /** No partial strokes */\n NoPartial = 0x0400,\n /** Project partial origin */\n ProjectOrigin = 0x0800,\n /** Use color from symbol instead of inheriting curve color */\n UseColor = 0x4000,\n /** Use weight from symbol instead of inheriting curve weight */\n UseWeight = 0x8000,\n }\n\n /** Identifies a symbol and its location and orientation relative to a stroke pattern */\n export interface SymbolProps {\n /** The file property id of the symbol component, assumed to be [[LineStyleDefinition.ComponentType.PointSymbol]] if symType is undefined. */\n symId: number;\n /** The component type, leave undefined if symId is a [[LineStyleDefinition.ComponentType.PointSymbol]] */\n symType?: ComponentType;\n /** The 0 based stroke index for base stroke pattern [[LineStyleDefinition.ComponentType.StrokePattern]] component */\n strokeNum?: number;\n /** Symbol x offset distance in meters */\n xOffset?: number;\n /** Symbol y offset distance in meters */\n yOffset?: number;\n /** Symbol rotation in radians */\n angle?: number;\n /** Must set location for symbol as default value is [[LineStyleDefinition.SymbolOptions.None]] */\n mod1?: SymbolOptions;\n }\n\n export type Symbols = SymbolProps[];\n\n /** Stroke point component definition [[LineStyleDefinition.ComponentType.StrokePoint]].\n * A stroke point component identifies the locations of point symbol components relative to a base stroke pattern component.\n */\n export interface StrokePointProps {\n /** Name for this stroke point component */\n descr: string;\n /** The file property id of the stroke component, assumed to be [[LineStyleDefinition.ComponentType.StrokePattern]] if lcType is undefined */\n lcId: number;\n /** The component type, leave undefined if lcId is a [[LineStyleDefinition.ComponentType.StrokePattern]] */\n lcType?: ComponentType;\n /** Array of symbols */\n symbols: Symbols;\n }\n\n /** Raster component definition [[LineStyleDefinition.ComponentType.RasterImage]].\n * A raster component identifies a texture for a line style.\n */\n export interface RasterImageProps {\n /** Name for this raster image component */\n descr: string;\n /** Raster width */\n x: number;\n /** Raster height */\n y: number;\n /** True width flag */\n trueWidth?: number;\n /** Raster flags */\n flags?: number;\n /** The file property id of raster image */\n imageId?: number;\n }\n\n /** Identifies a component by file property id and type */\n export interface ComponentProps {\n /** The file property id of [[LineStyleDefinition.ComponentType.StrokePattern]] or [[LineStyleDefinition.ComponentType.StrokePoint]] component */\n id: number;\n /** The type of component for specified file property id */\n type: ComponentType;\n /** Offset distance for this component, default is 0 */\n offset?: number;\n }\n\n export type Components = ComponentProps[];\n\n /** Compound component definition [[LineStyleDefinition.ComponentType.Compound]].\n * A compound component is used to link stroke pattern and stroke point components to create a style that displays dashes, gaps, and symbols.\n */\n export interface CompoundProps {\n comps: Components;\n }\n\n /** Flags to describe a style or control style behavior */\n export enum StyleFlags {\n /** Use defaults */\n None = 0x00,\n /** Only snap to center line and not individual strokes and symbols of line style */\n NoSnap = 0x04,\n /** Style represents a continuous line with width (determined by looking at components if not set) */\n Continuous = 0x08,\n /** Style represents physical geometry and should be scaled as such */\n Physical = 0x80,\n }\n\n /** The line style definition element data */\n export interface StyleProps {\n /** The file property id for either a [[LineStyleDefinition.ComponentType.StrokePattern]] or [[LineStyleDefinition.ComponentType.Compound]] component */\n compId: number;\n /** The type of component for specified file property id */\n compType: ComponentType;\n /** Style behavior flags. Defaults to [[LineStyleDefinition.StyleFlags.NoSnap]] if left undefined */\n flags?: StyleFlags;\n /** Style scale, defaults to 1 */\n unitDef?: number;\n }\n\n /** Helper methods for creating and querying line styles */\n export class Utils {\n\n /** Create a file property for a new stroke pattern component. */\n public static createStrokePatternComponent(iModel: IModelDb, props: StrokePatternProps): StyleProps {\n const fileProps: FilePropertyProps = { name: \"LineCodeV1\", namespace: \"dgn_LStyle\" };\n fileProps.id = iModel.queryNextAvailableFileProperty(fileProps);\n iModel.saveFileProperty(fileProps, JSON.stringify(props));\n return { compId: fileProps.id, compType: ComponentType.StrokePattern };\n }\n\n /** Create a file property for a new point symbol component.\n * If base and size parameters are not supplied, queries GeometryPart by id to set them.\n */\n public static createPointSymbolComponent(iModel: IModelDb, props: PointSymbolProps): StyleProps | undefined {\n // if part extents weren't supplied, set them up now.\n if (!props.baseX && !props.baseY && !props.baseZ && !props.sizeX && !props.sizeY && !props.sizeZ) {\n const geomPart = iModel.elements.getElement<GeometryPart>(props.geomPartId);\n if (!geomPart)\n return undefined;\n\n props.baseX = geomPart.bbox.low.x;\n props.baseY = geomPart.bbox.low.y;\n props.baseZ = geomPart.bbox.low.z;\n\n props.sizeX = geomPart.bbox.high.x;\n props.sizeY = geomPart.bbox.high.y;\n props.sizeZ = geomPart.bbox.high.z;\n }\n\n const fileProps: FilePropertyProps = { name: \"PointSymV1\", namespace: \"dgn_LStyle\" };\n fileProps.id = iModel.queryNextAvailableFileProperty(fileProps);\n iModel.saveFileProperty(fileProps, JSON.stringify(props));\n return { compId: fileProps.id, compType: ComponentType.PointSymbol };\n }\n\n /** Create a file property for a new stroke point component. */\n public static createStrokePointComponent(iModel: IModelDb, props: StrokePointProps): StyleProps {\n const fileProps: FilePropertyProps = { name: \"LinePointV1\", namespace: \"dgn_LStyle\" };\n fileProps.id = iModel.queryNextAvailableFileProperty(fileProps);\n iModel.saveFileProperty(fileProps, JSON.stringify(props));\n return { compId: fileProps.id, compType: ComponentType.StrokePoint };\n }\n\n /** Create a file property for a new compound component. */\n public static createCompoundComponent(iModel: IModelDb, props: CompoundProps): StyleProps {\n const fileProps: FilePropertyProps = { name: \"CompoundV1\", namespace: \"dgn_LStyle\" };\n fileProps.id = iModel.queryNextAvailableFileProperty(fileProps);\n iModel.saveFileProperty(fileProps, JSON.stringify(props));\n return { compId: fileProps.id, compType: ComponentType.Compound };\n }\n\n /** Create a file property for a new raster image component. */\n public static createRasterComponent(iModel: IModelDb, props: RasterImageProps, image: Uint8Array): StyleProps | undefined {\n const rasterFileProps: FilePropertyProps = { name: \"RasterImageV1\", namespace: \"dgn_LStyle\" };\n rasterFileProps.id = iModel.queryNextAvailableFileProperty(rasterFileProps);\n iModel.saveFileProperty(rasterFileProps, undefined, image);\n props.imageId = rasterFileProps.id;\n const fileProps: FilePropertyProps = { name: \"RasterComponentV1\", namespace: \"dgn_LStyle\" };\n fileProps.id = iModel.queryNextAvailableFileProperty(fileProps);\n iModel.saveFileProperty(fileProps, JSON.stringify(props));\n return { compId: fileProps.id, compType: ComponentType.RasterImage };\n }\n\n /** Query for an existing line style with the supplied name. */\n public static queryStyle(imodel: IModelDb, scopeModelId: Id64String, name: string): Id64String | undefined {\n return imodel.elements.queryElementIdByCode(LineStyle.createCode(imodel, scopeModelId, name));\n }\n\n /** Insert a new line style with the supplied name.\n * @throws [[IModelError]] if unable to insert the line style definition element.\n */\n public static createStyle(imodel: IModelDb, scopeModelId: Id64String, name: string, props: StyleProps): Id64String {\n if (undefined === props.flags)\n props.flags = StyleFlags.NoSnap; // If flags weren't supplied, default to not snapping to stroke geometry.\n\n const lsProps: LineStyleProps = {\n classFullName: \"BisCore:LineStyle\",\n model: scopeModelId,\n code: LineStyle.createCode(imodel, scopeModelId, name),\n data: JSON.stringify(props),\n };\n\n return imodel.elements.insertElement(lsProps);\n }\n\n /** Query for a continuous line style that can be used to create curves with physical width instead of weight in pixels and create one if it does not already exist.\n * There are 2 ways to define a continuous line style:\n * - Width is not specified in the style itself and instead will be supplied as an override for each curve that is drawn.\n * - Defined using [[LineStyleDefinition.ComponentType.Internal]] with component id 0 [[LinePixels.Solid]] which has special behavior of being affected by width overrides.\n * - Width is specified in the style.\n * - Defined using a single stroke component that is a long dash.\n *\n * @throws [[IModelError]] if unable to insert the line style definition element.\n */\n public static getOrCreateContinuousStyle(imodel: IModelDb, scopeModelId: Id64String, width?: number): Id64String {\n if (width === undefined) {\n const name0 = \"Continuous\";\n const lsId0 = this.queryStyle(imodel, scopeModelId, name0);\n return (undefined === lsId0 ? this.createStyle(imodel, scopeModelId, name0, { compId: 0, compType: ComponentType.Internal, flags: StyleFlags.Continuous | StyleFlags.NoSnap }) : lsId0);\n }\n\n const name = `Continuous-${width}`;\n const lsId = this.queryStyle(imodel, scopeModelId, name);\n if (undefined !== lsId)\n return lsId;\n\n const strokePatternData = this.createStrokePatternComponent(imodel, { descr: name, strokes: [{ length: 1e37, orgWidth: width, strokeMode: StrokeMode.Dash, widthMode: StrokeWidth.Full }] });\n if (undefined === strokePatternData)\n throw new IModelError(IModelStatus.BadArg, \"Unable to insert stroke component\");\n\n return this.createStyle(imodel, scopeModelId, name, { compId: strokePatternData.compId, compType: strokePatternData.compType, flags: StyleFlags.Continuous | StyleFlags.NoSnap });\n }\n\n /** Query for a line style using the supplied [[LinePixels]] value (Code1-Code7) and create one if it does not already exist.\n * Most applications should instead use [[createStrokePatternComponent]] to define a style with physical dash and gap lengths.\n * Unlike other components, [[LineStyleDefinition.ComponentType.Internal]] uses the line code as the compId instead of a file property id.\n * @throws [[IModelError]] if supplied an invalid [[LinePixels]] value or if unable to insert the line style definition element.\n */\n public static getOrCreateLinePixelsStyle(imodel: IModelDb, scopeModelId: Id64String, linePixels: LinePixels): Id64String {\n let lineCode;\n switch (linePixels) {\n case LinePixels.Code1:\n lineCode = 1;\n break;\n case LinePixels.Code2:\n lineCode = 2;\n break;\n case LinePixels.Code3:\n lineCode = 3;\n break;\n case LinePixels.Code4:\n lineCode = 4;\n break;\n case LinePixels.Code5:\n lineCode = 5;\n break;\n case LinePixels.Code6:\n lineCode = 6;\n break;\n case LinePixels.Code7:\n lineCode = 7;\n break;\n default:\n throw new IModelError(IModelStatus.BadArg, \"Invalid LinePixels\");\n }\n const name = `LinePixelsCodeNumber-${lineCode}`;\n const lsId = this.queryStyle(imodel, scopeModelId, name);\n return (undefined === lsId ? this.createStyle(imodel, scopeModelId, name, { compId: lineCode, compType: ComponentType.Internal }) : lsId);\n }\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LocalhostIpcHost.d.ts","sourceRoot":"","sources":["../src/LocalhostIpcHost.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AA0BvD,gBAAgB;AAChB,qBAAa,gBAAgB;WACP,OAAO,CAAC,IAAI,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE;YAAE,UAAU,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAAC,UAAU,CAAC,EAAE,uBAAuB,CAAA;KAAE;CAKxH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LocalhostIpcHost.js","sourceRoot":"","sources":["../src/LocalhostIpcHost.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yBAAyB;AACzB,oDAAmH;AACnH,uCAAoC;AAGpC,MAAM,cAAe,SAAQ,mCAAqB;IAIhD,YAAmB,IAAY;QAC7B,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;QAEvC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,EAAE;YAC3C,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;YAE9B,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE;gBACtC,KAAK,MAAM,QAAQ,IAAI,0BAAY,CAAC,SAAS;oBAC3C,QAAQ,CAAC,EAAW,EAAE,IAAI,CAAC,KAAK,CAAC,IAAc,CAAC,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAEM,IAAI,CAAC,OAA4B;QACtC,IAAI,CAAC,WAAY,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAClD,CAAC;CACF;AAED,gBAAgB;AAChB,MAAa,gBAAgB;IACpB,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAA2F;;QACrH,0BAAY,CAAC,SAAS,GAAG,IAAI,cAAc,CAAC,MAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,UAAU,mCAAI,IAAI,CAAC,CAAC;QACxF,MAAM,MAAM,GAAG,IAAI,iCAAmB,EAAE,CAAC;QACzC,MAAM,iBAAO,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,UAAU,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF;AAND,4CAMC","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 IModelHost\n */\n\nimport * as ws from \"ws\";\nimport { IpcWebSocket, IpcWebSocketBackend, IpcWebSocketMessage, IpcWebSocketTransport } from \"@itwin/core-common\";\nimport { IpcHost } from \"./IpcHost\";\nimport { IModelHostConfiguration } from \"./IModelHost\";\n\nclass LocalTransport extends IpcWebSocketTransport {\n private _server: ws.Server;\n private _connection: ws | undefined;\n\n public constructor(port: number) {\n super();\n\n this._server = new ws.Server({ port });\n\n this._server.on(\"connection\", (connection) => {\n this._connection = connection;\n\n this._connection.on(\"message\", (data) => {\n for (const listener of IpcWebSocket.receivers)\n listener({} as Event, JSON.parse(data as string));\n });\n });\n }\n\n public send(message: IpcWebSocketMessage): void {\n this._connection!.send(JSON.stringify(message));\n }\n}\n\n/** @internal */\nexport class LocalhostIpcHost {\n public static async startup(opts?: { localhostIpcHost?: { socketPort?: number }, iModelHost?: IModelHostConfiguration }) {\n IpcWebSocket.transport = new LocalTransport(opts?.localhostIpcHost?.socketPort ?? 3002);\n const socket = new IpcWebSocketBackend();\n await IpcHost.startup({ ipcHost: { socket }, iModelHost: opts?.iModelHost });\n }\n}\n"]}
|
package/lib/Material.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Material.d.ts","sourceRoot":"","sources":["../src/Material.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAe,IAAI,EAAE,cAAc,EAAoC,mBAAmB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC/I,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC;;;GAGG;AACH,8BAAsB,gBAAiB,SAAQ,iBAAiB;IAC9D,gBAAgB;IAChB,WAA2B,SAAS,IAAI,MAAM,CAA+B;IAC7E;;;;OAIG;WACW,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAIjG;;;;;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;QACF,OAAO,IAAI,qBAAqB,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAC;IAClE,CAAC;IACD;;;;;;;;OAQG;IACI,MAAM,CAAC,MAAM,CAAC,QAAkB,EAAE,iBAA6B,EAAE,YAAoB,EAAE,MAAoC;QAChI,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;QACtF,OAAO,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IACzD,CAAC;CACF;AAvFD,sDAuFC;AAED,cAAc;AACd,WAAiB,qBAAqB;IACpC,yDAAyD;IACzD,MAAa,MAAM;QAwBjB,iJAAiJ;QACjJ,YAAmB,WAAmB;YACpC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QACjC,CAAC;KACF;IA5BY,4BAAM,SA4BlB,CAAA;AACH,CAAC,EA/BgB,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QA+BrC","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 Elements\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { BisCodeSpec, Code, CodeScopeProps, CodeSpec, DefinitionElementProps, RenderMaterialProps, TextureMapProps } from \"@itwin/core-common\";\r\nimport { DefinitionElement } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n\r\n/** A PhysicalMaterial defines the matter that makes up physical elements.\r\n * @note See [[RenderMaterialElement]] for the DefinitionElement used to define rendering characteristics.\r\n * @public\r\n */\r\nexport abstract class PhysicalMaterial extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"PhysicalMaterial\"; }\r\n /** Create a Code for a PhysicalMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\r\n * @param name The name (codeValue) of the PhysicalMaterial\r\n */\r\n public static createCode(iModel: IModelDb, definitionModelId: CodeScopeProps, name: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalMaterial);\r\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: name });\r\n }\r\n /** Create a PhysicalMaterial\r\n * @param iModelDb The IModelDb\r\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\r\n * @param name The name (codeValue) of the PhysicalMaterial\r\n * @returns The newly constructed PhysicalMaterial\r\n * @throws [[IModelError]] if there is a problem creating the PhysicalMaterial\r\n */\r\n public static create<T extends PhysicalMaterial>(iModelDb: IModelDb, definitionModelId: CodeScopeProps, name: string): T {\r\n const elementProps: DefinitionElementProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n };\r\n return iModelDb.elements.createElement(elementProps);\r\n }\r\n}\r\n\r\n/** Defines a rendering material.\r\n * @note See [[PhysicalMaterial]] for the DefinitionElement used to define the matter that makes up physical elements.\r\n * @public\r\n */\r\nexport class RenderMaterialElement extends DefinitionElement implements RenderMaterialProps {\r\n /** @internal */\r\n public static override get className(): string { return \"RenderMaterial\"; }\r\n\r\n /** The name of a palette that can be used to categorize multiple materials. */\r\n public paletteName: string;\r\n /** An optional description of the material. */\r\n public description?: string;\r\n /** @internal */\r\n constructor(props: RenderMaterialProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.paletteName = props.paletteName;\r\n this.description = props.description;\r\n }\r\n /** @internal */\r\n public override toJSON(): RenderMaterialProps {\r\n const val = super.toJSON() as RenderMaterialProps;\r\n val.paletteName = this.paletteName;\r\n val.description = this.description;\r\n return val;\r\n }\r\n /** Create a Code for a RenderMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the RenderMaterial and provides the scope for its name.\r\n * @param name The RenderMaterial name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, name: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.texture);\r\n return 0 === name.length ? Code.createEmpty() : new Code({ spec: codeSpec.id, scope: scopeModelId, value: name });\r\n }\r\n /**\r\n * Create a RenderMaterial with given parameters.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param materialName The name/CodeValue of the RenderMaterial\r\n * @param params Parameters object which describes how to construct the RenderMaterial\r\n * @returns The newly constructed RenderMaterial element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElement.Params): RenderMaterialElement {\r\n const map = undefined !== params.patternMap ? { Pattern: params.patternMap } : undefined;\r\n const renderMaterialProps: RenderMaterialProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, materialName),\r\n paletteName: params.paletteName,\r\n description: params.description,\r\n jsonProperties: {\r\n materialAssets: {\r\n renderMaterial: {\r\n HasBaseColor: params.color !== undefined,\r\n color: params.color,\r\n HasSpecularColor: params.specularColor !== undefined,\r\n specular_color: params.specularColor,\r\n HasFinish: params.finish !== undefined,\r\n finish: params.finish,\r\n HasTransmit: params.transmit !== undefined,\r\n transmit: params.transmit,\r\n HasDiffuse: params.diffuse !== undefined,\r\n diffuse: params.diffuse,\r\n HasSpecular: params.specular !== undefined,\r\n specular: params.specular,\r\n HasReflect: params.reflect !== undefined,\r\n reflect: params.reflect,\r\n HasReflectColor: params.reflectColor !== undefined,\r\n reflect_color: params.reflectColor,\r\n Map: map,\r\n },\r\n },\r\n },\r\n model: definitionModelId,\r\n isPrivate: false,\r\n };\r\n return new RenderMaterialElement(renderMaterialProps, iModelDb);\r\n }\r\n /**\r\n * Insert a new RenderMaterial into a model.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new Texture into this DefinitionModel\r\n * @param materialName The name/CodeValue of the RenderMaterial\r\n * @param params Parameters object which describes how to construct the RenderMaterial\r\n * @returns The Id of the newly inserted RenderMaterial element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElement.Params): Id64String {\r\n const renderMaterial = this.create(iModelDb, definitionModelId, materialName, params);\r\n return iModelDb.elements.insertElement(renderMaterial);\r\n }\r\n}\r\n\r\n/** @public */\r\nexport namespace RenderMaterialElement { // eslint-disable-line no-redeclare\r\n /** Parameters used to construct a [[RenderMaterial]]. */\r\n export class Params {\r\n /** The palette name which categorizes this RenderMaterial */\r\n public paletteName: string;\r\n /** The optional description for this RenderMaterial */\r\n public description?: string;\r\n /** If defined, use this color for surface fill or diffuse illumination; if undefined, defaults to black */\r\n public color?: number[];\r\n /** If defined, use this color for surface specular illumination; if undefined, defaults to black */\r\n public specularColor?: number[];\r\n /** If defined, apply this specular exponent(surface shininess); range is 0 to 128; if undefined, defaults to 15.0 * 0.9 */\r\n public finish?: number;\r\n /** If defined, apply this surface transparency; if undefined, defaults to 0.0 */\r\n public transmit?: number;\r\n /** If defined, apply this surface diffuse reflectivity; if undefined, defaults to 0.6 */\r\n public diffuse?: number;\r\n /** If defined, apply this surface specular reflectivity; if undefined, defaults to 0.0. NOTE: The actual JSON allows a HasSpecular property to be true and the specular value itself undefined, in which case the value 0.4 would be used. This API does not allow this case. */\r\n public specular?: number;\r\n /** If defined, apply this surface environmental reflectivity; stored as fraction of specular in V8 material settings; if undefined, defaults to 0.0 */\r\n public reflect?: number;\r\n /** If defined, apply this surface reflectance color; if undefined, defaults to whatever the specularColor is */\r\n public reflectColor?: number[];\r\n /** If defined, specifies the pattern mapping. */\r\n public patternMap?: TextureMapProps;\r\n\r\n /** Construct a new RenderMaterial.Params object with the specified paletteName. Alter the public members on that object to specify settings. */\r\n public constructor(paletteName: string) {\r\n this.paletteName = paletteName;\r\n }\r\n }\r\n}\r\n"]}
|
package/lib/Model.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Model.d.ts","sourceRoot":"","sources":["../src/Model.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAa,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAW,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,gBAAgB,EAAE,YAAY,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,mBAAmB,EACjG,UAAU,EAAE,cAAc,EAC3B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,yCAAyC;IACzC,MAAM,EAAE,QAAQ,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,gDAAgD;IAChD,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,UAAU;IAC9C,mCAAmC;IACnC,EAAE,EAAE,UAAU,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D,8DAA8D;IAC9D,YAAY,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD,mDAAmD;IACnD,SAAS,EAAE,UAAU,CAAC;CACvB;AAED;;;;GAIG;AACH,qBAAa,KAAM,SAAQ,MAAO,YAAW,UAAU;IACrD,gBAAgB;IAChB,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;CACvE;AAHD,8BAGC;AAED;;GAEG;AACH,MAAa,eAAgB,SAAQ,eAAe;IAClD,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,iBAAiB,CAAC,CAAC,CAAC;CAC7E;AAHD,0CAGC;AAED;;GAEG;AACH,MAAa,gBAAiB,SAAQ,YAAY;IAChD,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,kBAAkB,CAAC,CAAC,CAAC;CAC9E;AAHD,4CAGC","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 Models\r\n */\r\n\r\n// cspell:ignore elid\r\n\r\nimport { GuidString, Id64String, JsonUtils } from \"@itwin/core-bentley\";\r\nimport { Point2d, Range3d } from \"@itwin/core-geometry\";\r\nimport {\r\n AxisAlignedBox3d, ElementProps, GeometricModel2dProps, GeometricModel3dProps, GeometricModelProps, IModel, InformationPartitionElementProps,\r\n ModelProps, RelatedElement,\r\n} from \"@itwin/core-common\";\r\nimport { DefinitionPartition, DocumentPartition, InformationRecordPartition, PhysicalPartition, SpatialLocationPartition } from \"./Element\";\r\nimport { Entity } from \"./Entity\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { SubjectOwnsPartitionElements } from \"./NavigationRelationship\";\r\n\r\n/** Argument for the `Model.onXxx` static methods\r\n * @beta\r\n */\r\nexport interface OnModelArg {\r\n /** The iModel for the Model affected. */\r\n iModel: IModelDb;\r\n}\r\n\r\n/** Argument for the `Model.onXxx` static methods that supply the properties of a Model to be inserted or updated.\r\n * @beta\r\n */\r\nexport interface OnModelPropsArg extends OnModelArg {\r\n /** The new properties of the Model affected. */\r\n props: Readonly<ModelProps>;\r\n}\r\n\r\n/** Argument for the `Model.onXxx` static methods that only supply the Id of the affected Model.\r\n * @beta\r\n */\r\nexport interface OnModelIdArg extends OnModelArg {\r\n /** The Id of the Model affected */\r\n id: Id64String;\r\n}\r\n\r\n/** Argument for the `Model.onXxxElement` static methods that supply the properties of an Element for a Model.\r\n * @beta\r\n */\r\nexport interface OnElementInModelPropsArg extends OnModelIdArg {\r\n /** The new properties of an Element for the affected Model */\r\n elementProps: Readonly<ElementProps>;\r\n}\r\n\r\n/** Argument for the `Model.onXxxElement` static methods that supply the Id of an Element for a Model.\r\n * @beta\r\n */\r\nexport interface OnElementInModelIdArg extends OnModelIdArg {\r\n /** The Id of the Element for the affected Model */\r\n elementId: Id64String;\r\n}\r\n\r\n/** A Model is a container for persisting a collection of related elements within an iModel.\r\n * See [[IModelDb.Models]] for how to query and manage the Models in an IModelDb.\r\n * See [Creating models]($docs/learning/backend/CreateModels.md)\r\n * @public\r\n */\r\nexport class Model extends Entity implements ModelProps {\r\n /** @internal */\r\n public static override get className(): string { return \"Model\"; }\r\n /** @internal */\r\n public static override get protectedOperations() { return [\"onInsert\", \"onUpdate\", \"onDelete\"]; }\r\n public readonly modeledElement!: RelatedElement;\r\n public readonly name: string;\r\n public readonly parentModel!: Id64String;\r\n public readonly jsonProperties: { [key: string]: any };\r\n public isPrivate: boolean;\r\n public isTemplate: boolean;\r\n\r\n /** @internal */\r\n constructor(props: ModelProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.name = props.name ? props.name : \"\"; // NB this isn't really a property of Model (it's the code.value of the modeled element), but it comes in ModelProps because it's often needed\r\n this.isPrivate = JsonUtils.asBool(props.isPrivate);\r\n this.isTemplate = JsonUtils.asBool(props.isTemplate);\r\n this.jsonProperties = { ...props.jsonProperties }; // make sure we have our own copy\r\n }\r\n\r\n /** Add all properties of a Model to a json object.\r\n * @internal\r\n */\r\n public override toJSON(): ModelProps {\r\n const val = super.toJSON() as ModelProps;\r\n val.name = this.name; // for cloning\r\n return val;\r\n }\r\n\r\n /** Called before a new Model is inserted.\r\n * @note throw an exception to disallow the insert\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Model to be inserted\r\n * @beta\r\n */\r\n protected static onInsert(arg: OnModelPropsArg): void {\r\n const { props } = arg;\r\n if (props.parentModel) // inserting requires shared lock on parent, if present\r\n arg.iModel.locks.checkSharedLock(props.parentModel, \"parent model\", \"insert\");\r\n }\r\n\r\n /** Called after a new Model is inserted.\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Model that was inserted\r\n * @beta\r\n */\r\n protected static onInserted(_arg: OnModelIdArg): void {\r\n // we don't need to tell LockControl about models being created - their ModeledElement does that\r\n }\r\n\r\n /** Called before a Model is updated.\r\n * @note throw an exception to disallow the update\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Model to be updated\r\n * @beta\r\n */\r\n protected static onUpdate(arg: OnModelPropsArg): void {\r\n arg.iModel.locks.checkExclusiveLock(arg.props.id!, \"model\", \"update\");\r\n }\r\n\r\n /** Called after a Model is updated.\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Model that was updated.\r\n * @beta\r\n */\r\n protected static onUpdated(_arg: OnModelIdArg): void {\r\n }\r\n\r\n /** Called before a Model is deleted.\r\n * @note throw an exception to disallow the delete\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Model to be deleted\r\n * @beta\r\n */\r\n protected static onDelete(arg: OnModelIdArg): void {\r\n arg.iModel.locks.checkExclusiveLock(arg.id, \"model\", \"delete\");\r\n }\r\n\r\n /** Called after a Model was deleted.\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Model that was deleted\r\n * @beta\r\n */\r\n protected static onDeleted(_arg: OnModelIdArg): void { }\r\n\r\n /** Called before a prospective Element is to be inserted into an instance of a Model of this class.\r\n * @note throw an exception to disallow the insert\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Model to hold the element\r\n * @beta\r\n */\r\n protected static onInsertElement(_arg: OnElementInModelPropsArg): void { }\r\n\r\n /** Called after an Element has been inserted into an instance of a Model of this class.\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Model holding the element\r\n * @beta\r\n */\r\n protected static onInsertedElement(_arg: OnElementInModelIdArg): void { }\r\n\r\n /** Called when an Element in an instance of a Model of this class is about to be updated.\r\n * @note throw an exception to disallow the update\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Model holding the element\r\n * @beta\r\n */\r\n protected static onUpdateElement(_arg: OnElementInModelPropsArg): void { }\r\n\r\n /** Called after an Element in an instance of a Model of this class has been updated.\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Model holding the element\r\n * @beta\r\n */\r\n protected static onUpdatedElement(_arg: OnElementInModelIdArg): void { }\r\n\r\n /** Called when an Element in an instance of a Model of this class is about to be deleted.\r\n * @note throw an exception to disallow the delete\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Model holding the element\r\n * @beta\r\n */\r\n protected static onDeleteElement(_arg: OnElementInModelIdArg): void { }\r\n\r\n /** Called after an Element in an instance of a Model of this class has been deleted.\r\n * @note If you override this method, you must call super.\r\n * @note `this` is the class of the Model that held the element\r\n * @beta\r\n */\r\n protected static onDeletedElement(_arg: OnElementInModelIdArg): void { }\r\n\r\n private getAllUserProperties(): any { if (!this.jsonProperties.UserProps) this.jsonProperties.UserProps = new Object(); return this.jsonProperties.UserProps; }\r\n\r\n /** Get a set of JSON user properties by namespace */\r\n public getUserProperties(namespace: string) { return this.getAllUserProperties()[namespace]; }\r\n\r\n /** Change a set of user JSON properties of this Element by namespace. */\r\n public setUserProperties(nameSpace: string, value: any) { this.getAllUserProperties()[nameSpace] = value; }\r\n\r\n /** Remove a set of JSON user properties, specified by namespace, from this Element */\r\n public removeUserProperties(nameSpace: string) { delete this.getAllUserProperties()[nameSpace]; }\r\n\r\n public getJsonProperty(name: string): any { return this.jsonProperties[name]; }\r\n public setJsonProperty(name: string, value: any) { this.jsonProperties[name] = value; }\r\n\r\n /** Insert this Model in the iModel */\r\n public insert() { return this.iModel.models.insertModel(this); }\r\n /** Update this Model in the iModel. */\r\n public update() { this.iModel.models.updateModel(this); }\r\n /** Delete this Model from the iModel. */\r\n public delete() { this.iModel.models.deleteModel(this.id); }\r\n}\r\n\r\n/** A container for persisting geometric elements.\r\n * @public\r\n */\r\nexport class GeometricModel extends Model implements GeometricModelProps {\r\n public geometryGuid?: GuidString; // Initialized by the Entity constructor\r\n\r\n /** @internal */\r\n public static override get className(): string { return \"GeometricModel\"; }\r\n /** @internal */\r\n constructor(props: GeometricModelProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /** Query for the union of the extents of the elements contained by this model. */\r\n public queryExtents(): AxisAlignedBox3d {\r\n const extents = this.iModel.nativeDb.queryModelExtents({ id: this.id }).modelExtents;\r\n return Range3d.fromJSON(extents);\r\n }\r\n}\r\n\r\n/** A container for persisting 3d geometric elements.\r\n * @public\r\n */\r\nexport abstract class GeometricModel3d extends GeometricModel implements GeometricModel3dProps {\r\n /** If true, then the elements in this GeometricModel3d are expected to be in an XY plane.\r\n * @note The associated ECProperty was added to the BisCore schema in version 1.0.8\r\n */\r\n public readonly isPlanProjection: boolean;\r\n /** If true, then the elements in this GeometricModel3d are not in real-world coordinates and will not be in the spatial index.\r\n * @note The associated ECProperty was added to the BisCore schema in version 1.0.8\r\n */\r\n public readonly isNotSpatiallyLocated: boolean;\r\n /** If true, then the elements in this GeometricModel3d are in real-world coordinates and will be in the spatial index. */\r\n public get isSpatiallyLocated(): boolean { return !this.isNotSpatiallyLocated; }\r\n\r\n /** @internal */\r\n public static override get className(): string { return \"GeometricModel3d\"; }\r\n /** @internal */\r\n constructor(props: GeometricModel3dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.isNotSpatiallyLocated = JsonUtils.asBool(props.isNotSpatiallyLocated);\r\n this.isPlanProjection = JsonUtils.asBool(props.isPlanProjection);\r\n }\r\n /** @internal */\r\n public override toJSON(): GeometricModel3dProps {\r\n const val = super.toJSON() as GeometricModel3dProps;\r\n if (this.isNotSpatiallyLocated) val.isNotSpatiallyLocated = true;\r\n if (this.isPlanProjection) val.isPlanProjection = true;\r\n return val;\r\n }\r\n}\r\n\r\n/** A container for persisting 2d geometric elements.\r\n * @public\r\n */\r\nexport abstract class GeometricModel2d extends GeometricModel implements GeometricModel2dProps {\r\n /** The actual coordinates of (0,0) in modeling coordinates. An offset applied to all modeling coordinates. */\r\n public globalOrigin?: Point2d; // Initialized by the Entity constructor\r\n /** @internal */\r\n public static override get className(): string { return \"GeometricModel2d\"; }\r\n /** @internal */\r\n constructor(props: GeometricModel2dProps, iModel: IModelDb) { super(props, iModel); }\r\n /** @internal */\r\n public override toJSON(): GeometricModel2dProps {\r\n const val = super.toJSON() as GeometricModel2dProps;\r\n if (undefined !== this.globalOrigin) val.globalOrigin = Point2d.fromJSON(this.globalOrigin);\r\n return val;\r\n }\r\n}\r\n\r\n/** A container for persisting 2d graphical elements.\r\n * @public\r\n */\r\nexport abstract class GraphicalModel2d extends GeometricModel2d {\r\n /** @internal */\r\n public static override get className(): string { return \"GraphicalModel2d\"; }\r\n}\r\n\r\n/** A container for persisting GraphicalElement3d instances.\r\n * @note The associated ECClass was added to the BisCore schema in version 1.0.8\r\n * @see [[GraphicalPartition3d]]\r\n * @public\r\n */\r\nexport abstract class GraphicalModel3d extends GeometricModel3d {\r\n /** @internal */\r\n public static override get className(): string { return \"GraphicalModel3d\"; }\r\n}\r\n\r\n/** A container for persisting 3d geometric elements that are spatially located.\r\n * @public\r\n */\r\nexport abstract class SpatialModel extends GeometricModel3d {\r\n /** @internal */\r\n public static override get className(): string { return \"SpatialModel\"; }\r\n}\r\n\r\n/** A container for persisting physical elements that model physical space.\r\n * @see [[PhysicalPartition]]\r\n * @public\r\n */\r\nexport class PhysicalModel extends SpatialModel {\r\n /** @internal */\r\n public static override get className(): string { return \"PhysicalModel\"; }\r\n /** Insert a PhysicalPartition and a PhysicalModel that sub-models it.\r\n * @param iModelDb Insert into this iModel\r\n * @param parentSubjectId The PhysicalPartition will be inserted as a child of this Subject element.\r\n * @param name The name of the PhysicalPartition that the new PhysicalModel will sub-model.\r\n * @param isPlanProjection Optional value (default is false) that indicates if the contents of this model are expected to be in an XY plane.\r\n * @returns The Id of the newly inserted PhysicalPartition and PhysicalModel (same value).\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String {\r\n const partitionProps: InformationPartitionElementProps = {\r\n classFullName: PhysicalPartition.classFullName,\r\n model: IModel.repositoryModelId,\r\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\r\n code: PhysicalPartition.createCode(iModelDb, parentSubjectId, name),\r\n };\r\n const partitionId = iModelDb.elements.insertElement(partitionProps);\r\n const modelProps: GeometricModel3dProps = {\r\n classFullName: this.classFullName,\r\n modeledElement: { id: partitionId },\r\n isPlanProjection,\r\n };\r\n return iModelDb.models.insertModel(modelProps);\r\n }\r\n}\r\n\r\n/** A container for persisting spatial location elements.\r\n * @see [[SpatialLocationPartition]]\r\n * @public\r\n */\r\nexport class SpatialLocationModel extends SpatialModel {\r\n /** @internal */\r\n public static override get className(): string { return \"SpatialLocationModel\"; }\r\n /** Insert a SpatialLocationPartition and a SpatialLocationModel that sub-models it.\r\n * @param iModelDb Insert into this iModel\r\n * @param parentSubjectId The SpatialLocationPartition will be inserted as a child of this Subject element.\r\n * @param name The name of the SpatialLocationPartition that the new SpatialLocationModel will sub-model.\r\n * @param isPlanProjection Optional value (default is false) that indicates if the contents of this model are expected to be in an XY plane.\r\n * @returns The Id of the newly inserted SpatialLocationPartition and SpatialLocationModel (same value).\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String {\r\n const partitionProps: InformationPartitionElementProps = {\r\n classFullName: SpatialLocationPartition.classFullName,\r\n model: IModel.repositoryModelId,\r\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\r\n code: SpatialLocationPartition.createCode(iModelDb, parentSubjectId, name),\r\n };\r\n const partitionId = iModelDb.elements.insertElement(partitionProps);\r\n const modelProps: GeometricModel3dProps = {\r\n classFullName: this.classFullName,\r\n modeledElement: { id: partitionId },\r\n isPlanProjection,\r\n };\r\n return iModelDb.models.insertModel(modelProps);\r\n }\r\n}\r\n\r\n/** A 2d model that holds [[DrawingGraphic]]s. DrawingModels may be dimensional or non-dimensional.\r\n * @public\r\n */\r\nexport class DrawingModel extends GraphicalModel2d {\r\n /** @internal */\r\n public static override get className(): string { return \"DrawingModel\"; }\r\n}\r\n\r\n/** A container for persisting section [[DrawingGraphic]]s.\r\n * @public\r\n */\r\nexport class SectionDrawingModel extends DrawingModel {\r\n /** @internal */\r\n public static override get className(): string { return \"SectionDrawingModel\"; }\r\n}\r\n\r\n/** A container for persisting [[ViewAttachment]]s and [[DrawingGraphic]]s.\r\n * A SheetModel is a digital representation of a *sheet of paper*. SheetModels are 2d models in bounded paper coordinates.\r\n * SheetModels may contain annotation Elements as well as references to 2d or 3d Views.\r\n * @public\r\n */\r\nexport class SheetModel extends GraphicalModel2d {\r\n /** @internal */\r\n public static override get className(): string { return \"SheetModel\"; }\r\n}\r\n\r\n/** A container for persisting role elements.\r\n * @public\r\n */\r\nexport class RoleModel extends Model {\r\n /** @internal */\r\n public static override get className(): string { return \"RoleModel\"; }\r\n}\r\n\r\n/** A container for persisting information elements.\r\n * @public\r\n */\r\nexport abstract class InformationModel extends Model {\r\n /** @internal */\r\n public static override get className(): string { return \"InformationModel\"; }\r\n}\r\n\r\n/** A container for persisting group information elements.\r\n * @see [[GroupInformationPartition]]\r\n * @public\r\n */\r\nexport abstract class GroupInformationModel extends InformationModel {\r\n /** @internal */\r\n public static override get className(): string { return \"GroupInformationModel\"; }\r\n}\r\n\r\n/** A container for persisting Information Record Elements\r\n * @see [[InformationRecordPartition]]\r\n * @public\r\n */\r\nexport class InformationRecordModel extends InformationModel {\r\n /** @internal */\r\n public static override get className(): string { return \"InformationRecordModel\"; }\r\n\r\n /** Insert a InformationRecordPartition and a InformationRecordModel that sub-models it.\r\n * @param iModelDb Insert into this iModel\r\n * @param parentSubjectId The InformationRecordPartition will be inserted as a child of this Subject element.\r\n * @param name The name of the InformationRecordPartition that the new InformationRecordModel will sub-model.\r\n * @returns The Id of the newly inserted InformationRecordModel.\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String {\r\n const partitionProps: InformationPartitionElementProps = {\r\n classFullName: InformationRecordPartition.classFullName,\r\n model: IModel.repositoryModelId,\r\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\r\n code: InformationRecordPartition.createCode(iModelDb, parentSubjectId, name),\r\n };\r\n const partitionId = iModelDb.elements.insertElement(partitionProps);\r\n return iModelDb.models.insertModel({\r\n classFullName: this.classFullName,\r\n modeledElement: { id: partitionId },\r\n });\r\n }\r\n}\r\n\r\n/** A container for persisting definition elements.\r\n * @see [[DefinitionPartition]]\r\n * @public\r\n */\r\nexport class DefinitionModel extends InformationModel {\r\n /** @internal */\r\n public static override get className(): string { return \"DefinitionModel\"; }\r\n\r\n /** Insert a DefinitionPartition and a DefinitionModel that sub-models it.\r\n * @param iModelDb Insert into this iModel\r\n * @param parentSubjectId The DefinitionPartition will be inserted as a child of this Subject element.\r\n * @param name The name of the DefinitionPartition that the new DefinitionModel will sub-model.\r\n * @returns The Id of the newly inserted DefinitionModel.\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String {\r\n const partitionProps: InformationPartitionElementProps = {\r\n classFullName: DefinitionPartition.classFullName,\r\n model: IModel.repositoryModelId,\r\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\r\n code: DefinitionPartition.createCode(iModelDb, parentSubjectId, name),\r\n };\r\n const partitionId = iModelDb.elements.insertElement(partitionProps);\r\n return iModelDb.models.insertModel({\r\n classFullName: this.classFullName,\r\n modeledElement: { id: partitionId },\r\n });\r\n }\r\n}\r\n\r\n/** The singleton container of repository-related information elements.\r\n * @public\r\n */\r\nexport class RepositoryModel extends DefinitionModel {\r\n /** @internal */\r\n public static override get className(): string { return \"RepositoryModel\"; }\r\n}\r\n\r\n/** Contains a list of document elements.\r\n * @see [[DocumentPartition]]\r\n * @public\r\n */\r\nexport class DocumentListModel extends InformationModel {\r\n /** @internal */\r\n public static override get className(): string { return \"DocumentListModel\"; }\r\n /** Insert a DocumentPartition and a DocumentListModel that sub-models it.\r\n * @param iModelDb Insert into this iModel\r\n * @param parentSubjectId The DocumentPartition will be inserted as a child of this Subject element.\r\n * @param name The name of the DocumentPartition that the new DocumentListModel will sub-model.\r\n * @returns The Id of the newly inserted DocumentPartition and DocumentListModel (same value)\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String {\r\n const partitionProps: InformationPartitionElementProps = {\r\n classFullName: DocumentPartition.classFullName,\r\n model: IModel.repositoryModelId,\r\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\r\n code: DocumentPartition.createCode(iModelDb, parentSubjectId, name),\r\n };\r\n const partitionId: Id64String = iModelDb.elements.insertElement(partitionProps);\r\n return iModelDb.models.insertModel({\r\n classFullName: this.classFullName,\r\n modeledElement: { id: partitionId },\r\n });\r\n }\r\n}\r\n\r\n/** A container for persisting link elements.\r\n * @see [[LinkPartition]]\r\n * @public\r\n */\r\nexport class LinkModel extends InformationModel {\r\n /** @internal */\r\n public static override get className(): string { return \"LinkModel\"; }\r\n}\r\n\r\n/** The singleton container for repository-specific definition elements.\r\n * @public\r\n */\r\nexport class DictionaryModel extends DefinitionModel {\r\n /** @internal */\r\n public static override get className(): string { return \"DictionaryModel\"; }\r\n}\r\n\r\n/** Obtains and displays multi-resolution tiled raster organized according to the WebMercator tiling system.\r\n * @public\r\n */\r\nexport class WebMercatorModel extends SpatialModel {\r\n /** @internal */\r\n public static override get className(): string { return \"WebMercatorModel\"; }\r\n}\r\n"]}
|
|
@@ -1 +0,0 @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