@itwin/core-backend 5.12.0-dev.2 → 5.12.0-dev.6

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.
Files changed (176) hide show
  1. package/CHANGELOG.md +15 -1
  2. package/lib/cjs/BackendHubAccess.d.ts +1 -1
  3. package/lib/cjs/BackendHubAccess.js +1 -1
  4. package/lib/cjs/BackendHubAccess.js.map +1 -1
  5. package/lib/cjs/ChangeSummaryManager.d.ts.map +1 -1
  6. package/lib/cjs/ChangeSummaryManager.js +33 -37
  7. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  8. package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
  9. package/lib/cjs/ChangesetECAdaptor.js +4 -7
  10. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  11. package/lib/cjs/ClassRegistry.d.ts +1 -1
  12. package/lib/cjs/ClassRegistry.js +1 -1
  13. package/lib/cjs/ClassRegistry.js.map +1 -1
  14. package/lib/cjs/ECDb.d.ts +4 -4
  15. package/lib/cjs/ECDb.d.ts.map +1 -1
  16. package/lib/cjs/ECDb.js +4 -4
  17. package/lib/cjs/ECDb.js.map +1 -1
  18. package/lib/cjs/ECSqlStatement.d.ts +6 -6
  19. package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
  20. package/lib/cjs/ECSqlStatement.js +4 -4
  21. package/lib/cjs/ECSqlStatement.js.map +1 -1
  22. package/lib/cjs/Element.d.ts +1 -1
  23. package/lib/cjs/Element.js +1 -1
  24. package/lib/cjs/Element.js.map +1 -1
  25. package/lib/cjs/ElementAspect.d.ts +1 -1
  26. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  27. package/lib/cjs/ElementAspect.js +7 -11
  28. package/lib/cjs/ElementAspect.js.map +1 -1
  29. package/lib/cjs/ElementTreeWalker.d.ts.map +1 -1
  30. package/lib/cjs/ElementTreeWalker.js +16 -24
  31. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  32. package/lib/cjs/Entity.d.ts +1 -1
  33. package/lib/cjs/Entity.js +1 -1
  34. package/lib/cjs/Entity.js.map +1 -1
  35. package/lib/cjs/IModelDb.d.ts +14 -14
  36. package/lib/cjs/IModelDb.d.ts.map +1 -1
  37. package/lib/cjs/IModelDb.js +77 -97
  38. package/lib/cjs/IModelDb.js.map +1 -1
  39. package/lib/cjs/IModelElementCloneContext.d.ts +1 -1
  40. package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
  41. package/lib/cjs/IModelElementCloneContext.js +1 -1
  42. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  43. package/lib/cjs/IModelHost.d.ts +2 -2
  44. package/lib/cjs/IModelHost.js +2 -2
  45. package/lib/cjs/IModelHost.js.map +1 -1
  46. package/lib/cjs/Relationship.d.ts.map +1 -1
  47. package/lib/cjs/Relationship.js +8 -11
  48. package/lib/cjs/Relationship.js.map +1 -1
  49. package/lib/cjs/SQLiteDb.d.ts +1 -1
  50. package/lib/cjs/SQLiteDb.js +1 -1
  51. package/lib/cjs/SQLiteDb.js.map +1 -1
  52. package/lib/cjs/SqliteStatement.d.ts +1 -1
  53. package/lib/cjs/SqliteStatement.d.ts.map +1 -1
  54. package/lib/cjs/SqliteStatement.js +1 -1
  55. package/lib/cjs/SqliteStatement.js.map +1 -1
  56. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  57. package/lib/cjs/ViewDefinition.js +8 -12
  58. package/lib/cjs/ViewDefinition.js.map +1 -1
  59. package/lib/cjs/ViewStore.d.ts.map +1 -1
  60. package/lib/cjs/ViewStore.js +6 -8
  61. package/lib/cjs/ViewStore.js.map +1 -1
  62. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
  63. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +8 -11
  64. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  65. package/lib/cjs/internal/ChannelAdmin.d.ts.map +1 -1
  66. package/lib/cjs/internal/ChannelAdmin.js +6 -10
  67. package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
  68. package/lib/cjs/internal/annotations/fields.d.ts.map +1 -1
  69. package/lib/cjs/internal/annotations/fields.js +19 -43
  70. package/lib/cjs/internal/annotations/fields.js.map +1 -1
  71. package/lib/cjs/internal/workspace/SettingsSchemasImpl.d.ts.map +1 -1
  72. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js +8 -7
  73. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  74. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -1
  75. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +2 -3
  76. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  77. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  78. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  79. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  80. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  81. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  82. package/lib/cjs/workspace/SettingsSchemas.d.ts +28 -2
  83. package/lib/cjs/workspace/SettingsSchemas.d.ts.map +1 -1
  84. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  85. package/lib/esm/BackendHubAccess.d.ts +1 -1
  86. package/lib/esm/BackendHubAccess.js +1 -1
  87. package/lib/esm/BackendHubAccess.js.map +1 -1
  88. package/lib/esm/ChangeSummaryManager.d.ts.map +1 -1
  89. package/lib/esm/ChangeSummaryManager.js +34 -38
  90. package/lib/esm/ChangeSummaryManager.js.map +1 -1
  91. package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -1
  92. package/lib/esm/ChangesetECAdaptor.js +5 -8
  93. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  94. package/lib/esm/ClassRegistry.d.ts +1 -1
  95. package/lib/esm/ClassRegistry.js +1 -1
  96. package/lib/esm/ClassRegistry.js.map +1 -1
  97. package/lib/esm/ECDb.d.ts +4 -4
  98. package/lib/esm/ECDb.d.ts.map +1 -1
  99. package/lib/esm/ECDb.js +4 -4
  100. package/lib/esm/ECDb.js.map +1 -1
  101. package/lib/esm/ECSqlStatement.d.ts +6 -6
  102. package/lib/esm/ECSqlStatement.d.ts.map +1 -1
  103. package/lib/esm/ECSqlStatement.js +4 -4
  104. package/lib/esm/ECSqlStatement.js.map +1 -1
  105. package/lib/esm/Element.d.ts +1 -1
  106. package/lib/esm/Element.js +1 -1
  107. package/lib/esm/Element.js.map +1 -1
  108. package/lib/esm/ElementAspect.d.ts +1 -1
  109. package/lib/esm/ElementAspect.d.ts.map +1 -1
  110. package/lib/esm/ElementAspect.js +9 -13
  111. package/lib/esm/ElementAspect.js.map +1 -1
  112. package/lib/esm/ElementTreeWalker.d.ts.map +1 -1
  113. package/lib/esm/ElementTreeWalker.js +18 -26
  114. package/lib/esm/ElementTreeWalker.js.map +1 -1
  115. package/lib/esm/Entity.d.ts +1 -1
  116. package/lib/esm/Entity.js +1 -1
  117. package/lib/esm/Entity.js.map +1 -1
  118. package/lib/esm/IModelDb.d.ts +14 -14
  119. package/lib/esm/IModelDb.d.ts.map +1 -1
  120. package/lib/esm/IModelDb.js +78 -98
  121. package/lib/esm/IModelDb.js.map +1 -1
  122. package/lib/esm/IModelElementCloneContext.d.ts +1 -1
  123. package/lib/esm/IModelElementCloneContext.d.ts.map +1 -1
  124. package/lib/esm/IModelElementCloneContext.js +1 -1
  125. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  126. package/lib/esm/IModelHost.d.ts +2 -2
  127. package/lib/esm/IModelHost.js +2 -2
  128. package/lib/esm/IModelHost.js.map +1 -1
  129. package/lib/esm/Relationship.d.ts.map +1 -1
  130. package/lib/esm/Relationship.js +9 -12
  131. package/lib/esm/Relationship.js.map +1 -1
  132. package/lib/esm/SQLiteDb.d.ts +1 -1
  133. package/lib/esm/SQLiteDb.js +1 -1
  134. package/lib/esm/SQLiteDb.js.map +1 -1
  135. package/lib/esm/SqliteStatement.d.ts +1 -1
  136. package/lib/esm/SqliteStatement.d.ts.map +1 -1
  137. package/lib/esm/SqliteStatement.js +1 -1
  138. package/lib/esm/SqliteStatement.js.map +1 -1
  139. package/lib/esm/ViewDefinition.d.ts.map +1 -1
  140. package/lib/esm/ViewDefinition.js +10 -14
  141. package/lib/esm/ViewDefinition.js.map +1 -1
  142. package/lib/esm/ViewStore.d.ts.map +1 -1
  143. package/lib/esm/ViewStore.js +7 -9
  144. package/lib/esm/ViewStore.js.map +1 -1
  145. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
  146. package/lib/esm/annotations/ElementDrivesTextAnnotation.js +10 -13
  147. package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  148. package/lib/esm/internal/ChannelAdmin.d.ts.map +1 -1
  149. package/lib/esm/internal/ChannelAdmin.js +7 -11
  150. package/lib/esm/internal/ChannelAdmin.js.map +1 -1
  151. package/lib/esm/internal/annotations/fields.d.ts.map +1 -1
  152. package/lib/esm/internal/annotations/fields.js +21 -45
  153. package/lib/esm/internal/annotations/fields.js.map +1 -1
  154. package/lib/esm/internal/workspace/SettingsSchemasImpl.d.ts.map +1 -1
  155. package/lib/esm/internal/workspace/SettingsSchemasImpl.js +8 -7
  156. package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  157. package/lib/esm/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -1
  158. package/lib/esm/rpc-impl/IModelReadRpcImpl.js +2 -3
  159. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  160. package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  161. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  162. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  163. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  164. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  165. package/lib/esm/test/TestUtils.d.ts +1 -1
  166. package/lib/esm/test/TestUtils.d.ts.map +1 -1
  167. package/lib/esm/test/TestUtils.js +1 -1
  168. package/lib/esm/test/TestUtils.js.map +1 -1
  169. package/lib/esm/test/imodel/IModel.test.js +7 -1
  170. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  171. package/lib/esm/test/standalone/SettingsSchemas.test.js +6 -0
  172. package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
  173. package/lib/esm/workspace/SettingsSchemas.d.ts +28 -2
  174. package/lib/esm/workspace/SettingsSchemas.d.ts.map +1 -1
  175. package/lib/esm/workspace/SettingsSchemas.js.map +1 -1
  176. package/package.json +13 -13
@@ -1 +1 @@
1
- {"version":3,"file":"IModelReadRpcImpl.d.ts","sourceRoot":"","sources":["../../../src/rpc-impl/IModelReadRpcImpl.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAC2C,iBAAiB,EAAE,UAAU,EAAQ,UAAU,EAChG,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACC,SAAS,EAAE,+BAA+B,EAAE,sBAAsB,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EACxI,kBAAkB,EAAoB,uBAAuB,EAAE,YAAY,EAAkB,iBAAiB,EAAE,YAAY,EAC5H,0BAA0B,EAAE,2BAA2B,EAAE,+BAA+B,EAAE,gCAAgC,EAC1H,2BAA2B,EAAE,4BAA4B,EAAE,6BAA6B,EAA6B,qBAAqB,EAC1I,6BAA6B,EAAE,8BAA8B,EAAe,sBAAsB,EAAE,kBAAkB,EAAE,cAAc,EACtI,sCAAsC,EAAE,uCAAuC,EAAE,0BAA0B,EAAE,2BAA2B,EACxI,iBAAiB,EAAE,UAAU,EAAkB,YAAY,EAAkC,gBAAgB,EAAE,iBAAiB,EAChI,oBAAoB,EAAY,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,cAA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M,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAMvG,sCAAsC,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,6BAA6B,GAAG,OAAO,CAAC,8BAA8B,CAAC;IAKjJ,sCAAsC,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAK3I,gBAAgB,CAAC,UAAU,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;IAKlH,qBAAqB,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,UAAU,CAAC;IAKnH,gBAAgB;IACH,aAAa,CAAC,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;CAc7I"}
@@ -194,9 +194,8 @@ class IModelReadRpcImpl extends core_common_1.RpcInterface {
194
194
  async getAllCodeSpecs(tokenProps) {
195
195
  const codeSpecs = [];
196
196
  const iModelDb = await getIModelForRpc(tokenProps);
197
- // eslint-disable-next-line @typescript-eslint/no-deprecated
198
- iModelDb.withPreparedStatement("SELECT ECInstanceId AS id, name, jsonProperties FROM BisCore.CodeSpec", (statement) => {
199
- for (const row of statement)
197
+ iModelDb.withQueryReader("SELECT ECInstanceId AS id, name, jsonProperties FROM BisCore.CodeSpec", (reader) => {
198
+ for (const row of reader)
200
199
  codeSpecs.push({ id: row.id, name: row.name, jsonProperties: JSON.parse(row.jsonProperties) });
201
200
  });
202
201
  return codeSpecs;
@@ -1 +1 @@
1
- {"version":3,"file":"IModelReadRpcImpl.js","sourceRoot":"","sources":["../../../src/rpc-impl/IModelReadRpcImpl.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;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UAAU;YAC5B,MAAM,IAAI,yBAAW,CAAC,2BAAY,CAAC,gBAAgB,EAAE,+BAA+B,UAAU,GAAG,CAAC,CAAC;QAErG,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IACpC,CAAC;CACF;AArSD,8CAqSC","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 RpcInterface\n */\n\nimport {\n AccessToken, assert, BeDuration, BentleyStatus, CompressedId64Set, GuidString, Id64, Id64String, IModelStatus, Logger,\n} from \"@itwin/core-bentley\";\nimport {\n Code, CodeProps, CustomViewState3dCreatorOptions, CustomViewState3dProps, DbBlobRequest, DbBlobResponse, DbQueryRequest, DbQueryResponse,\n ElementLoadOptions, ElementLoadProps, ElementMeshRequestProps, ElementProps, EntityMetaData, EntityQueryParams, FontMapProps,\n GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, GeometryContainmentRequestProps, GeometryContainmentResponseProps,\n GeometrySummaryRequestProps, HydrateViewStateRequestProps, HydrateViewStateResponseProps, ImageSourceFormat, IModel, IModelConnectionProps,\n IModelCoordinatesRequestProps, IModelCoordinatesResponseProps, IModelError, IModelReadRpcInterface, IModelRpcOpenProps, IModelRpcProps,\n MassPropertiesPerCandidateRequestProps, MassPropertiesPerCandidateResponseProps, MassPropertiesRequestProps, MassPropertiesResponseProps,\n ModelExtentsProps, ModelProps, NoContentError, RpcInterface, RpcManager, RpcPendingResponse, SnapRequestProps, SnapResponseProps,\n SubCategoryResultRow, SyncMode, TextureData, TextureLoadProps, ViewStateLoadProps, ViewStateProps,\n ViewStoreRpc,\n} from \"@itwin/core-common\";\nimport { Range3dProps } from \"@itwin/core-geometry\";\nimport { BackendLoggerCategory } from \"../BackendLoggerCategory\";\nimport { SpatialCategory } from \"../Category\";\nimport { ConcurrentQuery } from \"../ConcurrentQuery\";\nimport { CustomViewState3dCreator } from \"../CustomViewState3dCreator\";\nimport { generateGeometrySummaries } from \"../GeometrySummary\";\nimport { IModelDb } from \"../IModelDb\";\nimport { DictionaryModel } from \"../Model\";\nimport { PromiseMemoizer } from \"../PromiseMemoizer\";\nimport { RpcTrace } from \"../rpc/tracing\";\nimport { ViewStateHydrator } from \"../ViewStateHydrator\";\nimport { RpcBriefcaseUtility } from \"./RpcBriefcaseUtility\";\nimport { _nativeDb } from \"../internal/Symbols\";\n\ninterface ViewStateRequestProps {\n accessToken: AccessToken;\n tokenProps: IModelRpcProps;\n options: CustomViewState3dCreatorOptions;\n}\n\nclass ViewStateRequestMemoizer extends PromiseMemoizer<CustomViewState3dProps> {\n private readonly _timeoutMs: number;\n private static _instance?: ViewStateRequestMemoizer;\n\n public static async perform(props: ViewStateRequestProps): Promise<CustomViewState3dProps> {\n if (!this._instance)\n this._instance = new ViewStateRequestMemoizer();\n\n return this._instance.perform(props);\n }\n\n private constructor() {\n const memoize = async (props: ViewStateRequestProps) => {\n const db = await RpcBriefcaseUtility.findOpenIModel(props.accessToken, props.tokenProps);\n const viewCreator = new CustomViewState3dCreator(db);\n return viewCreator.getCustomViewState3dData(props.options);\n };\n\n const stringify = (props: ViewStateRequestProps) => {\n const token = props.tokenProps;\n const modelIds = props.options.modelIds;\n return `${token.key}-${token.iTwinId}-${token.iModelId}-${token.changeset?.id}:${modelIds}`;\n };\n\n super(memoize, stringify);\n this._timeoutMs = 20 * 1000;\n }\n\n private async perform(props: ViewStateRequestProps): Promise<CustomViewState3dProps> {\n const memo = this.memoize(props);\n\n // Rejections must be caught so that the memoization entry is deleted.\n await BeDuration.race(this._timeoutMs, memo.promise).catch(() => undefined);\n\n if (memo.isPending)\n throw new RpcPendingResponse(); // eslint-disable-line @typescript-eslint/only-throw-error\n\n this.deleteMemoized(props);\n\n if (memo.isFulfilled) {\n assert(undefined !== memo.result);\n return memo.result;\n }\n\n assert(memo.isRejected);\n throw memo.error;\n }\n}\n\nfunction currentActivity() {\n return RpcTrace.expectCurrentActivity;\n}\n\nasync function getIModelForRpc(tokenProps: IModelRpcProps): Promise<IModelDb> {\n return RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\n}\n\n/** The backend implementation of IModelReadRpcInterface.\n * @internal\n */\nexport class IModelReadRpcImpl extends RpcInterface implements IModelReadRpcInterface {\n\n public static register() { RpcManager.registerImpl(IModelReadRpcInterface, IModelReadRpcImpl); }\n\n public async getConnectionProps(tokenProps: IModelRpcOpenProps): Promise<IModelConnectionProps> {\n return RpcBriefcaseUtility.openWithTimeout(currentActivity(), tokenProps, SyncMode.FixedVersion);\n }\n\n public async getCustomViewState3dData(tokenProps: IModelRpcProps, options: CustomViewState3dCreatorOptions): Promise<CustomViewState3dProps> {\n const accessToken = currentActivity().accessToken;\n return ViewStateRequestMemoizer.perform({ accessToken, tokenProps, options });\n }\n\n public async hydrateViewState(tokenProps: IModelRpcProps, options: HydrateViewStateRequestProps): Promise<HydrateViewStateResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const viewHydrater = new ViewStateHydrator(iModelDb);\n return viewHydrater.getHydrateResponseProps(options);\n }\n\n public async queryAllUsedSpatialSubCategories(tokenProps: IModelRpcProps): Promise<SubCategoryResultRow[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.queryAllUsedSpatialSubCategories();\n }\n\n public async querySubCategories(tokenProps: IModelRpcProps, compressedCategoryIds: CompressedId64Set): Promise<SubCategoryResultRow[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const decompressedIds = CompressedId64Set.decompressArray(compressedCategoryIds);\n return iModelDb.querySubCategories(decompressedIds);\n }\n\n public async queryRows(tokenProps: IModelRpcProps, request: DbQueryRequest): Promise<DbQueryResponse> {\n const iModelDb = await getIModelForRpc(tokenProps);\n if (iModelDb.isReadonly && request.usePrimaryConn === true) {\n Logger.logWarning(BackendLoggerCategory.IModelDb, \"usePrimaryConn is only supported on imodel that is opened in read/write mode. The option will be ignored.\", request);\n request.usePrimaryConn = false;\n }\n return ConcurrentQuery.executeQueryRequest(iModelDb[_nativeDb], request);\n }\n\n public async queryBlob(tokenProps: IModelRpcProps, request: DbBlobRequest): Promise<DbBlobResponse> {\n const iModelDb = await getIModelForRpc(tokenProps);\n if (iModelDb.isReadonly && request.usePrimaryConn === true) {\n Logger.logWarning(BackendLoggerCategory.IModelDb, \"usePrimaryConn is only supported on imodel that is opened in read/write mode. The option will be ignored.\", request);\n request.usePrimaryConn = false;\n }\n return ConcurrentQuery.executeBlobRequest(iModelDb[_nativeDb], request);\n }\n\n public async queryModelRanges(tokenProps: IModelRpcProps, modelIds: Id64String[]): Promise<Range3dProps[]> {\n const results = await this.queryModelExtents(tokenProps, modelIds);\n if (results.length === 1 && results[0].status !== IModelStatus.Success)\n throw new IModelError(results[0].status, \"error querying model range\");\n\n return results.filter((x) => x.status === IModelStatus.Success).map((x) => x.extents);\n }\n\n public async queryModelExtents(tokenProps: IModelRpcProps, modelIds: Id64String[]): Promise<ModelExtentsProps[]> {\n const iModel = await getIModelForRpc(tokenProps);\n return iModel.models.queryExtents(modelIds);\n }\n\n public async getModelProps(tokenProps: IModelRpcProps, modelIdsList: Id64String[]): Promise<ModelProps[]> {\n const modelIds = new Set(modelIdsList);\n const iModelDb = await getIModelForRpc(tokenProps);\n const modelJsonArray: ModelProps[] = [];\n for (const id of modelIds) {\n try {\n const modelProps = iModelDb.models.getModelProps(id);\n modelJsonArray.push(modelProps);\n } catch (error) {\n if (modelIds.size === 1)\n throw error; // if they're asking for more than one model, don't throw on error.\n }\n }\n return modelJsonArray;\n }\n\n public async queryModelProps(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<ModelProps[]> {\n const ids = await this.queryEntityIds(tokenProps, params);\n return this.getModelProps(tokenProps, [...ids]);\n }\n\n public async getElementProps(tokenProps: IModelRpcProps, elementIdsList: Id64String[]): Promise<ElementProps[]> {\n const elementIds = new Set(elementIdsList);\n const iModelDb = await getIModelForRpc(tokenProps);\n const elementProps: ElementProps[] = [];\n for (const id of elementIds) {\n try {\n elementProps.push(iModelDb.elements.getElementProps({ id }));\n } catch (error) {\n if (elementIds.size === 1)\n throw error; // if they're asking for more than one element, don't throw on error.\n }\n }\n return elementProps;\n }\n\n public async loadElementProps(tokenProps: IModelRpcProps, identifier: Id64String | GuidString | CodeProps, options?: ElementLoadOptions): Promise<ElementProps | undefined> {\n const props: ElementLoadProps = options ? { ...options } : {};\n if (typeof identifier === \"string\") {\n if (Id64.isId64(identifier))\n props.id = identifier;\n else\n props.federationGuid = identifier;\n } else {\n props.code = Code.fromJSON(identifier);\n }\n\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.elements.tryGetElementProps(props);\n }\n\n public async getGeometrySummary(tokenProps: IModelRpcProps, request: GeometrySummaryRequestProps): Promise<string> {\n const iModel = await getIModelForRpc(tokenProps);\n return generateGeometrySummaries(request, iModel);\n }\n\n public async queryElementProps(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<ElementProps[]> {\n const ids = await this.queryEntityIds(tokenProps, params);\n const res = this.getElementProps(tokenProps, [...ids]);\n return res;\n }\n\n public async queryEntityIds(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<Id64String[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const res = iModelDb.queryEntityIds(params);\n return [...res];\n }\n\n public async getClassHierarchy(tokenProps: IModelRpcProps, classFullName: string): Promise<string[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const classArray: string[] = [];\n while (true) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const classMetaData: EntityMetaData = iModelDb.getMetaData(classFullName);\n classArray.push(classFullName);\n if (!classMetaData.baseClasses || classMetaData.baseClasses.length === 0)\n break;\n\n classFullName = classMetaData.baseClasses[0];\n }\n return classArray;\n }\n\n public async getAllCodeSpecs(tokenProps: IModelRpcProps): Promise<any[]> {\n const codeSpecs: any[] = [];\n const iModelDb = await getIModelForRpc(tokenProps);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n iModelDb.withPreparedStatement(\"SELECT ECInstanceId AS id, name, jsonProperties FROM BisCore.CodeSpec\", (statement) => {\n for (const row of statement)\n codeSpecs.push({ id: row.id, name: row.name, jsonProperties: JSON.parse(row.jsonProperties) });\n });\n return codeSpecs;\n }\n\n public async getViewStateData(tokenProps: IModelRpcProps, viewDefinitionId: string, options?: ViewStateLoadProps): Promise<ViewStateProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.views.getViewStateProps(viewDefinitionId, options);\n }\n\n public async readFontJson(tokenProps: IModelRpcProps): Promise<FontMapProps> { // eslint-disable-line @typescript-eslint/no-deprecated\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb[_nativeDb].readFontMap();\n }\n\n public async requestSnap(tokenProps: IModelRpcProps, sessionId: string, props: SnapRequestProps): Promise<SnapResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.requestSnap(sessionId, props);\n }\n\n public async cancelSnap(tokenProps: IModelRpcProps, sessionId: string): Promise<void> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.cancelSnap(sessionId);\n }\n\n public async getGeometryContainment(tokenProps: IModelRpcProps, props: GeometryContainmentRequestProps): Promise<GeometryContainmentResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.getGeometryContainment(props);\n }\n\n public async getMassProperties(tokenProps: IModelRpcProps, props: MassPropertiesRequestProps): Promise<MassPropertiesResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.getMassProperties(props);\n }\n\n public async getMassPropertiesPerCandidate(tokenProps: IModelRpcProps, props: MassPropertiesPerCandidateRequestProps): Promise<MassPropertiesPerCandidateResponseProps[]> { // eslint-disable-line @typescript-eslint/no-deprecated\n const iModelDb = await getIModelForRpc(tokenProps);\n\n const getSingleCandidateMassProperties = async (candidate: string) => {\n try {\n const massPropResults: MassPropertiesResponseProps[] = [];\n\n for (const op of props.operations) {\n const massProperties = await iModelDb.getMassProperties({ operation: op, candidates: [candidate] });\n massPropResults.push(massProperties);\n }\n\n let singleCandidateResult: MassPropertiesPerCandidateResponseProps = { status: BentleyStatus.ERROR, candidate }; // eslint-disable-line @typescript-eslint/no-deprecated\n\n if (massPropResults.some((r) => r.status !== BentleyStatus.ERROR)) {\n singleCandidateResult.status = BentleyStatus.SUCCESS;\n for (const r of massPropResults.filter((mpr) => mpr.status !== BentleyStatus.ERROR)) {\n singleCandidateResult = { ...singleCandidateResult, ...r };\n }\n }\n\n return singleCandidateResult;\n } catch {\n return { status: BentleyStatus.ERROR, candidate };\n }\n };\n\n const promises: Promise<MassPropertiesPerCandidateResponseProps>[] = []; // eslint-disable-line @typescript-eslint/no-deprecated\n\n for (const candidate of CompressedId64Set.iterable(props.candidates)) {\n promises.push(getSingleCandidateMassProperties(candidate));\n }\n\n return Promise.all(promises);\n }\n\n public async getToolTipMessage(tokenProps: IModelRpcProps, id: string): Promise<string[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const el = iModelDb.elements.getElement(id);\n return (el === undefined) ? [] : el.getToolTipMessage();\n }\n\n /** Send a view thumbnail to the frontend. This is a binary transfer with the metadata in a 16-byte prefix header.\n * @deprecated in 3.6.0 - might be removed in next major version. Use queryViewThumbnail instead\n */\n public async getViewThumbnail(tokenProps: IModelRpcProps, viewId: string): Promise<Uint8Array> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const thumbnail = iModelDb.views.getThumbnail(viewId);\n if (undefined === thumbnail || 0 === thumbnail.image.length)\n throw new NoContentError();\n\n const val = new Uint8Array(thumbnail.image.length + 16); // allocate a new buffer 16 bytes larger than the image size\n new Uint32Array(val.buffer, 0, 4).set([thumbnail.image.length, thumbnail.format === \"jpeg\" ? ImageSourceFormat.Jpeg : ImageSourceFormat.Png, thumbnail.width, thumbnail.height]); // Put the metadata in the first 16 bytes.\n val.set(thumbnail.image, 16); // put the image data at offset 16 after metadata\n return val;\n }\n\n public async getDefaultViewId(tokenProps: IModelRpcProps): Promise<Id64String> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const spec = { namespace: \"dgn_View\", name: \"DefaultView\" };\n const blob = iModelDb.queryFilePropertyBlob(spec);\n if (undefined === blob || 8 !== blob.length)\n return Id64.invalid;\n\n const view = new Uint32Array(blob.buffer);\n return Id64.fromUint32Pair(view[0], view[1]);\n }\n public async getSpatialCategoryId(tokenProps: IModelRpcProps, categoryName: string): Promise<Id64String | undefined> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const dictionary: DictionaryModel = iModelDb.models.getModel<DictionaryModel>(IModel.dictionaryId);\n return SpatialCategory.queryCategoryIdByName(iModelDb, dictionary.id, categoryName);\n }\n\n public async getIModelCoordinatesFromGeoCoordinates(tokenProps: IModelRpcProps, props: IModelCoordinatesRequestProps): Promise<IModelCoordinatesResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.getIModelCoordinatesFromGeoCoordinates(props);\n }\n\n public async getGeoCoordinatesFromIModelCoordinates(tokenProps: IModelRpcProps, props: GeoCoordinatesRequestProps): Promise<GeoCoordinatesResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.getGeoCoordinatesFromIModelCoordinates(props);\n }\n\n public async queryTextureData(tokenProps: IModelRpcProps, textureLoadProps: TextureLoadProps): Promise<TextureData | undefined> {\n const db = await getIModelForRpc(tokenProps);\n return db.queryTextureData(textureLoadProps);\n }\n\n public async generateElementMeshes(tokenProps: IModelRpcProps, props: ElementMeshRequestProps): Promise<Uint8Array> {\n const db = await getIModelForRpc(tokenProps);\n return db[_nativeDb].generateElementMeshes(props);\n }\n\n /** @internal */\n public async callViewStore(tokenProps: IModelRpcProps, version: string, forWrite: boolean, methodName: string, ...args: any[]): Promise<any> {\n if (!RpcInterface.isVersionCompatible(ViewStoreRpc.version, version))\n throw new Error(\"ViewStoreRpc version mismatch\");\n\n const db = await getIModelForRpc(tokenProps);\n const viewStore = await db.views.accessViewStore({ accessLevel: forWrite ? \"write\" : \"read\" });\n const access = viewStore[forWrite ? \"writeLocker\" : \"reader\"] as any;\n\n const func = access[methodName];\n if (typeof func !== \"function\")\n throw new IModelError(IModelStatus.FunctionNotFound, `Illegal ViewStore RPC call \"${methodName}\"`);\n\n return func.call(access, ...args);\n }\n}\n"]}
1
+ {"version":3,"file":"IModelReadRpcImpl.js","sourceRoot":"","sources":["../../../src/rpc-impl/IModelReadRpcImpl.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAE6B;AAC7B,oDAU4B;AAE5B,oEAAiE;AACjE,0CAA8C;AAC9C,wDAAqD;AACrD,0EAAuE;AACvE,wDAA+D;AAG/D,wDAAqD;AACrD,4CAA0C;AAC1C,4DAAyD;AACzD,+DAA4D;AAC5D,iDAAgD;AAQhD,MAAM,wBAAyB,SAAQ,iCAAuC;IAC3D,UAAU,CAAS;IAC5B,MAAM,CAAC,SAAS,CAA4B;IAE7C,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,KAA4B;QACtD,IAAI,CAAC,IAAI,CAAC,SAAS;YACjB,IAAI,CAAC,SAAS,GAAG,IAAI,wBAAwB,EAAE,CAAC;QAElD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAED;QACE,MAAM,OAAO,GAAG,KAAK,EAAE,KAA4B,EAAE,EAAE;YACrD,MAAM,EAAE,GAAG,MAAM,yCAAmB,CAAC,cAAc,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;YACzF,MAAM,WAAW,GAAG,IAAI,mDAAwB,CAAC,EAAE,CAAC,CAAC;YACrD,OAAO,WAAW,CAAC,wBAAwB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC7D,CAAC,CAAC;QAEF,MAAM,SAAS,GAAG,CAAC,KAA4B,EAAE,EAAE;YACjD,MAAM,KAAK,GAAG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AAG,MAAM,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAC/F,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAQ,CAAC;QAErE,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;QAChC,IAAI,OAAO,IAAI,KAAK,UAAU;YAC5B,MAAM,IAAI,yBAAW,CAAC,2BAAY,CAAC,gBAAgB,EAAE,+BAA+B,UAAU,GAAG,CAAC,CAAC;QAErG,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IACpC,CAAC;CACF;AApSD,8CAoSC","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 RpcInterface\n */\n\nimport {\n AccessToken, assert, BeDuration, BentleyStatus, CompressedId64Set, GuidString, Id64, Id64String, IModelStatus, Logger,\n} from \"@itwin/core-bentley\";\nimport {\n Code, CodeProps, CustomViewState3dCreatorOptions, CustomViewState3dProps, DbBlobRequest, DbBlobResponse, DbQueryRequest, DbQueryResponse,\n ElementLoadOptions, ElementLoadProps, ElementMeshRequestProps, ElementProps, EntityMetaData, EntityQueryParams, FontMapProps,\n GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, GeometryContainmentRequestProps, GeometryContainmentResponseProps,\n GeometrySummaryRequestProps, HydrateViewStateRequestProps, HydrateViewStateResponseProps, ImageSourceFormat, IModel, IModelConnectionProps,\n IModelCoordinatesRequestProps, IModelCoordinatesResponseProps, IModelError, IModelReadRpcInterface, IModelRpcOpenProps, IModelRpcProps,\n MassPropertiesPerCandidateRequestProps, MassPropertiesPerCandidateResponseProps, MassPropertiesRequestProps, MassPropertiesResponseProps,\n ModelExtentsProps, ModelProps, NoContentError, RpcInterface, RpcManager, RpcPendingResponse, SnapRequestProps, SnapResponseProps,\n SubCategoryResultRow, SyncMode, TextureData, TextureLoadProps, ViewStateLoadProps, ViewStateProps,\n ViewStoreRpc,\n} from \"@itwin/core-common\";\nimport { Range3dProps } from \"@itwin/core-geometry\";\nimport { BackendLoggerCategory } from \"../BackendLoggerCategory\";\nimport { SpatialCategory } from \"../Category\";\nimport { ConcurrentQuery } from \"../ConcurrentQuery\";\nimport { CustomViewState3dCreator } from \"../CustomViewState3dCreator\";\nimport { generateGeometrySummaries } from \"../GeometrySummary\";\nimport { IModelDb } from \"../IModelDb\";\nimport { DictionaryModel } from \"../Model\";\nimport { PromiseMemoizer } from \"../PromiseMemoizer\";\nimport { RpcTrace } from \"../rpc/tracing\";\nimport { ViewStateHydrator } from \"../ViewStateHydrator\";\nimport { RpcBriefcaseUtility } from \"./RpcBriefcaseUtility\";\nimport { _nativeDb } from \"../internal/Symbols\";\n\ninterface ViewStateRequestProps {\n accessToken: AccessToken;\n tokenProps: IModelRpcProps;\n options: CustomViewState3dCreatorOptions;\n}\n\nclass ViewStateRequestMemoizer extends PromiseMemoizer<CustomViewState3dProps> {\n private readonly _timeoutMs: number;\n private static _instance?: ViewStateRequestMemoizer;\n\n public static async perform(props: ViewStateRequestProps): Promise<CustomViewState3dProps> {\n if (!this._instance)\n this._instance = new ViewStateRequestMemoizer();\n\n return this._instance.perform(props);\n }\n\n private constructor() {\n const memoize = async (props: ViewStateRequestProps) => {\n const db = await RpcBriefcaseUtility.findOpenIModel(props.accessToken, props.tokenProps);\n const viewCreator = new CustomViewState3dCreator(db);\n return viewCreator.getCustomViewState3dData(props.options);\n };\n\n const stringify = (props: ViewStateRequestProps) => {\n const token = props.tokenProps;\n const modelIds = props.options.modelIds;\n return `${token.key}-${token.iTwinId}-${token.iModelId}-${token.changeset?.id}:${modelIds}`;\n };\n\n super(memoize, stringify);\n this._timeoutMs = 20 * 1000;\n }\n\n private async perform(props: ViewStateRequestProps): Promise<CustomViewState3dProps> {\n const memo = this.memoize(props);\n\n // Rejections must be caught so that the memoization entry is deleted.\n await BeDuration.race(this._timeoutMs, memo.promise).catch(() => undefined);\n\n if (memo.isPending)\n throw new RpcPendingResponse(); // eslint-disable-line @typescript-eslint/only-throw-error\n\n this.deleteMemoized(props);\n\n if (memo.isFulfilled) {\n assert(undefined !== memo.result);\n return memo.result;\n }\n\n assert(memo.isRejected);\n throw memo.error;\n }\n}\n\nfunction currentActivity() {\n return RpcTrace.expectCurrentActivity;\n}\n\nasync function getIModelForRpc(tokenProps: IModelRpcProps): Promise<IModelDb> {\n return RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\n}\n\n/** The backend implementation of IModelReadRpcInterface.\n * @internal\n */\nexport class IModelReadRpcImpl extends RpcInterface implements IModelReadRpcInterface {\n\n public static register() { RpcManager.registerImpl(IModelReadRpcInterface, IModelReadRpcImpl); }\n\n public async getConnectionProps(tokenProps: IModelRpcOpenProps): Promise<IModelConnectionProps> {\n return RpcBriefcaseUtility.openWithTimeout(currentActivity(), tokenProps, SyncMode.FixedVersion);\n }\n\n public async getCustomViewState3dData(tokenProps: IModelRpcProps, options: CustomViewState3dCreatorOptions): Promise<CustomViewState3dProps> {\n const accessToken = currentActivity().accessToken;\n return ViewStateRequestMemoizer.perform({ accessToken, tokenProps, options });\n }\n\n public async hydrateViewState(tokenProps: IModelRpcProps, options: HydrateViewStateRequestProps): Promise<HydrateViewStateResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const viewHydrater = new ViewStateHydrator(iModelDb);\n return viewHydrater.getHydrateResponseProps(options);\n }\n\n public async queryAllUsedSpatialSubCategories(tokenProps: IModelRpcProps): Promise<SubCategoryResultRow[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.queryAllUsedSpatialSubCategories();\n }\n\n public async querySubCategories(tokenProps: IModelRpcProps, compressedCategoryIds: CompressedId64Set): Promise<SubCategoryResultRow[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const decompressedIds = CompressedId64Set.decompressArray(compressedCategoryIds);\n return iModelDb.querySubCategories(decompressedIds);\n }\n\n public async queryRows(tokenProps: IModelRpcProps, request: DbQueryRequest): Promise<DbQueryResponse> {\n const iModelDb = await getIModelForRpc(tokenProps);\n if (iModelDb.isReadonly && request.usePrimaryConn === true) {\n Logger.logWarning(BackendLoggerCategory.IModelDb, \"usePrimaryConn is only supported on imodel that is opened in read/write mode. The option will be ignored.\", request);\n request.usePrimaryConn = false;\n }\n return ConcurrentQuery.executeQueryRequest(iModelDb[_nativeDb], request);\n }\n\n public async queryBlob(tokenProps: IModelRpcProps, request: DbBlobRequest): Promise<DbBlobResponse> {\n const iModelDb = await getIModelForRpc(tokenProps);\n if (iModelDb.isReadonly && request.usePrimaryConn === true) {\n Logger.logWarning(BackendLoggerCategory.IModelDb, \"usePrimaryConn is only supported on imodel that is opened in read/write mode. The option will be ignored.\", request);\n request.usePrimaryConn = false;\n }\n return ConcurrentQuery.executeBlobRequest(iModelDb[_nativeDb], request);\n }\n\n public async queryModelRanges(tokenProps: IModelRpcProps, modelIds: Id64String[]): Promise<Range3dProps[]> {\n const results = await this.queryModelExtents(tokenProps, modelIds);\n if (results.length === 1 && results[0].status !== IModelStatus.Success)\n throw new IModelError(results[0].status, \"error querying model range\");\n\n return results.filter((x) => x.status === IModelStatus.Success).map((x) => x.extents);\n }\n\n public async queryModelExtents(tokenProps: IModelRpcProps, modelIds: Id64String[]): Promise<ModelExtentsProps[]> {\n const iModel = await getIModelForRpc(tokenProps);\n return iModel.models.queryExtents(modelIds);\n }\n\n public async getModelProps(tokenProps: IModelRpcProps, modelIdsList: Id64String[]): Promise<ModelProps[]> {\n const modelIds = new Set(modelIdsList);\n const iModelDb = await getIModelForRpc(tokenProps);\n const modelJsonArray: ModelProps[] = [];\n for (const id of modelIds) {\n try {\n const modelProps = iModelDb.models.getModelProps(id);\n modelJsonArray.push(modelProps);\n } catch (error) {\n if (modelIds.size === 1)\n throw error; // if they're asking for more than one model, don't throw on error.\n }\n }\n return modelJsonArray;\n }\n\n public async queryModelProps(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<ModelProps[]> {\n const ids = await this.queryEntityIds(tokenProps, params);\n return this.getModelProps(tokenProps, [...ids]);\n }\n\n public async getElementProps(tokenProps: IModelRpcProps, elementIdsList: Id64String[]): Promise<ElementProps[]> {\n const elementIds = new Set(elementIdsList);\n const iModelDb = await getIModelForRpc(tokenProps);\n const elementProps: ElementProps[] = [];\n for (const id of elementIds) {\n try {\n elementProps.push(iModelDb.elements.getElementProps({ id }));\n } catch (error) {\n if (elementIds.size === 1)\n throw error; // if they're asking for more than one element, don't throw on error.\n }\n }\n return elementProps;\n }\n\n public async loadElementProps(tokenProps: IModelRpcProps, identifier: Id64String | GuidString | CodeProps, options?: ElementLoadOptions): Promise<ElementProps | undefined> {\n const props: ElementLoadProps = options ? { ...options } : {};\n if (typeof identifier === \"string\") {\n if (Id64.isId64(identifier))\n props.id = identifier;\n else\n props.federationGuid = identifier;\n } else {\n props.code = Code.fromJSON(identifier);\n }\n\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.elements.tryGetElementProps(props);\n }\n\n public async getGeometrySummary(tokenProps: IModelRpcProps, request: GeometrySummaryRequestProps): Promise<string> {\n const iModel = await getIModelForRpc(tokenProps);\n return generateGeometrySummaries(request, iModel);\n }\n\n public async queryElementProps(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<ElementProps[]> {\n const ids = await this.queryEntityIds(tokenProps, params);\n const res = this.getElementProps(tokenProps, [...ids]);\n return res;\n }\n\n public async queryEntityIds(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<Id64String[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const res = iModelDb.queryEntityIds(params);\n return [...res];\n }\n\n public async getClassHierarchy(tokenProps: IModelRpcProps, classFullName: string): Promise<string[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const classArray: string[] = [];\n while (true) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const classMetaData: EntityMetaData = iModelDb.getMetaData(classFullName);\n classArray.push(classFullName);\n if (!classMetaData.baseClasses || classMetaData.baseClasses.length === 0)\n break;\n\n classFullName = classMetaData.baseClasses[0];\n }\n return classArray;\n }\n\n public async getAllCodeSpecs(tokenProps: IModelRpcProps): Promise<any[]> {\n const codeSpecs: any[] = [];\n const iModelDb = await getIModelForRpc(tokenProps);\n iModelDb.withQueryReader(\"SELECT ECInstanceId AS id, name, jsonProperties FROM BisCore.CodeSpec\", (reader) => {\n for (const row of reader)\n codeSpecs.push({ id: row.id, name: row.name, jsonProperties: JSON.parse(row.jsonProperties) });\n });\n return codeSpecs;\n }\n\n public async getViewStateData(tokenProps: IModelRpcProps, viewDefinitionId: string, options?: ViewStateLoadProps): Promise<ViewStateProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.views.getViewStateProps(viewDefinitionId, options);\n }\n\n public async readFontJson(tokenProps: IModelRpcProps): Promise<FontMapProps> { // eslint-disable-line @typescript-eslint/no-deprecated\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb[_nativeDb].readFontMap();\n }\n\n public async requestSnap(tokenProps: IModelRpcProps, sessionId: string, props: SnapRequestProps): Promise<SnapResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.requestSnap(sessionId, props);\n }\n\n public async cancelSnap(tokenProps: IModelRpcProps, sessionId: string): Promise<void> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.cancelSnap(sessionId);\n }\n\n public async getGeometryContainment(tokenProps: IModelRpcProps, props: GeometryContainmentRequestProps): Promise<GeometryContainmentResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.getGeometryContainment(props);\n }\n\n public async getMassProperties(tokenProps: IModelRpcProps, props: MassPropertiesRequestProps): Promise<MassPropertiesResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.getMassProperties(props);\n }\n\n public async getMassPropertiesPerCandidate(tokenProps: IModelRpcProps, props: MassPropertiesPerCandidateRequestProps): Promise<MassPropertiesPerCandidateResponseProps[]> { // eslint-disable-line @typescript-eslint/no-deprecated\n const iModelDb = await getIModelForRpc(tokenProps);\n\n const getSingleCandidateMassProperties = async (candidate: string) => {\n try {\n const massPropResults: MassPropertiesResponseProps[] = [];\n\n for (const op of props.operations) {\n const massProperties = await iModelDb.getMassProperties({ operation: op, candidates: [candidate] });\n massPropResults.push(massProperties);\n }\n\n let singleCandidateResult: MassPropertiesPerCandidateResponseProps = { status: BentleyStatus.ERROR, candidate }; // eslint-disable-line @typescript-eslint/no-deprecated\n\n if (massPropResults.some((r) => r.status !== BentleyStatus.ERROR)) {\n singleCandidateResult.status = BentleyStatus.SUCCESS;\n for (const r of massPropResults.filter((mpr) => mpr.status !== BentleyStatus.ERROR)) {\n singleCandidateResult = { ...singleCandidateResult, ...r };\n }\n }\n\n return singleCandidateResult;\n } catch {\n return { status: BentleyStatus.ERROR, candidate };\n }\n };\n\n const promises: Promise<MassPropertiesPerCandidateResponseProps>[] = []; // eslint-disable-line @typescript-eslint/no-deprecated\n\n for (const candidate of CompressedId64Set.iterable(props.candidates)) {\n promises.push(getSingleCandidateMassProperties(candidate));\n }\n\n return Promise.all(promises);\n }\n\n public async getToolTipMessage(tokenProps: IModelRpcProps, id: string): Promise<string[]> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const el = iModelDb.elements.getElement(id);\n return (el === undefined) ? [] : el.getToolTipMessage();\n }\n\n /** Send a view thumbnail to the frontend. This is a binary transfer with the metadata in a 16-byte prefix header.\n * @deprecated in 3.6.0 - might be removed in next major version. Use queryViewThumbnail instead\n */\n public async getViewThumbnail(tokenProps: IModelRpcProps, viewId: string): Promise<Uint8Array> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const thumbnail = iModelDb.views.getThumbnail(viewId);\n if (undefined === thumbnail || 0 === thumbnail.image.length)\n throw new NoContentError();\n\n const val = new Uint8Array(thumbnail.image.length + 16); // allocate a new buffer 16 bytes larger than the image size\n new Uint32Array(val.buffer, 0, 4).set([thumbnail.image.length, thumbnail.format === \"jpeg\" ? ImageSourceFormat.Jpeg : ImageSourceFormat.Png, thumbnail.width, thumbnail.height]); // Put the metadata in the first 16 bytes.\n val.set(thumbnail.image, 16); // put the image data at offset 16 after metadata\n return val;\n }\n\n public async getDefaultViewId(tokenProps: IModelRpcProps): Promise<Id64String> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const spec = { namespace: \"dgn_View\", name: \"DefaultView\" };\n const blob = iModelDb.queryFilePropertyBlob(spec);\n if (undefined === blob || 8 !== blob.length)\n return Id64.invalid;\n\n const view = new Uint32Array(blob.buffer);\n return Id64.fromUint32Pair(view[0], view[1]);\n }\n public async getSpatialCategoryId(tokenProps: IModelRpcProps, categoryName: string): Promise<Id64String | undefined> {\n const iModelDb = await getIModelForRpc(tokenProps);\n const dictionary: DictionaryModel = iModelDb.models.getModel<DictionaryModel>(IModel.dictionaryId);\n return SpatialCategory.queryCategoryIdByName(iModelDb, dictionary.id, categoryName);\n }\n\n public async getIModelCoordinatesFromGeoCoordinates(tokenProps: IModelRpcProps, props: IModelCoordinatesRequestProps): Promise<IModelCoordinatesResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.getIModelCoordinatesFromGeoCoordinates(props);\n }\n\n public async getGeoCoordinatesFromIModelCoordinates(tokenProps: IModelRpcProps, props: GeoCoordinatesRequestProps): Promise<GeoCoordinatesResponseProps> {\n const iModelDb = await getIModelForRpc(tokenProps);\n return iModelDb.getGeoCoordinatesFromIModelCoordinates(props);\n }\n\n public async queryTextureData(tokenProps: IModelRpcProps, textureLoadProps: TextureLoadProps): Promise<TextureData | undefined> {\n const db = await getIModelForRpc(tokenProps);\n return db.queryTextureData(textureLoadProps);\n }\n\n public async generateElementMeshes(tokenProps: IModelRpcProps, props: ElementMeshRequestProps): Promise<Uint8Array> {\n const db = await getIModelForRpc(tokenProps);\n return db[_nativeDb].generateElementMeshes(props);\n }\n\n /** @internal */\n public async callViewStore(tokenProps: IModelRpcProps, version: string, forWrite: boolean, methodName: string, ...args: any[]): Promise<any> {\n if (!RpcInterface.isVersionCompatible(ViewStoreRpc.version, version))\n throw new Error(\"ViewStoreRpc version mismatch\");\n\n const db = await getIModelForRpc(tokenProps);\n const viewStore = await db.views.accessViewStore({ accessLevel: forWrite ? \"write\" : \"read\" });\n const access = viewStore[forWrite ? \"writeLocker\" : \"reader\"] as any;\n\n const func = access[methodName];\n if (typeof func !== \"function\")\n throw new IModelError(IModelStatus.FunctionNotFound, `Illegal ViewStore RPC call \"${methodName}\"`);\n\n return func.call(access, ...args);\n }\n}\n"]}
@@ -31,14 +31,14 @@ export declare class RpcBriefcaseUtility {
31
31
  syncMode: SyncMode.FixedVersion;
32
32
  }): Promise<IModelDb>;
33
33
  /**
34
- * @deprecated in 4.4.0 - will not be removed until after 2026-06-13. Only `SyncMode.FixedVersion` should be used in RPC backends
34
+ * @deprecated in 4.4.0 - might be removed in next major version. Only `SyncMode.FixedVersion` should be used in RPC backends
35
35
  */
36
36
  static open(args: DownloadAndOpenArgs & {
37
37
  syncMode: Exclude<SyncMode, "FixedVersion">;
38
38
  }): Promise<IModelDb>;
39
39
  static openWithTimeout(activity: RpcActivity, tokenProps: IModelRpcOpenProps, syncMode: SyncMode.FixedVersion, timeout?: number): Promise<IModelConnectionProps>;
40
40
  /**
41
- * @deprecated in 4.4.0 - will not be removed until after 2026-06-13. Only `SyncMode.FixedVersion` should be used in RPC backends
41
+ * @deprecated in 4.4.0 - might be removed in next major version. Only `SyncMode.FixedVersion` should be used in RPC backends
42
42
  */
43
43
  static openWithTimeout(activity: RpcActivity, tokenProps: IModelRpcOpenProps, syncMode: Exclude<SyncMode, "FixedVersion">, timeout?: number): Promise<IModelConnectionProps>;
44
44
  }
@@ -1 +1 @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A1JH,kDA4JC","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 RpcInterface\n */\n\nimport { AccessToken, assert, BeDuration, IModelStatus, Logger } from \"@itwin/core-bentley\";\nimport {\n BriefcaseProps, IModelConnectionProps, IModelError, IModelRpcOpenProps, IModelRpcProps, IModelVersion, RpcActivity, RpcPendingResponse, SyncMode,\n} from \"@itwin/core-common\";\nimport { BackendLoggerCategory } from \"../BackendLoggerCategory\";\nimport { BriefcaseManager, RequestNewBriefcaseArg } from \"../BriefcaseManager\";\nimport { CheckpointManager } from \"../CheckpointManager\";\nimport { BriefcaseDb, IModelDb, SnapshotDb } from \"../IModelDb\";\nimport { IModelHost } from \"../IModelHost\";\nimport { IModelJsFs } from \"../IModelJsFs\";\nimport { _hubAccess } from \"../internal/Symbols\";\n\nconst loggerCategory: string = BackendLoggerCategory.IModelDb;\n\n/** @internal */\nexport interface DownloadAndOpenArgs {\n activity: RpcActivity;\n tokenProps: IModelRpcOpenProps;\n syncMode: SyncMode;\n fileNameResolvers?: ((arg: BriefcaseProps) => string)[];\n timeout?: number;\n forceDownload?: boolean;\n}\n/**\n * Utility to open the iModel for RPC interfaces\n * @internal\n */\nexport class RpcBriefcaseUtility {\n private static async downloadAndOpen(args: DownloadAndOpenArgs): Promise<BriefcaseDb> {\n const { activity, tokenProps } = args;\n const accessToken = activity.accessToken;\n assert(undefined !== tokenProps.iModelId);\n\n const iModelId = tokenProps.iModelId;\n let myBriefcaseIds: number[];\n if (args.syncMode === SyncMode.PullOnly) {\n myBriefcaseIds = [0]; // PullOnly means briefcaseId 0\n } else {\n // check with iModelHub and see if we already have acquired any briefcaseIds\n myBriefcaseIds = await IModelHost[_hubAccess].getMyBriefcaseIds({ accessToken, iModelId });\n }\n\n const resolvers = args.fileNameResolvers ?? [(arg) => BriefcaseManager.getFileName(arg)];\n\n // see if we can open any of the briefcaseIds we already acquired from iModelHub\n if (resolvers) {\n for (const resolver of resolvers) {\n for (const briefcaseId of myBriefcaseIds) {\n const fileName = resolver({ briefcaseId, iModelId });\n if (IModelJsFs.existsSync(fileName)) {\n const briefcaseDb = BriefcaseDb.findByFilename(fileName);\n if (briefcaseDb !== undefined) {\n if (briefcaseDb.isBriefcaseDb()) {\n return briefcaseDb;\n } else {\n throw new IModelError(IModelStatus.AlreadyOpen, \"iModel is already open as a SnapshotDb\");\n }\n }\n try {\n if (args.forceDownload)\n throw new Error(); // causes delete below\n const db = await BriefcaseDb.open({ fileName });\n if (db.changeset.id !== tokenProps.changeset?.id) {\n assert(undefined !== tokenProps.changeset);\n const toIndex = tokenProps.changeset?.index ??\n (await IModelHost[_hubAccess].getChangesetFromVersion({ accessToken, iModelId, version: IModelVersion.asOfChangeSet(tokenProps.changeset.id) })).index;\n await BriefcaseManager.pullAndApplyChangesets(db, { accessToken, toIndex });\n }\n return db;\n } catch (error: any) {\n if (!(error.errorNumber === IModelStatus.AlreadyOpen))\n // somehow we have this briefcaseId and the file exists, but we can't open it. Delete it.\n await BriefcaseManager.deleteBriefcaseFiles(fileName, accessToken);\n }\n }\n }\n }\n }\n\n // no local briefcase available. Download one and open it.\n assert(undefined !== tokenProps.iTwinId);\n const request: RequestNewBriefcaseArg = {\n accessToken,\n iTwinId: tokenProps.iTwinId,\n iModelId,\n briefcaseId: args.syncMode === SyncMode.PullOnly ? 0 : undefined, // if briefcaseId is undefined, we'll acquire a new one.\n };\n\n const props = await BriefcaseManager.downloadBriefcase(request);\n return BriefcaseDb.open(props);\n }\n\n private static _briefcasePromises: Map<string, Promise<BriefcaseDb>> = new Map();\n private static async openBriefcase(args: DownloadAndOpenArgs): Promise<BriefcaseDb> {\n const key = `${args.tokenProps.iModelId}:${args.tokenProps.changeset?.id}:${args.tokenProps.changeset?.index}:${args.syncMode}`;\n const cachedPromise = this._briefcasePromises.get(key);\n if (cachedPromise)\n return cachedPromise;\n\n try {\n const briefcasePromise = this.downloadAndOpen(args); // save the fact that we're working on downloading so if we timeout, we'll reuse this request.\n this._briefcasePromises.set(key, briefcasePromise);\n return await briefcasePromise;\n } finally {\n this._briefcasePromises.delete(key); // the download and open is now done\n }\n }\n\n /** find a previously opened iModel for RPC.\n * @param accessToken necessary (only) for V2 checkpoints to refresh access token in daemon if it has expired. We use the accessToken of the current RPC request\n * to refresh the daemon, even though it will be used for all authorized users.\n * @param the IModelRpcProps to locate the opened iModel.\n */\n public static async findOpenIModel(accessToken: AccessToken, iModel: IModelRpcProps) {\n const iModelDb = IModelDb.findByKey(iModel.key);\n\n // call refreshContainer, just in case this is a V2 checkpoint whose sasToken is about to expire, or its default transaction is about to be restarted.\n await iModelDb.refreshContainerForRpc(accessToken);\n return iModelDb;\n }\n\n public static async open(args: DownloadAndOpenArgs & { syncMode: SyncMode.FixedVersion }): Promise<IModelDb>;\n /**\n * @deprecated in 4.4.0 - will not be removed until after 2026-06-13. Only `SyncMode.FixedVersion` should be used in RPC backends\n */\n public static async open(args: DownloadAndOpenArgs & { syncMode: Exclude<SyncMode, \"FixedVersion\"> }): Promise<IModelDb>;\n /**\n * Download and open a checkpoint or briefcase, ensuring the operation completes within a default timeout. If the time to open exceeds the timeout period,\n * a RpcPendingResponse exception is thrown\n */\n public static async open(args: DownloadAndOpenArgs): Promise<IModelDb> {\n const { activity, tokenProps, syncMode } = args;\n Logger.logTrace(loggerCategory, \"RpcBriefcaseUtility.open\", tokenProps);\n\n const timeout = args.timeout ?? 1000;\n if (syncMode === SyncMode.PullOnly || syncMode === SyncMode.PullAndPush) {\n const briefcaseDb = await BeDuration.race(timeout, this.openBriefcase(args));\n\n if (briefcaseDb === undefined) {\n Logger.logTrace(loggerCategory, \"Open briefcase - pending\", tokenProps);\n throw new RpcPendingResponse(); // eslint-disable-line @typescript-eslint/only-throw-error\n }\n // note: usage is logged in the function BriefcaseManager.downloadNewBriefcaseAndOpen\n return briefcaseDb;\n }\n if (!tokenProps.iModelId || !tokenProps.iTwinId || !tokenProps.changeset)\n throw new IModelError(IModelStatus.BadArg, \"invalid arguments\");\n\n const checkpoint = {\n iModelId: tokenProps.iModelId,\n iTwinId: tokenProps.iTwinId,\n changeset: tokenProps.changeset,\n accessToken: activity.accessToken,\n };\n\n // opening a checkpoint.\n let db: SnapshotDb | void;\n // first check if it's already open\n db = SnapshotDb.tryFindByKey(CheckpointManager.getKey(checkpoint));\n if (db) {\n Logger.logTrace(loggerCategory, \"Checkpoint was already open\", tokenProps);\n return db;\n }\n\n // now try V2 checkpoint\n db = await SnapshotDb.openCheckpointFromRpc(checkpoint);\n Logger.logTrace(loggerCategory, \"using V2 checkpoint\", tokenProps);\n\n return db;\n }\n\n public static async openWithTimeout(activity: RpcActivity, tokenProps: IModelRpcOpenProps, syncMode: SyncMode.FixedVersion, timeout?: number): Promise<IModelConnectionProps>;\n /**\n * @deprecated in 4.4.0 - will not be removed until after 2026-06-13. Only `SyncMode.FixedVersion` should be used in RPC backends\n */\n public static async openWithTimeout(activity: RpcActivity, tokenProps: IModelRpcOpenProps, syncMode: Exclude<SyncMode, \"FixedVersion\">, timeout?: number): Promise<IModelConnectionProps>;\n public static async openWithTimeout(activity: RpcActivity, tokenProps: IModelRpcOpenProps, syncMode: SyncMode, timeout: number = 1000): Promise<IModelConnectionProps> {\n if (tokenProps.iModelId)\n await IModelHost.tileStorage?.initialize(tokenProps.iModelId);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return (await this.open({ activity, tokenProps, syncMode, timeout })).toJSON();\n }\n\n}\n"]}
1
+ {"version":3,"file":"RpcBriefcaseUtility.js","sourceRoot":"","sources":["../../../src/rpc-impl/RpcBriefcaseUtility.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA4F;AAC5F,oDAE4B;AAC5B,oEAAiE;AACjE,0DAA+E;AAC/E,4DAAyD;AACzD,0CAAgE;AAChE,8CAA2C;AAC3C,8CAA2C;AA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E,UAAU,CAAC,OAAO;YAC3B,SAAS,EAAE,UAAU,CAAC,SAAS;YAC/B,WAAW,EAAE,QAAQ,CAAC,WAAW;SAClC,CAAC;QAEF,wBAAwB;QACxB,IAAI,EAAqB,CAAC;QAC1B,mCAAmC;QACnC,EAAE,GAAG,qBAAU,CAAC,YAAY,CAAC,qCAAiB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;QACnE,IAAI,EAAE,EAAE,CAAC;YACP,qBAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,6BAA6B,EAAE,UAAU,CAAC,CAAC;YAC3E,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,wBAAwB;QACxB,EAAE,GAAG,MAAM,qBAAU,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;QACxD,qBAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,qBAAqB,EAAE,UAAU,CAAC,CAAC;QAEnE,OAAO,EAAE,CAAC;IACZ,CAAC;IAOM,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,QAAqB,EAAE,UAA8B,EAAE,QAAkB,EAAE,UAAkB,IAAI;QACnI,IAAI,UAAU,CAAC,QAAQ;YACrB,MAAM,uBAAU,CAAC,WAAW,EAAE,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAChE,4DAA4D;QAC5D,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACjF,CAAC;;AA1JH,kDA4JC","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 RpcInterface\n */\n\nimport { AccessToken, assert, BeDuration, IModelStatus, Logger } from \"@itwin/core-bentley\";\nimport {\n BriefcaseProps, IModelConnectionProps, IModelError, IModelRpcOpenProps, IModelRpcProps, IModelVersion, RpcActivity, RpcPendingResponse, SyncMode,\n} from \"@itwin/core-common\";\nimport { BackendLoggerCategory } from \"../BackendLoggerCategory\";\nimport { BriefcaseManager, RequestNewBriefcaseArg } from \"../BriefcaseManager\";\nimport { CheckpointManager } from \"../CheckpointManager\";\nimport { BriefcaseDb, IModelDb, SnapshotDb } from \"../IModelDb\";\nimport { IModelHost } from \"../IModelHost\";\nimport { IModelJsFs } from \"../IModelJsFs\";\nimport { _hubAccess } from \"../internal/Symbols\";\n\nconst loggerCategory: string = BackendLoggerCategory.IModelDb;\n\n/** @internal */\nexport interface DownloadAndOpenArgs {\n activity: RpcActivity;\n tokenProps: IModelRpcOpenProps;\n syncMode: SyncMode;\n fileNameResolvers?: ((arg: BriefcaseProps) => string)[];\n timeout?: number;\n forceDownload?: boolean;\n}\n/**\n * Utility to open the iModel for RPC interfaces\n * @internal\n */\nexport class RpcBriefcaseUtility {\n private static async downloadAndOpen(args: DownloadAndOpenArgs): Promise<BriefcaseDb> {\n const { activity, tokenProps } = args;\n const accessToken = activity.accessToken;\n assert(undefined !== tokenProps.iModelId);\n\n const iModelId = tokenProps.iModelId;\n let myBriefcaseIds: number[];\n if (args.syncMode === SyncMode.PullOnly) {\n myBriefcaseIds = [0]; // PullOnly means briefcaseId 0\n } else {\n // check with iModelHub and see if we already have acquired any briefcaseIds\n myBriefcaseIds = await IModelHost[_hubAccess].getMyBriefcaseIds({ accessToken, iModelId });\n }\n\n const resolvers = args.fileNameResolvers ?? [(arg) => BriefcaseManager.getFileName(arg)];\n\n // see if we can open any of the briefcaseIds we already acquired from iModelHub\n if (resolvers) {\n for (const resolver of resolvers) {\n for (const briefcaseId of myBriefcaseIds) {\n const fileName = resolver({ briefcaseId, iModelId });\n if (IModelJsFs.existsSync(fileName)) {\n const briefcaseDb = BriefcaseDb.findByFilename(fileName);\n if (briefcaseDb !== undefined) {\n if (briefcaseDb.isBriefcaseDb()) {\n return briefcaseDb;\n } else {\n throw new IModelError(IModelStatus.AlreadyOpen, \"iModel is already open as a SnapshotDb\");\n }\n }\n try {\n if (args.forceDownload)\n throw new Error(); // causes delete below\n const db = await BriefcaseDb.open({ fileName });\n if (db.changeset.id !== tokenProps.changeset?.id) {\n assert(undefined !== tokenProps.changeset);\n const toIndex = tokenProps.changeset?.index ??\n (await IModelHost[_hubAccess].getChangesetFromVersion({ accessToken, iModelId, version: IModelVersion.asOfChangeSet(tokenProps.changeset.id) })).index;\n await BriefcaseManager.pullAndApplyChangesets(db, { accessToken, toIndex });\n }\n return db;\n } catch (error: any) {\n if (!(error.errorNumber === IModelStatus.AlreadyOpen))\n // somehow we have this briefcaseId and the file exists, but we can't open it. Delete it.\n await BriefcaseManager.deleteBriefcaseFiles(fileName, accessToken);\n }\n }\n }\n }\n }\n\n // no local briefcase available. Download one and open it.\n assert(undefined !== tokenProps.iTwinId);\n const request: RequestNewBriefcaseArg = {\n accessToken,\n iTwinId: tokenProps.iTwinId,\n iModelId,\n briefcaseId: args.syncMode === SyncMode.PullOnly ? 0 : undefined, // if briefcaseId is undefined, we'll acquire a new one.\n };\n\n const props = await BriefcaseManager.downloadBriefcase(request);\n return BriefcaseDb.open(props);\n }\n\n private static _briefcasePromises: Map<string, Promise<BriefcaseDb>> = new Map();\n private static async openBriefcase(args: DownloadAndOpenArgs): Promise<BriefcaseDb> {\n const key = `${args.tokenProps.iModelId}:${args.tokenProps.changeset?.id}:${args.tokenProps.changeset?.index}:${args.syncMode}`;\n const cachedPromise = this._briefcasePromises.get(key);\n if (cachedPromise)\n return cachedPromise;\n\n try {\n const briefcasePromise = this.downloadAndOpen(args); // save the fact that we're working on downloading so if we timeout, we'll reuse this request.\n this._briefcasePromises.set(key, briefcasePromise);\n return await briefcasePromise;\n } finally {\n this._briefcasePromises.delete(key); // the download and open is now done\n }\n }\n\n /** find a previously opened iModel for RPC.\n * @param accessToken necessary (only) for V2 checkpoints to refresh access token in daemon if it has expired. We use the accessToken of the current RPC request\n * to refresh the daemon, even though it will be used for all authorized users.\n * @param the IModelRpcProps to locate the opened iModel.\n */\n public static async findOpenIModel(accessToken: AccessToken, iModel: IModelRpcProps) {\n const iModelDb = IModelDb.findByKey(iModel.key);\n\n // call refreshContainer, just in case this is a V2 checkpoint whose sasToken is about to expire, or its default transaction is about to be restarted.\n await iModelDb.refreshContainerForRpc(accessToken);\n return iModelDb;\n }\n\n public static async open(args: DownloadAndOpenArgs & { syncMode: SyncMode.FixedVersion }): Promise<IModelDb>;\n /**\n * @deprecated in 4.4.0 - might be removed in next major version. Only `SyncMode.FixedVersion` should be used in RPC backends\n */\n public static async open(args: DownloadAndOpenArgs & { syncMode: Exclude<SyncMode, \"FixedVersion\"> }): Promise<IModelDb>;\n /**\n * Download and open a checkpoint or briefcase, ensuring the operation completes within a default timeout. If the time to open exceeds the timeout period,\n * a RpcPendingResponse exception is thrown\n */\n public static async open(args: DownloadAndOpenArgs): Promise<IModelDb> {\n const { activity, tokenProps, syncMode } = args;\n Logger.logTrace(loggerCategory, \"RpcBriefcaseUtility.open\", tokenProps);\n\n const timeout = args.timeout ?? 1000;\n if (syncMode === SyncMode.PullOnly || syncMode === SyncMode.PullAndPush) {\n const briefcaseDb = await BeDuration.race(timeout, this.openBriefcase(args));\n\n if (briefcaseDb === undefined) {\n Logger.logTrace(loggerCategory, \"Open briefcase - pending\", tokenProps);\n throw new RpcPendingResponse(); // eslint-disable-line @typescript-eslint/only-throw-error\n }\n // note: usage is logged in the function BriefcaseManager.downloadNewBriefcaseAndOpen\n return briefcaseDb;\n }\n if (!tokenProps.iModelId || !tokenProps.iTwinId || !tokenProps.changeset)\n throw new IModelError(IModelStatus.BadArg, \"invalid arguments\");\n\n const checkpoint = {\n iModelId: tokenProps.iModelId,\n iTwinId: tokenProps.iTwinId,\n changeset: tokenProps.changeset,\n accessToken: activity.accessToken,\n };\n\n // opening a checkpoint.\n let db: SnapshotDb | void;\n // first check if it's already open\n db = SnapshotDb.tryFindByKey(CheckpointManager.getKey(checkpoint));\n if (db) {\n Logger.logTrace(loggerCategory, \"Checkpoint was already open\", tokenProps);\n return db;\n }\n\n // now try V2 checkpoint\n db = await SnapshotDb.openCheckpointFromRpc(checkpoint);\n Logger.logTrace(loggerCategory, \"using V2 checkpoint\", tokenProps);\n\n return db;\n }\n\n public static async openWithTimeout(activity: RpcActivity, tokenProps: IModelRpcOpenProps, syncMode: SyncMode.FixedVersion, timeout?: number): Promise<IModelConnectionProps>;\n /**\n * @deprecated in 4.4.0 - might be removed in next major version. Only `SyncMode.FixedVersion` should be used in RPC backends\n */\n public static async openWithTimeout(activity: RpcActivity, tokenProps: IModelRpcOpenProps, syncMode: Exclude<SyncMode, \"FixedVersion\">, timeout?: number): Promise<IModelConnectionProps>;\n public static async openWithTimeout(activity: RpcActivity, tokenProps: IModelRpcOpenProps, syncMode: SyncMode, timeout: number = 1000): Promise<IModelConnectionProps> {\n if (tokenProps.iModelId)\n await IModelHost.tileStorage?.initialize(tokenProps.iModelId);\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return (await this.open({ activity, tokenProps, syncMode, timeout })).toJSON();\n }\n\n}\n"]}
@@ -4,7 +4,7 @@
4
4
  import { IModelConnectionProps, IModelRpcProps, RpcInterface, SnapshotIModelRpcInterface, SnapshotOpenOptions } from "@itwin/core-common";
5
5
  /** The backend implementation of SnapshotIModelRpcInterface.
6
6
  * @internal
7
- * @deprecated in 5.0 - will not be removed until after 2026-06-13. Check [[IpcAppFunctions]] for replacements.
7
+ * @deprecated in 5.0 - might be removed in next major version. Check [[IpcAppFunctions]] for replacements.
8
8
  */
9
9
  export declare class SnapshotIModelRpcImpl extends RpcInterface implements SnapshotIModelRpcInterface {
10
10
  static register(): void;
@@ -14,7 +14,7 @@ const IModelHost_1 = require("../IModelHost");
14
14
  /* eslint-disable @typescript-eslint/no-deprecated */
15
15
  /** The backend implementation of SnapshotIModelRpcInterface.
16
16
  * @internal
17
- * @deprecated in 5.0 - will not be removed until after 2026-06-13. Check [[IpcAppFunctions]] for replacements.
17
+ * @deprecated in 5.0 - might be removed in next major version. Check [[IpcAppFunctions]] for replacements.
18
18
  */
19
19
  class SnapshotIModelRpcImpl extends core_common_1.RpcInterface {
20
20
  static register() { core_common_1.RpcManager.registerImpl(core_common_1.SnapshotIModelRpcInterface, SnapshotIModelRpcImpl); }
@@ -1 +1 @@
1
- {"version":3,"file":"SnapshotIModelRpcImpl.js","sourceRoot":"","sources":["../../../src/rpc-impl/SnapshotIModelRpcImpl.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oDAE4B;AAC5B,0CAAyC;AACzC,8CAA2C;AAE3C,qDAAqD;AAErD;;;GAGG;AACH,MAAa,qBAAsB,SAAQ,0BAAY;IAC9C,MAAM,CAAC,QAAQ,KAAK,wBAAU,CAAC,YAAY,CAAC,wCAA0B,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAExG,kGAAkG;IAC3F,KAAK,CAAC,QAAQ,CAAC,QAAgB,EAAE,IAA0B;QAChE,IAAI,gBAAgB,GAAuB,QAAQ,CAAC;QACpD,IAAI,uBAAU,CAAC,wBAAwB,EAAE,CAAC;YACxC,gBAAgB,GAAG,uBAAU,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;YACpF,IAAI,SAAS,KAAK,gBAAgB;gBAChC,MAAM,IAAI,oCAAsB,EAAE,CAAC,CAAC,0DAA0D;QAClG,CAAC;QACD,OAAO,qBAAU,CAAC,QAAQ,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;IAC1E,CAAC;IAED,4FAA4F;IACrF,KAAK,CAAC,UAAU,CAAC,OAAe,EAAE,IAA0B;QACjE,MAAM,gBAAgB,GAAG,uBAAU,CAAC,wBAAwB,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;QAClF,IAAI,SAAS,KAAK,gBAAgB;YAChC,MAAM,IAAI,oCAAsB,EAAE,CAAC,CAAC,0DAA0D;QAEhG,OAAO,qBAAU,CAAC,QAAQ,CAAC,gBAAgB,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,kBAAkB,EAAE,CAAC;IAC/F,CAAC;IAED,kDAAkD;IAC3C,KAAK,CAAC,KAAK,CAAC,UAA0B;QAC3C,qBAAU,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;QAC7C,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5BD,sDA4BC","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 RpcInterface\n */\n\nimport {\n IModelConnectionProps, IModelNotFoundResponse, IModelRpcProps, RpcInterface, RpcManager, SnapshotIModelRpcInterface, SnapshotOpenOptions,\n} from \"@itwin/core-common\";\nimport { SnapshotDb } from \"../IModelDb\";\nimport { IModelHost } from \"../IModelHost\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** The backend implementation of SnapshotIModelRpcInterface.\n * @internal\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Check [[IpcAppFunctions]] for replacements.\n */\nexport class SnapshotIModelRpcImpl extends RpcInterface implements SnapshotIModelRpcInterface {\n public static register() { RpcManager.registerImpl(SnapshotIModelRpcInterface, SnapshotIModelRpcImpl); }\n\n /** Ask the backend to open a snapshot iModel from a file name that is resolved by the backend. */\n public async openFile(filePath: string, opts?: SnapshotOpenOptions): Promise<IModelConnectionProps> {\n let resolvedFileName: string | undefined = filePath;\n if (IModelHost.snapshotFileNameResolver) {\n resolvedFileName = IModelHost.snapshotFileNameResolver.tryResolveFileName(filePath);\n if (undefined === resolvedFileName)\n throw new IModelNotFoundResponse(); // eslint-disable-line @typescript-eslint/only-throw-error\n }\n return SnapshotDb.openFile(resolvedFileName, opts).getConnectionProps();\n }\n\n /** Ask the backend to open a snapshot iModel from a key that is resolved by the backend. */\n public async openRemote(fileKey: string, opts?: SnapshotOpenOptions): Promise<IModelConnectionProps> {\n const resolvedFileName = IModelHost.snapshotFileNameResolver?.resolveKey(fileKey);\n if (undefined === resolvedFileName)\n throw new IModelNotFoundResponse(); // eslint-disable-line @typescript-eslint/only-throw-error\n\n return SnapshotDb.openFile(resolvedFileName, { key: fileKey, ...opts }).getConnectionProps();\n }\n\n /** Ask the backend to close a snapshot iModel. */\n public async close(tokenProps: IModelRpcProps): Promise<boolean> {\n SnapshotDb.findByKey(tokenProps.key).close();\n return true;\n }\n}\n"]}
1
+ {"version":3,"file":"SnapshotIModelRpcImpl.js","sourceRoot":"","sources":["../../../src/rpc-impl/SnapshotIModelRpcImpl.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oDAE4B;AAC5B,0CAAyC;AACzC,8CAA2C;AAE3C,qDAAqD;AAErD;;;GAGG;AACH,MAAa,qBAAsB,SAAQ,0BAAY;IAC9C,MAAM,CAAC,QAAQ,KAAK,wBAAU,CAAC,YAAY,CAAC,wCAA0B,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAExG,kGAAkG;IAC3F,KAAK,CAAC,QAAQ,CAAC,QAAgB,EAAE,IAA0B;QAChE,IAAI,gBAAgB,GAAuB,QAAQ,CAAC;QACpD,IAAI,uBAAU,CAAC,wBAAwB,EAAE,CAAC;YACxC,gBAAgB,GAAG,uBAAU,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;YACpF,IAAI,SAAS,KAAK,gBAAgB;gBAChC,MAAM,IAAI,oCAAsB,EAAE,CAAC,CAAC,0DAA0D;QAClG,CAAC;QACD,OAAO,qBAAU,CAAC,QAAQ,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;IAC1E,CAAC;IAED,4FAA4F;IACrF,KAAK,CAAC,UAAU,CAAC,OAAe,EAAE,IAA0B;QACjE,MAAM,gBAAgB,GAAG,uBAAU,CAAC,wBAAwB,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;QAClF,IAAI,SAAS,KAAK,gBAAgB;YAChC,MAAM,IAAI,oCAAsB,EAAE,CAAC,CAAC,0DAA0D;QAEhG,OAAO,qBAAU,CAAC,QAAQ,CAAC,gBAAgB,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,kBAAkB,EAAE,CAAC;IAC/F,CAAC;IAED,kDAAkD;IAC3C,KAAK,CAAC,KAAK,CAAC,UAA0B;QAC3C,qBAAU,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;QAC7C,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5BD,sDA4BC","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 RpcInterface\n */\n\nimport {\n IModelConnectionProps, IModelNotFoundResponse, IModelRpcProps, RpcInterface, RpcManager, SnapshotIModelRpcInterface, SnapshotOpenOptions,\n} from \"@itwin/core-common\";\nimport { SnapshotDb } from \"../IModelDb\";\nimport { IModelHost } from \"../IModelHost\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** The backend implementation of SnapshotIModelRpcInterface.\n * @internal\n * @deprecated in 5.0 - might be removed in next major version. Check [[IpcAppFunctions]] for replacements.\n */\nexport class SnapshotIModelRpcImpl extends RpcInterface implements SnapshotIModelRpcInterface {\n public static register() { RpcManager.registerImpl(SnapshotIModelRpcInterface, SnapshotIModelRpcImpl); }\n\n /** Ask the backend to open a snapshot iModel from a file name that is resolved by the backend. */\n public async openFile(filePath: string, opts?: SnapshotOpenOptions): Promise<IModelConnectionProps> {\n let resolvedFileName: string | undefined = filePath;\n if (IModelHost.snapshotFileNameResolver) {\n resolvedFileName = IModelHost.snapshotFileNameResolver.tryResolveFileName(filePath);\n if (undefined === resolvedFileName)\n throw new IModelNotFoundResponse(); // eslint-disable-line @typescript-eslint/only-throw-error\n }\n return SnapshotDb.openFile(resolvedFileName, opts).getConnectionProps();\n }\n\n /** Ask the backend to open a snapshot iModel from a key that is resolved by the backend. */\n public async openRemote(fileKey: string, opts?: SnapshotOpenOptions): Promise<IModelConnectionProps> {\n const resolvedFileName = IModelHost.snapshotFileNameResolver?.resolveKey(fileKey);\n if (undefined === resolvedFileName)\n throw new IModelNotFoundResponse(); // eslint-disable-line @typescript-eslint/only-throw-error\n\n return SnapshotDb.openFile(resolvedFileName, { key: fileKey, ...opts }).getConnectionProps();\n }\n\n /** Ask the backend to close a snapshot iModel. */\n public async close(tokenProps: IModelRpcProps): Promise<boolean> {\n SnapshotDb.findByKey(tokenProps.key).close();\n return true;\n }\n}\n"]}
@@ -79,6 +79,21 @@ export interface SettingGroupSchema {
79
79
  /** A description of this group suitable for displaying to a user. */
80
80
  readonly description: string;
81
81
  }
82
+ /** Options controlling how [[SettingsSchemas.getResolvedSettingDef]] resolves a [[SettingSchema]].
83
+ * @beta
84
+ */
85
+ export interface GetResolvedSettingDefOptions {
86
+ /** When `true`, the `extends` property is retained on resolved schemas that originally
87
+ * declared it. By default (`false`) it is stripped after resolution, because the inherited
88
+ * properties have already been merged into the output schema.
89
+ *
90
+ * Set to `true` when the caller needs to inspect schema inheritance - for example, when
91
+ * building a schema editor that shows which base type a setting definition inherits from.
92
+ *
93
+ * @defaultValue false
94
+ */
95
+ readonly preserveExtends?: boolean;
96
+ }
82
97
  /**
83
98
  * The registry of available [[SettingGroupSchema]]s.
84
99
  * The registry is used for editing Settings files and for finding default values for settings.
@@ -140,13 +155,24 @@ export interface SettingsSchemas {
140
155
  /**
141
156
  * Looks up a setting schema in [[settingDefs]] and returns its resolved form.
142
157
  * Resolution uses the [[typeDefs]] currently registered with this [[SettingsSchemas]] instance.
158
+ * By default, `extends` metadata is removed from the resolved schema. Pass [[GetResolvedSettingDefOptions.preserveExtends]]
159
+ * to preserve `extends` members on resolved schemas that originally declared them.
143
160
  * @returns The resolved schema for `settingName`, or `undefined` if no schema has been registered for that setting.
144
161
  * @throws Error if a registered setting schema cannot be resolved because a referenced type definition is missing or circular.
145
- * @example
162
+ * @example Default - `extends` is stripped after resolution:
146
163
  * ```ts
147
164
  * const resolved = IModelHost.settingsSchemas.getResolvedSettingDef("app/font");
165
+ * // resolved.extends === undefined
166
+ * ```
167
+ * @example Preserving `extends` for tooling (e.g. a schema editor):
168
+ * ```ts
169
+ * const resolved = IModelHost.settingsSchemas.getResolvedSettingDef(
170
+ * "app/font",
171
+ * { preserveExtends: true },
172
+ * );
173
+ * // resolved.extends === "app/baseFont" (if originally declared)
148
174
  * ```
149
175
  */
150
- getResolvedSettingDef(settingName: SettingName): SettingSchema | undefined;
176
+ getResolvedSettingDef(settingName: SettingName, options?: GetResolvedSettingDefOptions): SettingSchema | undefined;
151
177
  }
152
178
  //# sourceMappingURL=SettingsSchemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsSchemas.d.ts","sourceRoot":"","sources":["../../../src/workspace/SettingsSchemas.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC;;;;;;;;IAQI;AACJ,MAAM,WAAW,aAAc,SAAQ,QAAQ,CAAC,UAAU,CAAC;IACzD,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC;IAC/B,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,EAAE,kBA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9D;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IAE3D,6DAA6D;IAC7D,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC;IAE9C;;;;;;;OAOG;IACH,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,WAAW,GAAG,CAAC,CAAC;IAE1D;;;OAGG;IACH,QAAQ,CAAC,aAAa,EAAE,kBAAkB,GAAG,kBAAkB,EAAE,GAAG,IAAI,CAAC;IAEzE,uFAAuF;IACvF,OAAO,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC,kFAAkF;IAClF,OAAO,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;IAEvC,oFAAoF;IACpF,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;IAE1C,+GAA+G;IAC/G,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAExC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,qBAAqB,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,4BAA4B,GAAG,aAAa,GAAG,SAAS,CAAC;CAEpH"}
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsSchemas.js","sourceRoot":"","sources":["../../../src/workspace/SettingsSchemas.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAIH,iDAAgE","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 Workspace\n */\n\nimport { BeEvent, JSONSchema, JSONSchemaTypeName } from \"@itwin/core-bentley\";\nimport { LocalDirName, LocalFileName } from \"@itwin/core-common\";\nimport { _implementationProhibited } from \"../internal/Symbols\";\nimport { SettingName } from \"./Settings\";\n\n/** Metadata describing a single [[Setting]] as part of a [[SettingGroupSchema]].\n * Every setting has a [[type]], which can be one of the following:\n * - A primitive type like `string` or `number`;\n * - An object containing any number of named properties, each with their own types; or\n * - An array of elements, all of the same type.\n * This metadata is used to validate setting values against the schema, and to enable user interfaces by which\n * users can view and modify their settings.\n * @beta\n */\nexport interface SettingSchema extends Readonly<JSONSchema> {\n /** For arrays only, the metadata describing every element in the array. */\n readonly items?: SettingSchema;\n /** The name of the [[Setting]]'s data type. */\n readonly type: JSONSchemaTypeName;\n /** For objects and arrays only, the name of a [[SettingSchema]] that provides a base definition for this type.\n * The name is expected to refer to a type definition registered with [[SettingsSchema.typeDefs]].\n * Therefore, it must be the full name, including the [[SettingGroupSchema.schemaPrefix]].\n */\n readonly extends?: string;\n /** For objects only, the name and metadata of each of the object's properties. */\n readonly properties?: { [name: SettingName]: SettingSchema };\n /** For arrays only, specifies how [[SettingsDictionary.getArray]] resolves the value of the setting.\n * By default, like other types of settings, the setting uses the value of the setting from the highest-priority dictionary.\n * If `combineArray` is `true`, then the value of the setting is computed by combining the elements of every array from every dictionary,\n * ordered by priority and eliminating duplicate elements.\n * Two elements are considered duplicates of one another if [[Setting.areEqual]] returns `true`.\n */\n readonly combineArray?: boolean;\n}\n\n/** Metadata describing a group of related [[SettingSchema]]s. You can register setting schema groups via [[SettingsSchemas.addGroup]] and\n * remove them via [[SettingsSchemas.removeGroup]].\n *\n * All of the settings share the same [[schemaPrefix]], which must be unique amongst all other groups.\n * The prefix is a stable identifier combined with the name of each [[SettingSchema]] in the group to form the fully-qualified name used to refer\n * to the setting outside of the group, e.g., when accessing [[SettingsSchemas.settingDefs]] or in [[SettingSchema.extends]].\n * In the following example, the fully-qualified name of the setting named \"metric\" is \"format/units/metric\".\n *\n * ```json\n * {\n * \"schemaPrefix\": \"format/units\",\n * \"settingDefs\": {\n * \"metric\": { \"type\": \"boolean\" }\n * }\n * }\n * ```\n *\n * A group can also define [[SettingSchema]]s that, rather than describing actual [[Setting]]s, instead describe types that can be extended by [[Setting]]s via\n * [[SettingSchema.extends]]. A [[SettingSchema]] can refer to type definitions defined in its own group or any other group.\n * @beta\n */\nexport interface SettingGroupSchema {\n /** Uniquely identifies this group amongst all other groups.\n * The prefix can use forward-slashes to define logical subgroups - for example, two related groups with the prefixes \"units/metric\" and \"units/imperial\".\n *\n * @note Schema prefixes beginning with \"itwin\" are reserved for use by iTwin.js.\n */\n readonly schemaPrefix: string;\n /** A title of this group suitable for displaying to a user. */\n readonly title?: string;\n /** Metadata for each [[Setting]] in this group. */\n readonly settingDefs?: { [name: string]: SettingSchema | undefined };\n /** Metadata for types that can be extended by other [[Setting]]s via [[SettingSchema.extends]]. */\n readonly typeDefs?: { [name: string]: SettingSchema | undefined };\n /** An integer used when displaying a list of schemas in a user interface, to sort schemas with a lower `order` before those with a `higher` order. */\n readonly order?: number;\n /** A description of this group suitable for displaying to a user. */\n readonly description: string;\n}\n\n/**\n * The registry of available [[SettingGroupSchema]]s.\n * The registry is used for editing Settings files and for finding default values for settings.\n * @beta\n */\n\n/** The registry of metadata describing groups of [[SettingSchema]]s available to the current session.\n * The schemas are used to look up the default values of [[Setting]]s, validate that their values are of the type dictated by the schema, and\n * query metadata like [[SettingsSchema.combineArray]] that modify their behavior.\n * They can also be used to drive a user interface that enables end users to edit [[Settings]].\n *\n * When [[IModelHost.startup]] is invoked at the beginning of a session, schemas delivered with the application - like those describing\n * [[Workspace]]s - are automatically loaded.\n * The application can manually register additional schemas using methods like [[addGroup]], [[addFile]], [[addDirectory]], and [[addJson]].\n * When [[IModelHost.shutdown]] is invoked at the end of a session, all registered schemas are unregistered.\n *\n * See the [learning article]($docs/learning/backend/Workspace) for a detailed overiew and examples.\n *\n * @see [[IModelHost.settingsSchemas]] to access the registry for the current session.\n * @beta\n */\nexport interface SettingsSchemas {\n /** @internal */\n readonly [_implementationProhibited]: unknown;\n\n /** The map of each registered [[SettingGroupSchema]], accessed by its [[SettingGroupSchema.schemaPrefix]]. */\n readonly groups: ReadonlyMap<string, SettingGroupSchema>;\n\n /** The map of each individual registered [[SettingSchema]] defining a [[Setting]], accessed by its fully-qualified name (including its [[SettingGroupSchema.schemaPrefix]]).\n * Schemas in this map may include an [[SettingSchema.extends]] property referring to a registered type definition.\n * Use [[resolveSchema]] to obtain the fully expanded schema.\n */\n readonly settingDefs: ReadonlyMap<SettingName, SettingSchema>;\n\n /** The map of each individual registered [[SettingSchema]] defining a type that can be extended by other [[SettingSchema]]s via [[SettingSchema.extends]],\n * accessed by its fully-qualified name (including its [[SettingGroupSchema.schemaPrefix]]).\n */\n readonly typeDefs: ReadonlyMap<SettingName, SettingSchema>;\n\n /** An event raised whenever schemas are added or removed. */\n readonly onSchemaChanged: BeEvent<() => void>;\n\n /**\n * Ensure that the setting value supplied is valid according to its [[SettingSchema]].\n * If no schema has been registered for the setting, no validation is performed.\n * @param value The value of the setting to validate against the schema.\n * @param settingName The fully-qualified setting name.\n * @returns `value` if `value` matches the schema corresponding to `settingName`, or if no such schema has been registered.\n * @throws Error if `value` is invalid according to the schema.\n */\n validateSetting<T>(value: T, settingName: SettingName): T;\n\n /** Register one or more [[SettingGroupSchema]]s.\n * If a group with the same [[SettingGroupSchema.prefix]] was previously registered, it will be replaced.\n * Each [[SettingSchema]] in the group will be added to [[settingDefs]] or [[typeDefs]].\n */\n addGroup(settingsGroup: SettingGroupSchema | SettingGroupSchema[]): void;\n\n /** Invokes [[addGroup]] for a [[SettingGroupSchema]] supplied as stringified json5. */\n addJson(settingSchema: string): void;\n\n /** Invokes [[addGroup]] for a json5 file containiner a [[SettingGroupSchema]]. */\n addFile(fileName: LocalFileName): void;\n\n /** Invokes [[addFile]] for every json and json5 file in the specified directory. */\n addDirectory(dirName: LocalDirName): void;\n\n /** Unregisters all [[settingDefs]] and [[typeDefs]] with the specified [[SettingGroupSchema.schemaPrefix]]. */\n removeGroup(schemaPrefix: string): void;\n\n /**\n * Looks up a setting schema in [[settingDefs]] and returns its resolved form.\n * Resolution uses the [[typeDefs]] currently registered with this [[SettingsSchemas]] instance.\n * @returns The resolved schema for `settingName`, or `undefined` if no schema has been registered for that setting.\n * @throws Error if a registered setting schema cannot be resolved because a referenced type definition is missing or circular.\n * @example\n * ```ts\n * const resolved = IModelHost.settingsSchemas.getResolvedSettingDef(\"app/font\");\n * ```\n */\n getResolvedSettingDef(settingName: SettingName): SettingSchema | undefined;\n\n}\n"]}
1
+ {"version":3,"file":"SettingsSchemas.js","sourceRoot":"","sources":["../../../src/workspace/SettingsSchemas.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAIH,iDAAgE","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 Workspace\n */\n\nimport { BeEvent, JSONSchema, JSONSchemaTypeName } from \"@itwin/core-bentley\";\nimport { LocalDirName, LocalFileName } from \"@itwin/core-common\";\nimport { _implementationProhibited } from \"../internal/Symbols\";\nimport { SettingName } from \"./Settings\";\n\n/** Metadata describing a single [[Setting]] as part of a [[SettingGroupSchema]].\n * Every setting has a [[type]], which can be one of the following:\n * - A primitive type like `string` or `number`;\n * - An object containing any number of named properties, each with their own types; or\n * - An array of elements, all of the same type.\n * This metadata is used to validate setting values against the schema, and to enable user interfaces by which\n * users can view and modify their settings.\n * @beta\n */\nexport interface SettingSchema extends Readonly<JSONSchema> {\n /** For arrays only, the metadata describing every element in the array. */\n readonly items?: SettingSchema;\n /** The name of the [[Setting]]'s data type. */\n readonly type: JSONSchemaTypeName;\n /** For objects and arrays only, the name of a [[SettingSchema]] that provides a base definition for this type.\n * The name is expected to refer to a type definition registered with [[SettingsSchema.typeDefs]].\n * Therefore, it must be the full name, including the [[SettingGroupSchema.schemaPrefix]].\n */\n readonly extends?: string;\n /** For objects only, the name and metadata of each of the object's properties. */\n readonly properties?: { [name: SettingName]: SettingSchema };\n /** For arrays only, specifies how [[SettingsDictionary.getArray]] resolves the value of the setting.\n * By default, like other types of settings, the setting uses the value of the setting from the highest-priority dictionary.\n * If `combineArray` is `true`, then the value of the setting is computed by combining the elements of every array from every dictionary,\n * ordered by priority and eliminating duplicate elements.\n * Two elements are considered duplicates of one another if [[Setting.areEqual]] returns `true`.\n */\n readonly combineArray?: boolean;\n}\n\n/** Metadata describing a group of related [[SettingSchema]]s. You can register setting schema groups via [[SettingsSchemas.addGroup]] and\n * remove them via [[SettingsSchemas.removeGroup]].\n *\n * All of the settings share the same [[schemaPrefix]], which must be unique amongst all other groups.\n * The prefix is a stable identifier combined with the name of each [[SettingSchema]] in the group to form the fully-qualified name used to refer\n * to the setting outside of the group, e.g., when accessing [[SettingsSchemas.settingDefs]] or in [[SettingSchema.extends]].\n * In the following example, the fully-qualified name of the setting named \"metric\" is \"format/units/metric\".\n *\n * ```json\n * {\n * \"schemaPrefix\": \"format/units\",\n * \"settingDefs\": {\n * \"metric\": { \"type\": \"boolean\" }\n * }\n * }\n * ```\n *\n * A group can also define [[SettingSchema]]s that, rather than describing actual [[Setting]]s, instead describe types that can be extended by [[Setting]]s via\n * [[SettingSchema.extends]]. A [[SettingSchema]] can refer to type definitions defined in its own group or any other group.\n * @beta\n */\nexport interface SettingGroupSchema {\n /** Uniquely identifies this group amongst all other groups.\n * The prefix can use forward-slashes to define logical subgroups - for example, two related groups with the prefixes \"units/metric\" and \"units/imperial\".\n *\n * @note Schema prefixes beginning with \"itwin\" are reserved for use by iTwin.js.\n */\n readonly schemaPrefix: string;\n /** A title of this group suitable for displaying to a user. */\n readonly title?: string;\n /** Metadata for each [[Setting]] in this group. */\n readonly settingDefs?: { [name: string]: SettingSchema | undefined };\n /** Metadata for types that can be extended by other [[Setting]]s via [[SettingSchema.extends]]. */\n readonly typeDefs?: { [name: string]: SettingSchema | undefined };\n /** An integer used when displaying a list of schemas in a user interface, to sort schemas with a lower `order` before those with a `higher` order. */\n readonly order?: number;\n /** A description of this group suitable for displaying to a user. */\n readonly description: string;\n}\n\n/** Options controlling how [[SettingsSchemas.getResolvedSettingDef]] resolves a [[SettingSchema]].\n * @beta\n */\nexport interface GetResolvedSettingDefOptions {\n /** When `true`, the `extends` property is retained on resolved schemas that originally\n * declared it. By default (`false`) it is stripped after resolution, because the inherited\n * properties have already been merged into the output schema.\n *\n * Set to `true` when the caller needs to inspect schema inheritance - for example, when\n * building a schema editor that shows which base type a setting definition inherits from.\n *\n * @defaultValue false\n */\n readonly preserveExtends?: boolean;\n}\n\n/**\n * The registry of available [[SettingGroupSchema]]s.\n * The registry is used for editing Settings files and for finding default values for settings.\n * @beta\n */\n\n/** The registry of metadata describing groups of [[SettingSchema]]s available to the current session.\n * The schemas are used to look up the default values of [[Setting]]s, validate that their values are of the type dictated by the schema, and\n * query metadata like [[SettingsSchema.combineArray]] that modify their behavior.\n * They can also be used to drive a user interface that enables end users to edit [[Settings]].\n *\n * When [[IModelHost.startup]] is invoked at the beginning of a session, schemas delivered with the application - like those describing\n * [[Workspace]]s - are automatically loaded.\n * The application can manually register additional schemas using methods like [[addGroup]], [[addFile]], [[addDirectory]], and [[addJson]].\n * When [[IModelHost.shutdown]] is invoked at the end of a session, all registered schemas are unregistered.\n *\n * See the [learning article]($docs/learning/backend/Workspace) for a detailed overiew and examples.\n *\n * @see [[IModelHost.settingsSchemas]] to access the registry for the current session.\n * @beta\n */\nexport interface SettingsSchemas {\n /** @internal */\n readonly [_implementationProhibited]: unknown;\n\n /** The map of each registered [[SettingGroupSchema]], accessed by its [[SettingGroupSchema.schemaPrefix]]. */\n readonly groups: ReadonlyMap<string, SettingGroupSchema>;\n\n /** The map of each individual registered [[SettingSchema]] defining a [[Setting]], accessed by its fully-qualified name (including its [[SettingGroupSchema.schemaPrefix]]).\n * Schemas in this map may include an [[SettingSchema.extends]] property referring to a registered type definition.\n * Use [[resolveSchema]] to obtain the fully expanded schema.\n */\n readonly settingDefs: ReadonlyMap<SettingName, SettingSchema>;\n\n /** The map of each individual registered [[SettingSchema]] defining a type that can be extended by other [[SettingSchema]]s via [[SettingSchema.extends]],\n * accessed by its fully-qualified name (including its [[SettingGroupSchema.schemaPrefix]]).\n */\n readonly typeDefs: ReadonlyMap<SettingName, SettingSchema>;\n\n /** An event raised whenever schemas are added or removed. */\n readonly onSchemaChanged: BeEvent<() => void>;\n\n /**\n * Ensure that the setting value supplied is valid according to its [[SettingSchema]].\n * If no schema has been registered for the setting, no validation is performed.\n * @param value The value of the setting to validate against the schema.\n * @param settingName The fully-qualified setting name.\n * @returns `value` if `value` matches the schema corresponding to `settingName`, or if no such schema has been registered.\n * @throws Error if `value` is invalid according to the schema.\n */\n validateSetting<T>(value: T, settingName: SettingName): T;\n\n /** Register one or more [[SettingGroupSchema]]s.\n * If a group with the same [[SettingGroupSchema.prefix]] was previously registered, it will be replaced.\n * Each [[SettingSchema]] in the group will be added to [[settingDefs]] or [[typeDefs]].\n */\n addGroup(settingsGroup: SettingGroupSchema | SettingGroupSchema[]): void;\n\n /** Invokes [[addGroup]] for a [[SettingGroupSchema]] supplied as stringified json5. */\n addJson(settingSchema: string): void;\n\n /** Invokes [[addGroup]] for a json5 file containiner a [[SettingGroupSchema]]. */\n addFile(fileName: LocalFileName): void;\n\n /** Invokes [[addFile]] for every json and json5 file in the specified directory. */\n addDirectory(dirName: LocalDirName): void;\n\n /** Unregisters all [[settingDefs]] and [[typeDefs]] with the specified [[SettingGroupSchema.schemaPrefix]]. */\n removeGroup(schemaPrefix: string): void;\n\n /**\n * Looks up a setting schema in [[settingDefs]] and returns its resolved form.\n * Resolution uses the [[typeDefs]] currently registered with this [[SettingsSchemas]] instance.\n * By default, `extends` metadata is removed from the resolved schema. Pass [[GetResolvedSettingDefOptions.preserveExtends]]\n * to preserve `extends` members on resolved schemas that originally declared them.\n * @returns The resolved schema for `settingName`, or `undefined` if no schema has been registered for that setting.\n * @throws Error if a registered setting schema cannot be resolved because a referenced type definition is missing or circular.\n * @example Default - `extends` is stripped after resolution:\n * ```ts\n * const resolved = IModelHost.settingsSchemas.getResolvedSettingDef(\"app/font\");\n * // resolved.extends === undefined\n * ```\n * @example Preserving `extends` for tooling (e.g. a schema editor):\n * ```ts\n * const resolved = IModelHost.settingsSchemas.getResolvedSettingDef(\n * \"app/font\",\n * { preserveExtends: true },\n * );\n * // resolved.extends === \"app/baseFont\" (if originally declared)\n * ```\n */\n getResolvedSettingDef(settingName: SettingName, options?: GetResolvedSettingDefOptions): SettingSchema | undefined;\n\n}\n"]}
@@ -20,7 +20,7 @@ export declare class LockConflict extends IModelError {
20
20
  briefcaseAlias: string, msg: "shared lock is held" | "exclusive lock is already held");
21
21
  }
22
22
  /** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).
23
- * @deprecated in 4.7 - will not be removed until after 2026-06-13. Use [LockState]($common)
23
+ * @deprecated in 4.7 - might be removed in next major version. Use [LockState]($common)
24
24
  * @public
25
25
  */
26
26
  export declare enum LockState {
@@ -24,7 +24,7 @@ export class LockConflict extends IModelError {
24
24
  }
25
25
  }
26
26
  /** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).
27
- * @deprecated in 4.7 - will not be removed until after 2026-06-13. Use [LockState]($common)
27
+ * @deprecated in 4.7 - might be removed in next major version. Use [LockState]($common)
28
28
  * @public
29
29
  */
30
30
  export var LockState;
@@ -1 +1 @@
1
- {"version":3,"file":"BackendHubAccess.js","sourceRoot":"","sources":["../../src/BackendHubAccess.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAuC,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAEyB,WAAW,GAE1C,MAAM,oBAAoB,CAAC;AAI5B;;EAEE;AACF,MAAM,OAAO,YAAa,SAAQ,WAAW;IAGzB;IAEA;IAJlB;IACE,mCAAmC;IACnB,WAAwB;IACxC,sCAAsC;IACtB,cAAsB,EACtC,GAA6D;QAE7D,KAAK,CAAC,eAAe,CAAC,2BAA2B,EAAE,GAAG,CAAC,CAAC;QALxC,gBAAW,GAAX,WAAW,CAAa;QAExB,mBAAc,GAAd,cAAc,CAAQ;IAIxC,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,SASX;AATD,WAAY,SAAS;IACnB,gCAAgC;IAChC,yCAAQ,CAAA;IACR,mJAAmJ;IACnJ,6CAAU,CAAA;IACV;;OAEG;IACH,mDAAa,CAAA;AACf,CAAC,EATW,SAAS,KAAT,SAAS,QASpB","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 HubAccess\n */\n\nimport { AccessToken, GuidString, Id64String, IModelHubStatus } from \"@itwin/core-bentley\";\nimport {\n BriefcaseId, ChangesetFileProps, ChangesetIdWithIndex, ChangesetIndex, ChangesetIndexOrId, ChangesetProps, ChangesetRange,\n LockState as CommonLockState, IModelError, IModelVersion,\n LocalDirName, LocalFileName,\n} from \"@itwin/core-common\";\nimport { CheckpointProps, ProgressFunction } from \"./CheckpointManager\";\nimport type { TokenArg } from \"./IModelDb\";\n\n/** Exception thrown if lock cannot be acquired.\n * @beta\n*/\nexport class LockConflict extends IModelError {\n public constructor(\n /** Id of Briefcase holding lock */\n public readonly briefcaseId: BriefcaseId,\n /** Alias of Briefcase holding lock */\n public readonly briefcaseAlias: string,\n msg: \"shared lock is held\" | \"exclusive lock is already held\",\n ) {\n super(IModelHubStatus.LockOwnedByAnotherBriefcase, msg);\n }\n}\n\n/** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).\n * @deprecated in 4.7 - will not be removed until after 2026-06-13. Use [LockState]($common)\n * @public\n */\nexport enum LockState {\n /** The element is not locked */\n None = 0,\n /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */\n Shared = 1,\n /** A Lock that permits modifications to an element and blocks other users from making modifications to it.\n * Holding an exclusive lock on an \"owner\" (a model or a parent element), implicitly exclusively locks all its members.\n */\n Exclusive = 2,\n}\n\n/**\n * The properties to access a V2 checkpoint through a daemon.\n * @public\n */\nexport interface V2CheckpointAccessProps {\n /** blob store account name. */\n readonly accountName: string;\n /** AccessToken that grants access to the container. */\n readonly sasToken: AccessToken;\n /** The name of the iModel's blob store container holding all checkpoints. */\n readonly containerId: string;\n /** The name of the virtual file within the container, used for the checkpoint */\n readonly dbName: string;\n /** blob storage module: e.g. \"azure\", \"google\", \"aws\". May also include URI style parameters. */\n readonly storageType: string;\n}\n\n/**\n * Maps element Ids to their corresponding [LockState]($common)s.\n * @public\n */\nexport type LockMap = Map<Id64String, CommonLockState>;\n\n/**\n * The properties of a lock that may be obtained from a lock server.\n * @public\n */\nexport interface LockProps {\n /** The elementId for the lock */\n readonly id: Id64String;\n /** the lock state */\n readonly state: CommonLockState;\n}\n\n/**\n * Argument for cancelling and tracking download progress.\n * @public\n */\nexport interface DownloadProgressArg {\n /** Called to show progress during a download. If this function returns non-zero, the download is aborted. */\n progressCallback?: ProgressFunction;\n}\n\n/**\n * Argument for methods that must supply an iTwinId\n * @public\n */\nexport interface ITwinIdArg {\n readonly iTwinId: GuidString;\n}\n\n/**\n * Argument for methods that must supply an IModelId\n * @public\n */\nexport interface IModelIdArg extends TokenArg {\n readonly iModelId: GuidString;\n}\n\n/**\n * Argument for acquiring a new BriefcaseId\n * @public\n */\nexport interface AcquireNewBriefcaseIdArg extends IModelIdArg {\n /** A string to be reported to other users to identify this briefcase, for example in the case of conflicts or lock collisions. */\n readonly briefcaseAlias?: string;\n /** A string to represent the device that holds the briefcase. */\n readonly deviceName?: string;\n}\n\n/** Argument for methods that must supply an IModel name and iTwinId\n * @public\n */\nexport interface IModelNameArg extends TokenArg, ITwinIdArg {\n readonly iModelName: string;\n}\n\n/** Argument for methods that must supply an IModelId and a BriefcaseId\n * @public\n */\nexport interface BriefcaseIdArg extends IModelIdArg {\n readonly briefcaseId: BriefcaseId;\n}\n\n/** Argument for methods that must supply a briefcaseId and a changeset\n * @public\n */\nexport interface BriefcaseDbArg extends BriefcaseIdArg {\n readonly changeset: ChangesetIdWithIndex;\n}\n\n/** Argument for methods that must supply an IModelId and a changeset\n * @public\n */\nexport interface ChangesetArg extends IModelIdArg {\n readonly changeset: ChangesetIndexOrId;\n}\n\n/** Argument for downloading a changeset.\n * @public\n */\nexport interface DownloadChangesetArg extends ChangesetArg, DownloadProgressArg {\n /** Directory where the changeset should be downloaded. */\n targetDir: LocalDirName;\n}\n\n/** @internal */\nexport interface ChangesetIndexArg extends IModelIdArg {\n readonly changeset: ChangesetIdWithIndex;\n}\n\n/** Argument for methods that must supply an IModelId and a range of Changesets.\n * @public\n */\nexport interface ChangesetRangeArg extends IModelIdArg {\n /** the range of changesets desired. If is undefined, *all* changesets are returned. */\n readonly range?: ChangesetRange;\n}\n\n/** Argument for downloading a changeset range.\n * @public\n */\nexport interface DownloadChangesetRangeArg extends ChangesetRangeArg, DownloadProgressArg {\n /** Directory where the changesets should be downloaded. */\n targetDir: LocalDirName;\n}\n\n/**\n * Arguments to create a new iModel in iModelHub\n * @public\n */\nexport interface CreateNewIModelProps extends IModelNameArg {\n readonly description?: string;\n readonly version0?: LocalFileName;\n readonly noLocks?: true;\n}\n\n/**\n * Methods for accessing services of IModelHub from an iTwin.js backend.\n * Generally direct access to these methods should not be required, since higher-level apis are provided.\n * @public\n */\nexport interface BackendHubAccess {\n /** Download all the changesets in the specified range. */\n downloadChangesets: (arg: DownloadChangesetRangeArg) => Promise<ChangesetFileProps[]>;\n /** Download a single changeset. */\n downloadChangeset: (arg: DownloadChangesetArg) => Promise<ChangesetFileProps>;\n /** Query the changeset properties given a ChangesetIndex */\n queryChangeset: (arg: ChangesetArg) => Promise<ChangesetProps>;\n /** Query an array of changeset properties given a range of ChangesetIndexes */\n queryChangesets: (arg: ChangesetRangeArg) => Promise<ChangesetProps[]>;\n /** Push a changeset to iModelHub. Returns the newly pushed changeset's index */\n pushChangeset: (arg: IModelIdArg & { changesetProps: ChangesetFileProps }) => Promise<ChangesetIndex>;\n /** Get the ChangesetProps of the most recent changeset */\n getLatestChangeset: (arg: IModelIdArg) => Promise<ChangesetProps>;\n /** Get the ChangesetProps for an IModelVersion */\n getChangesetFromVersion: (arg: IModelIdArg & { version: IModelVersion }) => Promise<ChangesetProps>;\n /** Get the ChangesetProps for a named version */\n getChangesetFromNamedVersion: (arg: IModelIdArg & { versionName: string }) => Promise<ChangesetProps>;\n\n /** Acquire a new briefcaseId for the supplied iModelId\n * @note usually there should only be one briefcase per iModel per user.\n */\n acquireNewBriefcaseId: (arg: AcquireNewBriefcaseIdArg) => Promise<BriefcaseId>;\n /** Release a briefcaseId. After this call it is illegal to generate changesets for the released briefcaseId. */\n releaseBriefcase: (arg: BriefcaseIdArg) => Promise<void>;\n\n /** get an array of the briefcases assigned to a user. */\n getMyBriefcaseIds: (arg: IModelIdArg) => Promise<BriefcaseId[]>;\n\n /** Get the access props for a V2 checkpoint. Returns undefined if no V2 checkpoint exists. */\n queryV2Checkpoint: (arg: CheckpointProps) => Promise<V2CheckpointAccessProps | undefined>;\n\n /**\n * acquire one or more locks. Throws if unsuccessful. If *any* lock cannot be obtained, no locks are acquired\n * @throws ConflictingLocksError if one or more requested locks are held by other briefcases.\n */\n acquireLocks: (arg: BriefcaseDbArg, locks: LockMap) => Promise<void>;\n\n /**\n * Abandons the specified locks when none of the associated elements have\n * been or will be modified. Depending on the {@link LockState} specified for the lock,\n * it may be returned to the {@link LockState.Shared} state or released entirely. It is only\n * valid to call this method when none of the elements protected by the locks have been edited, or if all edits\n * have been reversed or abandoned without pushing them.\n *\n * The locks are released on the IModelHub, but the changeset associated with the locks is not updated.\n *\n * It is an error to specify {@link LockState.Exclusive} for any element, to specify {@link LockState.Shared}\n * for an element where the Exclusive lock is not currently held, or to include any element for which no lock\n * is currently held.\n *\n * This method is optional, so not all IModelHubs will implement it. If this method is not implemented\n * explicitly by an IModelHub, it will be implemented implicitly by calling\n * {@link BackendHubAccess.acquireLocks} with the same locks and passing `changeset.id=\"\"` and\n * `changeset.index=0` in the first argument to indicate that the lock state should change without updating\n * the changeset associated with the locks.\n *\n * @beta\n */\n abandonLocks?: (arg: BriefcaseIdArg, locks: LockMap) => Promise<void>;\n\n /** Get the list of all held locks for a briefcase. This can be very expensive and is currently used only for tests. */\n queryAllLocks: (arg: BriefcaseDbArg) => Promise<LockProps[]>;\n\n /** Release all currently held locks */\n releaseAllLocks: (arg: BriefcaseDbArg) => Promise<void>;\n\n /**\n * Abandons all currently held locks when none of the associated elements have been or will be modified.\n * It is only valid to call this method when none of the elements protected by the locks have been edited,\n * or if all edits have been reversed or abandoned without pushing them.\n *\n * The locks are released on the IModelHub, but the changeset associated with the locks is not updated.\n *\n * This method is optional, so not all IModelHubs will implement it. If this method is not implemented\n * explicitly by an IModelHub, it will be implemented implicitly by calling\n * {@link BackendHubAccess.releaseAllLocks}, passing `changeset.id=\"\"` and `changeset.index=0` in the\n * first argument to indicate that the lock state should change without updating the changeset associated\n * with the locks.\n *\n * @beta\n */\n abandonAllLocks?: (arg: BriefcaseIdArg) => Promise<void>;\n\n /** Get the iModelId of an iModel by name. Undefined if no iModel with that name exists. */\n queryIModelByName: (arg: IModelNameArg) => Promise<GuidString | undefined>;\n\n /** create a new iModel. Returns the Guid of the newly created iModel */\n createNewIModel: (arg: CreateNewIModelProps) => Promise<GuidString>;\n\n /** delete an iModel */\n deleteIModel: (arg: IModelIdArg & ITwinIdArg) => Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"BackendHubAccess.js","sourceRoot":"","sources":["../../src/BackendHubAccess.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAuC,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAEyB,WAAW,GAE1C,MAAM,oBAAoB,CAAC;AAI5B;;EAEE;AACF,MAAM,OAAO,YAAa,SAAQ,WAAW;IAGzB;IAEA;IAJlB;IACE,mCAAmC;IACnB,WAAwB;IACxC,sCAAsC;IACtB,cAAsB,EACtC,GAA6D;QAE7D,KAAK,CAAC,eAAe,CAAC,2BAA2B,EAAE,GAAG,CAAC,CAAC;QALxC,gBAAW,GAAX,WAAW,CAAa;QAExB,mBAAc,GAAd,cAAc,CAAQ;IAIxC,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,SASX;AATD,WAAY,SAAS;IACnB,gCAAgC;IAChC,yCAAQ,CAAA;IACR,mJAAmJ;IACnJ,6CAAU,CAAA;IACV;;OAEG;IACH,mDAAa,CAAA;AACf,CAAC,EATW,SAAS,KAAT,SAAS,QASpB","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 HubAccess\n */\n\nimport { AccessToken, GuidString, Id64String, IModelHubStatus } from \"@itwin/core-bentley\";\nimport {\n BriefcaseId, ChangesetFileProps, ChangesetIdWithIndex, ChangesetIndex, ChangesetIndexOrId, ChangesetProps, ChangesetRange,\n LockState as CommonLockState, IModelError, IModelVersion,\n LocalDirName, LocalFileName,\n} from \"@itwin/core-common\";\nimport { CheckpointProps, ProgressFunction } from \"./CheckpointManager\";\nimport type { TokenArg } from \"./IModelDb\";\n\n/** Exception thrown if lock cannot be acquired.\n * @beta\n*/\nexport class LockConflict extends IModelError {\n public constructor(\n /** Id of Briefcase holding lock */\n public readonly briefcaseId: BriefcaseId,\n /** Alias of Briefcase holding lock */\n public readonly briefcaseAlias: string,\n msg: \"shared lock is held\" | \"exclusive lock is already held\",\n ) {\n super(IModelHubStatus.LockOwnedByAnotherBriefcase, msg);\n }\n}\n\n/** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).\n * @deprecated in 4.7 - might be removed in next major version. Use [LockState]($common)\n * @public\n */\nexport enum LockState {\n /** The element is not locked */\n None = 0,\n /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */\n Shared = 1,\n /** A Lock that permits modifications to an element and blocks other users from making modifications to it.\n * Holding an exclusive lock on an \"owner\" (a model or a parent element), implicitly exclusively locks all its members.\n */\n Exclusive = 2,\n}\n\n/**\n * The properties to access a V2 checkpoint through a daemon.\n * @public\n */\nexport interface V2CheckpointAccessProps {\n /** blob store account name. */\n readonly accountName: string;\n /** AccessToken that grants access to the container. */\n readonly sasToken: AccessToken;\n /** The name of the iModel's blob store container holding all checkpoints. */\n readonly containerId: string;\n /** The name of the virtual file within the container, used for the checkpoint */\n readonly dbName: string;\n /** blob storage module: e.g. \"azure\", \"google\", \"aws\". May also include URI style parameters. */\n readonly storageType: string;\n}\n\n/**\n * Maps element Ids to their corresponding [LockState]($common)s.\n * @public\n */\nexport type LockMap = Map<Id64String, CommonLockState>;\n\n/**\n * The properties of a lock that may be obtained from a lock server.\n * @public\n */\nexport interface LockProps {\n /** The elementId for the lock */\n readonly id: Id64String;\n /** the lock state */\n readonly state: CommonLockState;\n}\n\n/**\n * Argument for cancelling and tracking download progress.\n * @public\n */\nexport interface DownloadProgressArg {\n /** Called to show progress during a download. If this function returns non-zero, the download is aborted. */\n progressCallback?: ProgressFunction;\n}\n\n/**\n * Argument for methods that must supply an iTwinId\n * @public\n */\nexport interface ITwinIdArg {\n readonly iTwinId: GuidString;\n}\n\n/**\n * Argument for methods that must supply an IModelId\n * @public\n */\nexport interface IModelIdArg extends TokenArg {\n readonly iModelId: GuidString;\n}\n\n/**\n * Argument for acquiring a new BriefcaseId\n * @public\n */\nexport interface AcquireNewBriefcaseIdArg extends IModelIdArg {\n /** A string to be reported to other users to identify this briefcase, for example in the case of conflicts or lock collisions. */\n readonly briefcaseAlias?: string;\n /** A string to represent the device that holds the briefcase. */\n readonly deviceName?: string;\n}\n\n/** Argument for methods that must supply an IModel name and iTwinId\n * @public\n */\nexport interface IModelNameArg extends TokenArg, ITwinIdArg {\n readonly iModelName: string;\n}\n\n/** Argument for methods that must supply an IModelId and a BriefcaseId\n * @public\n */\nexport interface BriefcaseIdArg extends IModelIdArg {\n readonly briefcaseId: BriefcaseId;\n}\n\n/** Argument for methods that must supply a briefcaseId and a changeset\n * @public\n */\nexport interface BriefcaseDbArg extends BriefcaseIdArg {\n readonly changeset: ChangesetIdWithIndex;\n}\n\n/** Argument for methods that must supply an IModelId and a changeset\n * @public\n */\nexport interface ChangesetArg extends IModelIdArg {\n readonly changeset: ChangesetIndexOrId;\n}\n\n/** Argument for downloading a changeset.\n * @public\n */\nexport interface DownloadChangesetArg extends ChangesetArg, DownloadProgressArg {\n /** Directory where the changeset should be downloaded. */\n targetDir: LocalDirName;\n}\n\n/** @internal */\nexport interface ChangesetIndexArg extends IModelIdArg {\n readonly changeset: ChangesetIdWithIndex;\n}\n\n/** Argument for methods that must supply an IModelId and a range of Changesets.\n * @public\n */\nexport interface ChangesetRangeArg extends IModelIdArg {\n /** the range of changesets desired. If is undefined, *all* changesets are returned. */\n readonly range?: ChangesetRange;\n}\n\n/** Argument for downloading a changeset range.\n * @public\n */\nexport interface DownloadChangesetRangeArg extends ChangesetRangeArg, DownloadProgressArg {\n /** Directory where the changesets should be downloaded. */\n targetDir: LocalDirName;\n}\n\n/**\n * Arguments to create a new iModel in iModelHub\n * @public\n */\nexport interface CreateNewIModelProps extends IModelNameArg {\n readonly description?: string;\n readonly version0?: LocalFileName;\n readonly noLocks?: true;\n}\n\n/**\n * Methods for accessing services of IModelHub from an iTwin.js backend.\n * Generally direct access to these methods should not be required, since higher-level apis are provided.\n * @public\n */\nexport interface BackendHubAccess {\n /** Download all the changesets in the specified range. */\n downloadChangesets: (arg: DownloadChangesetRangeArg) => Promise<ChangesetFileProps[]>;\n /** Download a single changeset. */\n downloadChangeset: (arg: DownloadChangesetArg) => Promise<ChangesetFileProps>;\n /** Query the changeset properties given a ChangesetIndex */\n queryChangeset: (arg: ChangesetArg) => Promise<ChangesetProps>;\n /** Query an array of changeset properties given a range of ChangesetIndexes */\n queryChangesets: (arg: ChangesetRangeArg) => Promise<ChangesetProps[]>;\n /** Push a changeset to iModelHub. Returns the newly pushed changeset's index */\n pushChangeset: (arg: IModelIdArg & { changesetProps: ChangesetFileProps }) => Promise<ChangesetIndex>;\n /** Get the ChangesetProps of the most recent changeset */\n getLatestChangeset: (arg: IModelIdArg) => Promise<ChangesetProps>;\n /** Get the ChangesetProps for an IModelVersion */\n getChangesetFromVersion: (arg: IModelIdArg & { version: IModelVersion }) => Promise<ChangesetProps>;\n /** Get the ChangesetProps for a named version */\n getChangesetFromNamedVersion: (arg: IModelIdArg & { versionName: string }) => Promise<ChangesetProps>;\n\n /** Acquire a new briefcaseId for the supplied iModelId\n * @note usually there should only be one briefcase per iModel per user.\n */\n acquireNewBriefcaseId: (arg: AcquireNewBriefcaseIdArg) => Promise<BriefcaseId>;\n /** Release a briefcaseId. After this call it is illegal to generate changesets for the released briefcaseId. */\n releaseBriefcase: (arg: BriefcaseIdArg) => Promise<void>;\n\n /** get an array of the briefcases assigned to a user. */\n getMyBriefcaseIds: (arg: IModelIdArg) => Promise<BriefcaseId[]>;\n\n /** Get the access props for a V2 checkpoint. Returns undefined if no V2 checkpoint exists. */\n queryV2Checkpoint: (arg: CheckpointProps) => Promise<V2CheckpointAccessProps | undefined>;\n\n /**\n * acquire one or more locks. Throws if unsuccessful. If *any* lock cannot be obtained, no locks are acquired\n * @throws ConflictingLocksError if one or more requested locks are held by other briefcases.\n */\n acquireLocks: (arg: BriefcaseDbArg, locks: LockMap) => Promise<void>;\n\n /**\n * Abandons the specified locks when none of the associated elements have\n * been or will be modified. Depending on the {@link LockState} specified for the lock,\n * it may be returned to the {@link LockState.Shared} state or released entirely. It is only\n * valid to call this method when none of the elements protected by the locks have been edited, or if all edits\n * have been reversed or abandoned without pushing them.\n *\n * The locks are released on the IModelHub, but the changeset associated with the locks is not updated.\n *\n * It is an error to specify {@link LockState.Exclusive} for any element, to specify {@link LockState.Shared}\n * for an element where the Exclusive lock is not currently held, or to include any element for which no lock\n * is currently held.\n *\n * This method is optional, so not all IModelHubs will implement it. If this method is not implemented\n * explicitly by an IModelHub, it will be implemented implicitly by calling\n * {@link BackendHubAccess.acquireLocks} with the same locks and passing `changeset.id=\"\"` and\n * `changeset.index=0` in the first argument to indicate that the lock state should change without updating\n * the changeset associated with the locks.\n *\n * @beta\n */\n abandonLocks?: (arg: BriefcaseIdArg, locks: LockMap) => Promise<void>;\n\n /** Get the list of all held locks for a briefcase. This can be very expensive and is currently used only for tests. */\n queryAllLocks: (arg: BriefcaseDbArg) => Promise<LockProps[]>;\n\n /** Release all currently held locks */\n releaseAllLocks: (arg: BriefcaseDbArg) => Promise<void>;\n\n /**\n * Abandons all currently held locks when none of the associated elements have been or will be modified.\n * It is only valid to call this method when none of the elements protected by the locks have been edited,\n * or if all edits have been reversed or abandoned without pushing them.\n *\n * The locks are released on the IModelHub, but the changeset associated with the locks is not updated.\n *\n * This method is optional, so not all IModelHubs will implement it. If this method is not implemented\n * explicitly by an IModelHub, it will be implemented implicitly by calling\n * {@link BackendHubAccess.releaseAllLocks}, passing `changeset.id=\"\"` and `changeset.index=0` in the\n * first argument to indicate that the lock state should change without updating the changeset associated\n * with the locks.\n *\n * @beta\n */\n abandonAllLocks?: (arg: BriefcaseIdArg) => Promise<void>;\n\n /** Get the iModelId of an iModel by name. Undefined if no iModel with that name exists. */\n queryIModelByName: (arg: IModelNameArg) => Promise<GuidString | undefined>;\n\n /** create a new iModel. Returns the Guid of the newly created iModel */\n createNewIModel: (arg: CreateNewIModelProps) => Promise<GuidString>;\n\n /** delete an iModel */\n deleteIModel: (arg: IModelIdArg & ITwinIdArg) => Promise<void>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ChangeSummaryManager.d.ts","sourceRoot":"","sources":["../../src/Ch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