@itwin/core-backend 5.11.0-dev.9 → 5.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/CHANGELOG.md +27 -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/BlobContainerService.d.ts +14 -1
  6. package/lib/cjs/BlobContainerService.d.ts.map +1 -1
  7. package/lib/cjs/BlobContainerService.js.map +1 -1
  8. package/lib/cjs/BriefcaseManager.d.ts +3 -1
  9. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  10. package/lib/cjs/BriefcaseManager.js +3 -3
  11. package/lib/cjs/BriefcaseManager.js.map +1 -1
  12. package/lib/cjs/ClassRegistry.d.ts +1 -1
  13. package/lib/cjs/ClassRegistry.js +1 -1
  14. package/lib/cjs/ClassRegistry.js.map +1 -1
  15. package/lib/cjs/CloudSqlite.d.ts +1 -1
  16. package/lib/cjs/CloudSqlite.d.ts.map +1 -1
  17. package/lib/cjs/CloudSqlite.js +4 -1
  18. package/lib/cjs/CloudSqlite.js.map +1 -1
  19. package/lib/cjs/DisplayStyle.d.ts.map +1 -1
  20. package/lib/cjs/DisplayStyle.js +4 -8
  21. package/lib/cjs/DisplayStyle.js.map +1 -1
  22. package/lib/cjs/ECDb.d.ts +4 -4
  23. package/lib/cjs/ECDb.d.ts.map +1 -1
  24. package/lib/cjs/ECDb.js +4 -4
  25. package/lib/cjs/ECDb.js.map +1 -1
  26. package/lib/cjs/ECSqlStatement.d.ts +6 -6
  27. package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
  28. package/lib/cjs/ECSqlStatement.js +4 -4
  29. package/lib/cjs/ECSqlStatement.js.map +1 -1
  30. package/lib/cjs/EditTxn.d.ts +56 -1
  31. package/lib/cjs/EditTxn.d.ts.map +1 -1
  32. package/lib/cjs/EditTxn.js +138 -0
  33. package/lib/cjs/EditTxn.js.map +1 -1
  34. package/lib/cjs/Element.d.ts +1 -1
  35. package/lib/cjs/Element.js +1 -1
  36. package/lib/cjs/Element.js.map +1 -1
  37. package/lib/cjs/ElementAspect.d.ts +1 -1
  38. package/lib/cjs/ElementAspect.js +1 -1
  39. package/lib/cjs/ElementAspect.js.map +1 -1
  40. package/lib/cjs/Entity.d.ts +1 -1
  41. package/lib/cjs/Entity.js +1 -1
  42. package/lib/cjs/Entity.js.map +1 -1
  43. package/lib/cjs/GeoCoordConfig.d.ts +6 -0
  44. package/lib/cjs/GeoCoordConfig.d.ts.map +1 -1
  45. package/lib/cjs/GeoCoordConfig.js +6 -0
  46. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  47. package/lib/cjs/IModelDb.d.ts +54 -14
  48. package/lib/cjs/IModelDb.d.ts.map +1 -1
  49. package/lib/cjs/IModelDb.js +32 -14
  50. package/lib/cjs/IModelDb.js.map +1 -1
  51. package/lib/cjs/IModelElementCloneContext.d.ts +1 -1
  52. package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
  53. package/lib/cjs/IModelElementCloneContext.js +1 -1
  54. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  55. package/lib/cjs/IModelHost.d.ts +7 -5
  56. package/lib/cjs/IModelHost.d.ts.map +1 -1
  57. package/lib/cjs/IModelHost.js +2 -2
  58. package/lib/cjs/IModelHost.js.map +1 -1
  59. package/lib/cjs/NativeHost.js +1 -1
  60. package/lib/cjs/NativeHost.js.map +1 -1
  61. package/lib/cjs/SQLiteDb.d.ts +1 -1
  62. package/lib/cjs/SQLiteDb.js +1 -1
  63. package/lib/cjs/SQLiteDb.js.map +1 -1
  64. package/lib/cjs/SqliteStatement.d.ts +1 -1
  65. package/lib/cjs/SqliteStatement.d.ts.map +1 -1
  66. package/lib/cjs/SqliteStatement.js +1 -1
  67. package/lib/cjs/SqliteStatement.js.map +1 -1
  68. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  69. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  70. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  71. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  72. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  73. package/lib/cjs/workspace/SettingsEditor.d.ts +4 -9
  74. package/lib/cjs/workspace/SettingsEditor.d.ts.map +1 -1
  75. package/lib/cjs/workspace/SettingsEditor.js +31 -15
  76. package/lib/cjs/workspace/SettingsEditor.js.map +1 -1
  77. package/lib/esm/BackendHubAccess.d.ts +1 -1
  78. package/lib/esm/BackendHubAccess.js +1 -1
  79. package/lib/esm/BackendHubAccess.js.map +1 -1
  80. package/lib/esm/BlobContainerService.d.ts +14 -1
  81. package/lib/esm/BlobContainerService.d.ts.map +1 -1
  82. package/lib/esm/BlobContainerService.js.map +1 -1
  83. package/lib/esm/BriefcaseManager.d.ts +3 -1
  84. package/lib/esm/BriefcaseManager.d.ts.map +1 -1
  85. package/lib/esm/BriefcaseManager.js +3 -3
  86. package/lib/esm/BriefcaseManager.js.map +1 -1
  87. package/lib/esm/ClassRegistry.d.ts +1 -1
  88. package/lib/esm/ClassRegistry.js +1 -1
  89. package/lib/esm/ClassRegistry.js.map +1 -1
  90. package/lib/esm/CloudSqlite.d.ts +1 -1
  91. package/lib/esm/CloudSqlite.d.ts.map +1 -1
  92. package/lib/esm/CloudSqlite.js +4 -1
  93. package/lib/esm/CloudSqlite.js.map +1 -1
  94. package/lib/esm/DisplayStyle.d.ts.map +1 -1
  95. package/lib/esm/DisplayStyle.js +4 -8
  96. package/lib/esm/DisplayStyle.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/EditTxn.d.ts +56 -1
  106. package/lib/esm/EditTxn.d.ts.map +1 -1
  107. package/lib/esm/EditTxn.js +140 -2
  108. package/lib/esm/EditTxn.js.map +1 -1
  109. package/lib/esm/Element.d.ts +1 -1
  110. package/lib/esm/Element.js +1 -1
  111. package/lib/esm/Element.js.map +1 -1
  112. package/lib/esm/ElementAspect.d.ts +1 -1
  113. package/lib/esm/ElementAspect.js +1 -1
  114. package/lib/esm/ElementAspect.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/GeoCoordConfig.d.ts +6 -0
  119. package/lib/esm/GeoCoordConfig.d.ts.map +1 -1
  120. package/lib/esm/GeoCoordConfig.js +6 -0
  121. package/lib/esm/GeoCoordConfig.js.map +1 -1
  122. package/lib/esm/IModelDb.d.ts +54 -14
  123. package/lib/esm/IModelDb.d.ts.map +1 -1
  124. package/lib/esm/IModelDb.js +32 -14
  125. package/lib/esm/IModelDb.js.map +1 -1
  126. package/lib/esm/IModelElementCloneContext.d.ts +1 -1
  127. package/lib/esm/IModelElementCloneContext.d.ts.map +1 -1
  128. package/lib/esm/IModelElementCloneContext.js +1 -1
  129. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  130. package/lib/esm/IModelHost.d.ts +7 -5
  131. package/lib/esm/IModelHost.d.ts.map +1 -1
  132. package/lib/esm/IModelHost.js +2 -2
  133. package/lib/esm/IModelHost.js.map +1 -1
  134. package/lib/esm/NativeHost.js +1 -1
  135. package/lib/esm/NativeHost.js.map +1 -1
  136. package/lib/esm/SQLiteDb.d.ts +1 -1
  137. package/lib/esm/SQLiteDb.js +1 -1
  138. package/lib/esm/SQLiteDb.js.map +1 -1
  139. package/lib/esm/SqliteStatement.d.ts +1 -1
  140. package/lib/esm/SqliteStatement.d.ts.map +1 -1
  141. package/lib/esm/SqliteStatement.js +1 -1
  142. package/lib/esm/SqliteStatement.js.map +1 -1
  143. package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  144. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  145. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  146. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  147. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  148. package/lib/esm/test/TestUtils.d.ts +18 -3
  149. package/lib/esm/test/TestUtils.d.ts.map +1 -1
  150. package/lib/esm/test/TestUtils.js +22 -3
  151. package/lib/esm/test/TestUtils.js.map +1 -1
  152. package/lib/esm/test/annotations/TextAnnotation.test.js +81 -16
  153. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  154. package/lib/esm/test/ecdb/ConcurrentQuery.test.js +4 -2
  155. package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -1
  156. package/lib/esm/test/ecdb/ECDb.test.js +1 -1
  157. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
  158. package/lib/esm/test/ecdb/ECSqlStatement.test.js +8 -2
  159. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
  160. package/lib/esm/test/hubaccess/CodeSwap.test.d.ts +2 -0
  161. package/lib/esm/test/hubaccess/CodeSwap.test.d.ts.map +1 -0
  162. package/lib/esm/test/hubaccess/CodeSwap.test.js +431 -0
  163. package/lib/esm/test/hubaccess/CodeSwap.test.js.map +1 -0
  164. package/lib/esm/test/imodel/IModel.test.js +10 -2
  165. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  166. package/lib/esm/test/standalone/ChangeElementParentModel.test.d.ts +2 -0
  167. package/lib/esm/test/standalone/ChangeElementParentModel.test.d.ts.map +1 -0
  168. package/lib/esm/test/standalone/ChangeElementParentModel.test.js +460 -0
  169. package/lib/esm/test/standalone/ChangeElementParentModel.test.js.map +1 -0
  170. package/lib/esm/test/standalone/ChangesetReader.test.js +3 -0
  171. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  172. package/lib/esm/test/standalone/CloudSqlite.test.d.ts +2 -0
  173. package/lib/esm/test/standalone/CloudSqlite.test.d.ts.map +1 -0
  174. package/lib/esm/test/standalone/CloudSqlite.test.js +43 -0
  175. package/lib/esm/test/standalone/CloudSqlite.test.js.map +1 -0
  176. package/lib/esm/test/standalone/IModelWrite.test.d.ts.map +1 -1
  177. package/lib/esm/test/standalone/IModelWrite.test.js +2 -33
  178. package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
  179. package/lib/esm/test/standalone/ITwinWorkspace.test.js +118 -1
  180. package/lib/esm/test/standalone/ITwinWorkspace.test.js.map +1 -1
  181. package/lib/esm/test/standalone/Workspace.test.js +2 -2
  182. package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
  183. package/lib/esm/workspace/SettingsEditor.d.ts +4 -9
  184. package/lib/esm/workspace/SettingsEditor.d.ts.map +1 -1
  185. package/lib/esm/workspace/SettingsEditor.js +31 -15
  186. package/lib/esm/workspace/SettingsEditor.js.map +1 -1
  187. package/package.json +15 -15
  188. package/lib/esm/test/misc/GeoServices.test.d.ts +0 -2
  189. package/lib/esm/test/misc/GeoServices.test.d.ts.map +0 -1
  190. package/lib/esm/test/misc/GeoServices.test.js +0 -918
  191. package/lib/esm/test/misc/GeoServices.test.js.map +0 -1
@@ -80,8 +80,10 @@ var SettingsContainers;
80
80
  }
81
81
  SettingsContainers.getITwinContainerId = getITwinContainerId;
82
82
  /**
83
- * Look up the settings container for an iTwin and obtain a read-only access token.
84
- * @returns container props needed by [[IModelHost.getITwinWorkspace]].
83
+ * Look up settings containers for an iTwin and its account iTwin and obtain read-only access tokens.
84
+ * @returns Container props needed by [[IModelHost.getITwinWorkspace]]. The requested iTwin's settings
85
+ * container is returned at [[SettingsPriority.iTwin]]; the account iTwin container is returned at
86
+ * [[SettingsPriority.organization]].
85
87
  * @note Requires [[IModelHost.authorizationClient]] to be configured.
86
88
  * @note Requires [[BlobContainer.service]] to be configured.
87
89
  */
@@ -89,25 +91,39 @@ var SettingsContainers;
89
91
  if (undefined === BlobContainerService_1.BlobContainer.service)
90
92
  core_common_1.ITwinSettingsError.throwError("blob-service-unavailable", { message: "BlobContainer.service is not available." });
91
93
  const userToken = await IModelHost_1.IModelHost.getAccessToken();
92
- const containers = await queryContainers({ iTwinId });
93
- if (!containers || containers.length === 0)
94
+ const containers = await queryContainers({ iTwinId, includeParentITwins: { filter: "accountOnly" } });
95
+ if (containers.length === 0)
94
96
  return undefined;
95
- if (containers.length > 1) {
96
- core_common_1.ITwinSettingsError.throwError("multiple-itwin-settings-containers", {
97
- message: `Multiple iTwin settings containers were found for '${iTwinId}', so a container cannot be automatically selected.`,
98
- iTwinId,
99
- });
100
- }
101
- const tokenProps = await BlobContainerService_1.BlobContainer.service.requestToken({ containerId: containers[0].containerId, accessLevel: "read", userToken });
102
- return [{
97
+ const seenITwins = new Set();
98
+ const results = [];
99
+ for (const container of containers) {
100
+ const ownerITwinId = container.iTwinId;
101
+ if (undefined === ownerITwinId) {
102
+ core_common_1.ITwinSettingsError.throwError("missing-container-itwinid", {
103
+ message: `Settings container '${container.containerId}' has no iTwinId. Please upgrade to a newer version of the BlobContainer service that populates iTwinId in query results.`,
104
+ iTwinId,
105
+ });
106
+ }
107
+ if (seenITwins.has(ownerITwinId)) {
108
+ core_common_1.ITwinSettingsError.throwError("multiple-itwin-settings-containers", {
109
+ message: `Multiple iTwin settings containers were found for '${ownerITwinId}', so a container cannot be automatically selected.`,
110
+ iTwinId: ownerITwinId,
111
+ });
112
+ }
113
+ seenITwins.add(ownerITwinId);
114
+ const priority = container.accountITwinId === ownerITwinId ? Settings_1.SettingsPriority.organization : Settings_1.SettingsPriority.iTwin;
115
+ const tokenProps = await BlobContainerService_1.BlobContainer.service.requestToken({ containerId: container.containerId, accessLevel: "read", userToken });
116
+ results.push({
103
117
  baseUri: tokenProps.baseUri,
104
- containerId: containers[0].containerId,
118
+ containerId: container.containerId,
105
119
  storageType: tokenProps.provider,
106
120
  accessToken: tokenProps.token,
107
- priority: Settings_1.SettingsPriority.iTwin,
121
+ priority,
108
122
  dbName: SettingsDb_1.settingsWorkspaceDbName,
109
123
  includePrerelease: true,
110
- }];
124
+ });
125
+ }
126
+ return results;
111
127
  }
112
128
  SettingsContainers.getITwinSettingsSources = getITwinSettingsSources;
113
129
  })(SettingsContainers || (exports.SettingsContainers = SettingsContainers = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsEditor.js","sourceRoot":"","sources":["../../../src/workspace/SettingsEditor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oDAAwD;AAGxD,kEAAwD;AACxD,8CAA2C;AAC3C,iFAAsH;AAEtH,yCAA8C;AAC9C,6CAAuD;AAEvD;;;;;GAKG;AACU,QAAA,oBAAoB,GAAG,oBAAoB,CAAC;AAEzD,gBAAgB;AAChB,IAAiB,cAAc,CAsB9B;AAtBD,WAAiB,cAAc;IAC7B,8DAA8D;IACjD,4BAAa,GAAG,UAAU,CAAC;IAExC;;;;OAIG;IACI,KAAK,UAAU,iBAAiB,CAAC,OAAmB;QACzD,OAAO,IAAA,oDAA+B,EAAC,OAAO,CAAC,CAAC;IAClD,CAAC;IAFqB,gCAAiB,oBAEtC,CAAA;IAED;;;;;OAKG;IACI,KAAK,UAAU,WAAW,CAAC,OAAmB;QACnD,OAAO,IAAA,8CAAyB,EAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;IAFqB,0BAAW,cAEhC,CAAA;AACH,CAAC,EAtBgB,cAAc,8BAAd,cAAc,QAsB9B;AAED;;;GAGG;AACH,IAAiB,kBAAkB,CAqElC;AArED,WAAiB,kBAAkB;IASjC;;;;OAIG;IACH,KAAK,UAAU,eAAe,CAAC,IAAe;QAC5C,IAAI,SAAS,K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CAAoC,EAAE;gBAClE,OAAO,EAAE,sDAAsD,OAAO,qDAAqD;gBAC3H,OAAO;aACR,CAAC,CAAC;QACL,CAAC;QAED,MAAM,UAAU,GAAG,MAAM,oCAAa,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;QACxI,OAAO,CAAC;gBACN,OAAO,EAAE,UAAU,CAAC,OAAO;gBAC3B,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW;gBACtC,WAAW,EAAE,UAAU,CAAC,QAAQ;gBAChC,WAAW,EAAE,UAAU,CAAC,KAAK;gBAC7B,QAAQ,EAAE,2BAAgB,CAAC,KAAK;gBAChC,MAAM,EAAE,oCAAuB;gBAC/B,iBAAiB,EAAE,IAAI;aACxB,CAAC,CAAC;IACL,CAAC;IAxBqB,0CAAuB,0BAwB5C,CAAA;AACH,CAAC,EArEgB,kBAAkB,kCAAlB,kBAAkB,QAqElC","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 { ITwinSettingsError } from \"@itwin/core-common\";\nimport { GuidString } from \"@itwin/core-bentley\";\nimport { WorkspaceContainerId, WorkspaceDbSettingsProps } from \"./Workspace\";\nimport { BlobContainer } from \"../BlobContainerService\";\nimport { IModelHost } from \"../IModelHost\";\nimport { constructSettingsEditorForITwin, getSettingsEditorForITwin } from \"../internal/workspace/SettingsEditorImpl\";\nimport { EditableWorkspaceContainer, WorkspaceEditor } from \"./WorkspaceEditor\";\nimport { SettingsPriority } from \"./Settings\";\nimport { settingsWorkspaceDbName } from \"./SettingsDb\";\n\n/** The default resource name used to store settings in a [[WorkspaceDb]].\n * This is the key under which all settings are stored in the SQLite `strings` table.\n * When loading settings at runtime via [[Workspace.loadSettingsDictionary]], the `resourceName` defaults\n * to this value, ensuring the read and write paths always agree on which key to use.\n * @internal\n */\nexport const settingsResourceName = \"settingsDictionary\";\n\n/** @internal */\nexport namespace SettingsEditor {\n /** The type of workspace container used to store settings. */\n export const containerType = \"settings\";\n\n /**\n * Create a new [[SettingsEditor]] for creating new versions of [[SettingsDb]]s.\n * @note The caller becomes the owner of the SettingsEditor and is responsible for calling [[SettingsEditor.close]] on it when finished.\n * @note It is illegal to have more than one SettingsEditor active in a single session.\n */\n export async function constructForITwin(iTwinId: GuidString): Promise<{ editor: WorkspaceEditor; container: EditableWorkspaceContainer }> {\n return constructSettingsEditorForITwin(iTwinId);\n }\n\n /**\n * Obtain a [[SettingsEditor]] for the existing settings container associated with an iTwin.\n * @returns The editor and container, or `undefined` if no settings container exists for the iTwin.\n * @note The caller becomes the owner of the SettingsEditor and is responsible for calling [[SettingsEditor.close]] on it when finished.\n * @note It is illegal to have more than one SettingsEditor active in a single session.\n */\n export async function getForITwin(iTwinId: GuidString): Promise<{ editor: WorkspaceEditor; container: EditableWorkspaceContainer } | undefined> {\n return getSettingsEditorForITwin(iTwinId);\n }\n}\n\n/**\n * Help locate and obtain access to known containers with type \"settings\".\n * @internal\n */\nexport namespace SettingsContainers {\n /** Arguments for [[SettingsContainers.queryContainers]]. */\n export interface QueryArgs {\n /** The iTwinId whose settings containers should be queried. */\n iTwinId: GuidString;\n /** Optional label filter. */\n label?: string;\n }\n\n /**\n * Query the [[BlobContainer]] service for all settings containers associated with a given iTwin.\n * Automatically filters by `containerType: \"settings\"`.\n * @note Requires [[IModelHost.authorizationClient]] to be configured.\n */\n async function queryContainers(args: QueryArgs): Promise<BlobContainer.MetadataResponse[]> {\n if (undefined === BlobContainer.service)\n ITwinSettingsError.throwError(\"blob-service-unavailable\", { message: \"BlobContainer.service is not available.\" });\n\n const userToken = await IModelHost.getAccessToken();\n return BlobContainer.service.queryContainersMetadata(userToken, { ...args, containerType: SettingsEditor.containerType });\n }\n\n /**\n * Query the [[BlobContainer]] service for the single settings container associated with a given iTwin.\n * @returns The containerId, or `undefined` if no container exists.\n * @throws if more than one settings container is found.\n */\n export async function getITwinContainerId(iTwinId: GuidString): Promise<WorkspaceContainerId | undefined> {\n const containers = await queryContainers({ iTwinId });\n if (containers.length > 1) {\n ITwinSettingsError.throwError(\"multiple-itwin-settings-containers\", {\n message: `Multiple iTwin settings containers were found for '${iTwinId}', so a container cannot be automatically selected.`,\n iTwinId,\n });\n }\n return containers[0]?.containerId;\n }\n\n /**\n * Look up the settings container for an iTwin and obtain a read-only access token.\n * @returns container props needed by [[IModelHost.getITwinWorkspace]].\n * @note Requires [[IModelHost.authorizationClient]] to be configured.\n * @note Requires [[BlobContainer.service]] to be configured.\n */\n export async function getITwinSettingsSources(iTwinId: GuidString): Promise<WorkspaceDbSettingsProps[] | undefined> {\n if (undefined === BlobContainer.service)\n ITwinSettingsError.throwError(\"blob-service-unavailable\", { message: \"BlobContainer.service is not available.\" });\n\n const userToken = await IModelHost.getAccessToken();\n const containers = await queryContainers({ iTwinId });\n if (!containers || containers.length === 0) return undefined;\n if (containers.length > 1) {\n ITwinSettingsError.throwError(\"multiple-itwin-settings-containers\", {\n message: `Multiple iTwin settings containers were found for '${iTwinId}', so a container cannot be automatically selected.`,\n iTwinId,\n });\n }\n\n const tokenProps = await BlobContainer.service.requestToken({ containerId: containers[0].containerId, accessLevel: \"read\", userToken });\n return [{\n baseUri: tokenProps.baseUri,\n containerId: containers[0].containerId,\n storageType: tokenProps.provider,\n accessToken: tokenProps.token,\n priority: SettingsPriority.iTwin,\n dbName: settingsWorkspaceDbName,\n includePrerelease: true,\n }];\n }\n}\n"]}
1
+ {"version":3,"file":"SettingsEditor.js","sourceRoot":"","sources":["../../../src/workspace/SettingsEditor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oDAAwD;AAGxD,kEAAwD;AACxD,8CAA2C;AAC3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,YAAY,CAAC,CAAC;YAE7B,MAAM,QAAQ,GAAG,SAAS,CAAC,cAAc,KAAK,YAAY,CAAC,CAAC,CAAC,2BAAgB,CAAC,YAAY,CAAC,CAAC,CAAC,2BAAgB,CAAC,KAAK,CAAC;YACpH,MAAM,UAAU,GAAG,MAAM,oCAAa,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,WAAW,EAAE,SAAS,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;YACpI,OAAO,CAAC,IAAI,CAAC;gBACX,OAAO,EAAE,UAAU,CAAC,OAAO;gBAC3B,WAAW,EAAE,SAAS,CAAC,WAAW;gBAClC,WAAW,EAAE,UAAU,CAAC,QAAQ;gBAChC,WAAW,EAAE,UAAU,CAAC,KAAK;gBAC7B,QAAQ;gBACR,MAAM,EAAE,oCAAuB;gBAC/B,iBAAiB,EAAE,IAAI;aACxB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAxCqB,0CAAuB,0BAwC5C,CAAA;AACH,CAAC,EA/EgB,kBAAkB,kCAAlB,kBAAkB,QA+ElC","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 { ITwinSettingsError } from \"@itwin/core-common\";\nimport { GuidString } from \"@itwin/core-bentley\";\nimport { WorkspaceContainerId, WorkspaceDbSettingsProps } from \"./Workspace\";\nimport { BlobContainer } from \"../BlobContainerService\";\nimport { IModelHost } from \"../IModelHost\";\nimport { constructSettingsEditorForITwin, getSettingsEditorForITwin } from \"../internal/workspace/SettingsEditorImpl\";\nimport { EditableWorkspaceContainer, WorkspaceEditor } from \"./WorkspaceEditor\";\nimport { SettingsPriority } from \"./Settings\";\nimport { settingsWorkspaceDbName } from \"./SettingsDb\";\n\n/** The default resource name used to store settings in a [[WorkspaceDb]].\n * This is the key under which all settings are stored in the SQLite `strings` table.\n * When loading settings at runtime via [[Workspace.loadSettingsDictionary]], the `resourceName` defaults\n * to this value, ensuring the read and write paths always agree on which key to use.\n * @internal\n */\nexport const settingsResourceName = \"settingsDictionary\";\n\n/** @internal */\nexport namespace SettingsEditor {\n /** The type of workspace container used to store settings. */\n export const containerType = \"settings\";\n\n /**\n * Create a new [[SettingsEditor]] for creating new versions of [[SettingsDb]]s.\n * @note The caller becomes the owner of the SettingsEditor and is responsible for calling [[SettingsEditor.close]] on it when finished.\n * @note It is illegal to have more than one SettingsEditor active in a single session.\n */\n export async function constructForITwin(iTwinId: GuidString): Promise<{ editor: WorkspaceEditor; container: EditableWorkspaceContainer }> {\n return constructSettingsEditorForITwin(iTwinId);\n }\n\n /**\n * Obtain a [[SettingsEditor]] for the existing settings container associated with an iTwin.\n * @returns The editor and container, or `undefined` if no settings container exists for the iTwin.\n * @note The caller becomes the owner of the SettingsEditor and is responsible for calling [[SettingsEditor.close]] on it when finished.\n * @note It is illegal to have more than one SettingsEditor active in a single session.\n */\n export async function getForITwin(iTwinId: GuidString): Promise<{ editor: WorkspaceEditor; container: EditableWorkspaceContainer } | undefined> {\n return getSettingsEditorForITwin(iTwinId);\n }\n}\n\n/**\n * Help locate and obtain access to known containers with type \"settings\".\n * @internal\n */\nexport namespace SettingsContainers {\n /**\n * Query the [[BlobContainer]] service for all settings containers associated with a given iTwin.\n * Automatically filters by `containerType: \"settings\"`.\n * @note Requires [[IModelHost.authorizationClient]] to be configured.\n */\n async function queryContainers(args: BlobContainer.QueryContainerProps): Promise<BlobContainer.MetadataResponse[]> {\n if (undefined === BlobContainer.service)\n ITwinSettingsError.throwError(\"blob-service-unavailable\", { message: \"BlobContainer.service is not available.\" });\n\n const userToken = await IModelHost.getAccessToken();\n return BlobContainer.service.queryContainersMetadata(userToken, { ...args, containerType: SettingsEditor.containerType });\n }\n\n /**\n * Query the [[BlobContainer]] service for the single settings container associated with a given iTwin.\n * @returns The containerId, or `undefined` if no container exists.\n * @throws if more than one settings container is found.\n */\n export async function getITwinContainerId(iTwinId: GuidString): Promise<WorkspaceContainerId | undefined> {\n const containers = await queryContainers({ iTwinId });\n if (containers.length > 1) {\n ITwinSettingsError.throwError(\"multiple-itwin-settings-containers\", {\n message: `Multiple iTwin settings containers were found for '${iTwinId}', so a container cannot be automatically selected.`,\n iTwinId,\n });\n }\n return containers[0]?.containerId;\n }\n\n /**\n * Look up settings containers for an iTwin and its account iTwin and obtain read-only access tokens.\n * @returns Container props needed by [[IModelHost.getITwinWorkspace]]. The requested iTwin's settings\n * container is returned at [[SettingsPriority.iTwin]]; the account iTwin container is returned at\n * [[SettingsPriority.organization]].\n * @note Requires [[IModelHost.authorizationClient]] to be configured.\n * @note Requires [[BlobContainer.service]] to be configured.\n */\n export async function getITwinSettingsSources(iTwinId: GuidString): Promise<WorkspaceDbSettingsProps[] | undefined> {\n if (undefined === BlobContainer.service)\n ITwinSettingsError.throwError(\"blob-service-unavailable\", { message: \"BlobContainer.service is not available.\" });\n\n const userToken = await IModelHost.getAccessToken();\n const containers = await queryContainers({ iTwinId, includeParentITwins: { filter: \"accountOnly\" } });\n if (containers.length === 0) return undefined;\n\n const seenITwins = new Set<string>();\n const results: WorkspaceDbSettingsProps[] = [];\n for (const container of containers) {\n const ownerITwinId = container.iTwinId;\n if (undefined === ownerITwinId) {\n ITwinSettingsError.throwError(\"missing-container-itwinid\", {\n message: `Settings container '${container.containerId}' has no iTwinId. Please upgrade to a newer version of the BlobContainer service that populates iTwinId in query results.`,\n iTwinId,\n });\n }\n if (seenITwins.has(ownerITwinId)) {\n ITwinSettingsError.throwError(\"multiple-itwin-settings-containers\", {\n message: `Multiple iTwin settings containers were found for '${ownerITwinId}', so a container cannot be automatically selected.`,\n iTwinId: ownerITwinId,\n });\n }\n seenITwins.add(ownerITwinId);\n\n const priority = container.accountITwinId === ownerITwinId ? SettingsPriority.organization : SettingsPriority.iTwin;\n const tokenProps = await BlobContainer.service.requestToken({ containerId: container.containerId, accessLevel: \"read\", userToken });\n results.push({\n baseUri: tokenProps.baseUri,\n containerId: container.containerId,\n storageType: tokenProps.provider,\n accessToken: tokenProps.token,\n priority,\n dbName: settingsWorkspaceDbName,\n includePrerelease: true,\n });\n }\n\n return results;\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"]}
@@ -56,7 +56,12 @@ export declare namespace BlobContainer {
56
56
  * Properties returned by queryContainersMetadata
57
57
  */
58
58
  interface MetadataResponse extends Metadata {
59
+ /** The id of the container. */
59
60
  containerId: string;
61
+ /** The iTwinId that owns this container. */
62
+ iTwinId?: GuidString;
63
+ /** The account iTwinId of the owning iTwin. */
64
+ accountITwinId?: GuidString;
60
65
  }
61
66
  /** Properties returned by `Service.requestToken` */
62
67
  interface TokenProps {
@@ -134,6 +139,10 @@ export declare namespace BlobContainer {
134
139
  containerType?: GuidString;
135
140
  /** optional label of the containers to query */
136
141
  label?: GuidString;
142
+ /** Whether to include parent iTwins in the query. Pass `true` to traverse the full parent chain, or `{ filter: "accountOnly" }` to include only the account iTwin. Defaults to `false`. */
143
+ includeParentITwins?: boolean | {
144
+ filter: "accountOnly";
145
+ };
137
146
  }
138
147
  /** Methods to create, delete, and access blob containers. */
139
148
  interface ContainerService {
@@ -148,7 +157,11 @@ export declare namespace BlobContainer {
148
157
  queryScope(container: AccessContainerProps): Promise<Scope>;
149
158
  /** query the Metadata for a specific container */
150
159
  queryMetadata(container: AccessContainerProps): Promise<Metadata>;
151
- /** Returns all containers and their metadata associated with a given iTwinId. Can be further queried by label and containerType. */
160
+ /** Returns all containers and their metadata associated with a given iTwinId.
161
+ * Pass `includeParentITwins: { filter: "accountOnly" }` to also include the account iTwin container,
162
+ * without traversing any higher parent chain.
163
+ * Results can be further queried by label and containerType.
164
+ */
152
165
  queryContainersMetadata(userToken: UserToken, args: QueryContainerProps): Promise<MetadataResponse[]>;
153
166
  /** update the json properties of this container */
154
167
  updateJson(container: AccessContainerProps, json: SettingsContainer): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"BlobContainerService.d.ts","sourceRoot":"","sources":["../../src/BlobContainerService.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;;GAGG;AACH,yBAAiB,aAAa,CAAC;IAE7B,+FAA+F;IACxF,IAAI,OAAO,EAAE,aAAa,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAE/D,8CAA8C;IAC9C,KAAY,QA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OAAO,CAAC,UAAU,CAAC,CAAC;KAC7D;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"BlobContainerService.js","sourceRoot":"","sources":["../../src/BlobContainerService.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAOH;;;GAGG;AACH,MAAM,KAAW,aAAa,CA2K7B;AA3KD,WAAiB,aAAa;AA2K9B,CAAC,EA3KgB,aAAa,KAAb,aAAa,QA2K7B","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 BlobContainers\n */\n\n// spell:ignore datacenter\n\nimport { AccessToken, GuidString, Id64String } from \"@itwin/core-bentley\";\nimport { SettingsContainer } from \"./workspace/Settings\";\n\n/**\n * Types and functions for creating, deleting and authorizing access to cloud-based blob containers for an iTwin.\n * @beta\n */\nexport namespace BlobContainer {\n\n /** Object that implements the methods to create, delete, and request access to a container. */\n export let service: BlobContainer.ContainerService | undefined;\n\n /** name of cloud provider for a container. */\n export type Provider = \"azure\" | \"google\";\n\n /** the name of the container within its `Scope` */\n export type ContainerId = string;\n\n /** token that authenticates a user. This token is required to obtain a `ContainerToken`. */\n export type UserToken = AccessToken;\n\n /** token that authenticates access to a container for either read or write. */\n export type ContainerToken = AccessToken;\n\n /**\n * The scope for a container. This determines:\n * - the \"owner\" organization, including the contract that governs its legal and commercial terms and obligations\n * - the administrators who may configure RBAC permissions\n * - the datacenter for the container. Every container resides in a datacenter as determined by the iTwinId. This\n * determines the region for data residency requirements.\n * - the lifecycle constraints for the container. No container can outlive its iTwin or its iModel (if defined). That is,\n * when the iTwin/iModel is deleted (either explicitly or due to contract expiration), the container is also deleted.\n */\n export interface Scope {\n /** iTwinId of the owner of this container. */\n iTwinId: Id64String;\n /** optionally, an iModelId within the iTwin. If present, container is deleted when the iModel is deleted. */\n iModelId?: Id64String;\n /** the user GUID an individual, if this container is private. */\n ownerGuid?: GuidString;\n }\n\n /**\n * Metadata about the use of a container so that:\n * - administrators can understand why a container exists for assigning RBAC permissions appropriately\n * - usage reports can aggregate types of containers\n * - applications can identify their containers\n * - applications can store properties about their containers\n */\n export interface Metadata {\n /** The machine-readable string that describes what the container is being used for (e.g. \"workspace\"). Always lowercase and singular. */\n containerType: string;\n /** Human-readable name for the container. This will be displayed in the administrator RBAC panel, and on usage reports. Not required to be unique.*/\n label: string;\n /** Optional human-readable explanation of the information held in the container. This will be displayed in the administrator RBAC panel, and on usage reports. */\n description?: string;\n /** optional properties for the container */\n json?: SettingsContainer;\n }\n\n /**\n * Properties returned by queryContainersMetadata\n */\n export interface MetadataResponse extends Metadata {\n containerId: string;\n }\n\n /** Properties returned by `Service.requestToken` */\n export interface TokenProps {\n /**\n * Expiring token that provides the requested access to the container. Should be used in all subsequent requests for blobs within the container,\n * and must be refreshed before it expires\n */\n token: ContainerToken;\n /** Scope of the container. */\n scope: Scope;\n /** Name of the blob storage provider. */\n provider: Provider;\n /** Time at which the token will expire. The token should be refreshed (that is, a new token should be requested) before this time. */\n expiration: Date;\n /** Metadata of the container. */\n metadata: Metadata;\n /** Base URI of the storage account that hosts the container */\n baseUri: string;\n }\n\n /** The URI and Id of the container. */\n export interface UriAndId {\n baseUri: string;\n containerId: ContainerId;\n }\n\n /** Information required to access an existing container. */\n export interface AccessContainerProps extends UriAndId {\n userToken: UserToken;\n }\n\n /** Information about a newly created container. */\n export interface CreatedContainerProps extends UriAndId {\n /** name of the blob storage provider. */\n provider: Provider;\n }\n\n /**\n * Access level to request for token.\n * - `\"write\"`: request a writeable AccessToken.\n * - `\"read\"`: request a read-only AccessToken.\n * - `\"admin\"`: request a admin AccessToken.\n * - `\"writeIfPossible\"`: first request a writeable AccessToken. If the user is not authorized for write, request a read-only AccessToken.\n * If the user is not authorized for the level requested, an exception is thrown.\n */\n export type RequestAccessLevel = \"write\" | \"read\" | \"admin\" | \"writeIfPossible\";\n\n /** Information required to request an access token for a container. */\n export interface RequestTokenProps extends Omit<AccessContainerProps, \"baseUri\"> {\n /** the level of access requested. If not specified, defaults to `\"writeIfPossible\"`. */\n accessLevel?: RequestAccessLevel;\n /** the number of seconds before the token should expire.\n * @note A maximum duration is determined by the service. If no value is supplied, or the value is larger than the maximum, the maximum duration is used.\n */\n durationSeconds?: number;\n }\n\n /** Information required to create a new container. */\n export interface CreateNewContainerProps {\n /** the scope of the new container */\n scope: Scope;\n /** metadata to be stored on the new container */\n metadata: Metadata;\n /** The user's access token. The user must be authorized with \"create container\" RBAC role for the iTwin. */\n userToken: UserToken;\n /**\n * the id for the container. Useful for tests.\n * @internal\n */\n containerId?: ContainerId;\n }\n\n /**\n * Query Parameters for querying containers\n */\n export interface QueryContainerProps {\n /** the iTwinId of the containers to query */\n iTwinId: GuidString;\n /** optional iModelId of the containers to query */\n iModelId?: GuidString;\n /** optional containerType of the containers to query */\n containerType?: GuidString;\n /** optional label of the containers to query */\n label?: GuidString;\n }\n\n /** Methods to create, delete, and access blob containers. */\n export interface ContainerService {\n /** Create a new blob container. Throws on failure (e.g. access denied or container already exists.) */\n create(props: CreateNewContainerProps): Promise<CreatedContainerProps>;\n\n /**\n * Delete an existing blob container.\n * @note This method requires that the user be authorized with \"delete container\" RBAC role for the iTwin.\n */\n delete(container: AccessContainerProps): Promise<void>;\n\n /** query the Scope for a container */\n queryScope(container: AccessContainerProps): Promise<Scope>;\n\n /** query the Metadata for a specific container */\n queryMetadata(container: AccessContainerProps): Promise<Metadata>;\n\n /** Returns all containers and their metadata associated with a given iTwinId. Can be further queried by label and containerType. */\n queryContainersMetadata(userToken: UserToken, args: QueryContainerProps): Promise<MetadataResponse[]>;\n\n /** update the json properties of this container */\n updateJson(container: AccessContainerProps, json: SettingsContainer): Promise<void>;\n\n /** Request a `ContainerToken` for a container. Throws on failure. */\n requestToken(props: RequestTokenProps): Promise<TokenProps>;\n }\n}\n"]}
1
+ {"version":3,"file":"BlobContainerService.js","sourceRoot":"","sources":["../../src/BlobContainerService.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAOH;;;GAGG;AACH,MAAM,KAAW,aAAa,CAsL7B;AAtLD,WAAiB,aAAa;AAsL9B,CAAC,EAtLgB,aAAa,KAAb,aAAa,QAsL7B","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 BlobContainers\n */\n\n// spell:ignore datacenter\n\nimport { AccessToken, GuidString, Id64String } from \"@itwin/core-bentley\";\nimport { SettingsContainer } from \"./workspace/Settings\";\n\n/**\n * Types and functions for creating, deleting and authorizing access to cloud-based blob containers for an iTwin.\n * @beta\n */\nexport namespace BlobContainer {\n\n /** Object that implements the methods to create, delete, and request access to a container. */\n export let service: BlobContainer.ContainerService | undefined;\n\n /** name of cloud provider for a container. */\n export type Provider = \"azure\" | \"google\";\n\n /** the name of the container within its `Scope` */\n export type ContainerId = string;\n\n /** token that authenticates a user. This token is required to obtain a `ContainerToken`. */\n export type UserToken = AccessToken;\n\n /** token that authenticates access to a container for either read or write. */\n export type ContainerToken = AccessToken;\n\n /**\n * The scope for a container. This determines:\n * - the \"owner\" organization, including the contract that governs its legal and commercial terms and obligations\n * - the administrators who may configure RBAC permissions\n * - the datacenter for the container. Every container resides in a datacenter as determined by the iTwinId. This\n * determines the region for data residency requirements.\n * - the lifecycle constraints for the container. No container can outlive its iTwin or its iModel (if defined). That is,\n * when the iTwin/iModel is deleted (either explicitly or due to contract expiration), the container is also deleted.\n */\n export interface Scope {\n /** iTwinId of the owner of this container. */\n iTwinId: Id64String;\n /** optionally, an iModelId within the iTwin. If present, container is deleted when the iModel is deleted. */\n iModelId?: Id64String;\n /** the user GUID an individual, if this container is private. */\n ownerGuid?: GuidString;\n }\n\n /**\n * Metadata about the use of a container so that:\n * - administrators can understand why a container exists for assigning RBAC permissions appropriately\n * - usage reports can aggregate types of containers\n * - applications can identify their containers\n * - applications can store properties about their containers\n */\n export interface Metadata {\n /** The machine-readable string that describes what the container is being used for (e.g. \"workspace\"). Always lowercase and singular. */\n containerType: string;\n /** Human-readable name for the container. This will be displayed in the administrator RBAC panel, and on usage reports. Not required to be unique.*/\n label: string;\n /** Optional human-readable explanation of the information held in the container. This will be displayed in the administrator RBAC panel, and on usage reports. */\n description?: string;\n /** optional properties for the container */\n json?: SettingsContainer;\n }\n\n /**\n * Properties returned by queryContainersMetadata\n */\n export interface MetadataResponse extends Metadata {\n /** The id of the container. */\n containerId: string;\n /** The iTwinId that owns this container. */\n iTwinId?: GuidString;\n /** The account iTwinId of the owning iTwin. */\n accountITwinId?: GuidString;\n }\n\n /** Properties returned by `Service.requestToken` */\n export interface TokenProps {\n /**\n * Expiring token that provides the requested access to the container. Should be used in all subsequent requests for blobs within the container,\n * and must be refreshed before it expires\n */\n token: ContainerToken;\n /** Scope of the container. */\n scope: Scope;\n /** Name of the blob storage provider. */\n provider: Provider;\n /** Time at which the token will expire. The token should be refreshed (that is, a new token should be requested) before this time. */\n expiration: Date;\n /** Metadata of the container. */\n metadata: Metadata;\n /** Base URI of the storage account that hosts the container */\n baseUri: string;\n }\n\n /** The URI and Id of the container. */\n export interface UriAndId {\n baseUri: string;\n containerId: ContainerId;\n }\n\n /** Information required to access an existing container. */\n export interface AccessContainerProps extends UriAndId {\n userToken: UserToken;\n }\n\n /** Information about a newly created container. */\n export interface CreatedContainerProps extends UriAndId {\n /** name of the blob storage provider. */\n provider: Provider;\n }\n\n /**\n * Access level to request for token.\n * - `\"write\"`: request a writeable AccessToken.\n * - `\"read\"`: request a read-only AccessToken.\n * - `\"admin\"`: request a admin AccessToken.\n * - `\"writeIfPossible\"`: first request a writeable AccessToken. If the user is not authorized for write, request a read-only AccessToken.\n * If the user is not authorized for the level requested, an exception is thrown.\n */\n export type RequestAccessLevel = \"write\" | \"read\" | \"admin\" | \"writeIfPossible\";\n\n /** Information required to request an access token for a container. */\n export interface RequestTokenProps extends Omit<AccessContainerProps, \"baseUri\"> {\n /** the level of access requested. If not specified, defaults to `\"writeIfPossible\"`. */\n accessLevel?: RequestAccessLevel;\n /** the number of seconds before the token should expire.\n * @note A maximum duration is determined by the service. If no value is supplied, or the value is larger than the maximum, the maximum duration is used.\n */\n durationSeconds?: number;\n }\n\n /** Information required to create a new container. */\n export interface CreateNewContainerProps {\n /** the scope of the new container */\n scope: Scope;\n /** metadata to be stored on the new container */\n metadata: Metadata;\n /** The user's access token. The user must be authorized with \"create container\" RBAC role for the iTwin. */\n userToken: UserToken;\n /**\n * the id for the container. Useful for tests.\n * @internal\n */\n containerId?: ContainerId;\n }\n\n /**\n * Query Parameters for querying containers\n */\n export interface QueryContainerProps {\n /** the iTwinId of the containers to query */\n iTwinId: GuidString;\n /** optional iModelId of the containers to query */\n iModelId?: GuidString;\n /** optional containerType of the containers to query */\n containerType?: GuidString;\n /** optional label of the containers to query */\n label?: GuidString;\n /** Whether to include parent iTwins in the query. Pass `true` to traverse the full parent chain, or `{ filter: \"accountOnly\" }` to include only the account iTwin. Defaults to `false`. */\n includeParentITwins?: boolean | { filter: \"accountOnly\" };\n }\n\n /** Methods to create, delete, and access blob containers. */\n export interface ContainerService {\n /** Create a new blob container. Throws on failure (e.g. access denied or container already exists.) */\n create(props: CreateNewContainerProps): Promise<CreatedContainerProps>;\n\n /**\n * Delete an existing blob container.\n * @note This method requires that the user be authorized with \"delete container\" RBAC role for the iTwin.\n */\n delete(container: AccessContainerProps): Promise<void>;\n\n /** query the Scope for a container */\n queryScope(container: AccessContainerProps): Promise<Scope>;\n\n /** query the Metadata for a specific container */\n queryMetadata(container: AccessContainerProps): Promise<Metadata>;\n\n /** Returns all containers and their metadata associated with a given iTwinId.\n * Pass `includeParentITwins: { filter: \"accountOnly\" }` to also include the account iTwin container,\n * without traversing any higher parent chain.\n * Results can be further queried by label and containerType.\n */\n queryContainersMetadata(userToken: UserToken, args: QueryContainerProps): Promise<MetadataResponse[]>;\n\n /** update the json properties of this container */\n updateJson(container: AccessContainerProps, json: SettingsContainer): Promise<void>;\n\n /** Request a `ContainerToken` for a container. Throws on failure. */\n requestToken(props: RequestTokenProps): Promise<TokenProps>;\n }\n}\n"]}
@@ -243,7 +243,9 @@ export declare class BriefcaseManager {
243
243
  * @throws IModelError If the briefcase is not open in read-write mode, if there are pending transactions when reversing, or if applying a changeset fails.
244
244
  * @returns A promise that resolves when all required changesets have been applied.
245
245
  */
246
- static pullAndApplyChangesets(db: IModelDb, arg: PullChangesArgs): Promise<void>;
246
+ static pullAndApplyChangesets(db: IModelDb, arg: PullChangesArgs & {
247
+ noUpdateLoop?: boolean;
248
+ }): Promise<void>;
247
249
  /**
248
250
  * @internal
249
251
  * Creates a restore point for the specified briefcase database.
@@ -1 +1 @@
1
- {"version":3,"file":"BriefcaseManager.d.ts","sourceRoot":"","sources":["../../src/BriefcaseManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAMH,OAAO,EACL,WAAW,EAAE,UAAU,EAA6B,UAAU,EAAmD,QAAQ,EAC1H,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,WAAW,EAAoB,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,cAAc,EAA6C,mBAAmB,EACrM,YAAY,EAAE,aAAa,EAAE,wBAAwB,EAEtD,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE9H,OAAO,EAAsC,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAM7D,OAAO,EAAgB,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;A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AmB,CAAC,EAAE,EAAE,WAAW,EAAE,YAAY,GAAE,OAAe,GAAG,IAAI;IAiBvF;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;CAapC"}
@@ -351,10 +351,10 @@ export class BriefcaseManager {
351
351
  status = BriefcaseManager.deleteFolderIfEmpty(folderPathname);
352
352
  return status;
353
353
  }
354
- static async applySingleChangeset(db, changesetFile, fastForward) {
354
+ static async applySingleChangeset(db, changesetFile, fastForward, noUpdateLoop) {
355
355
  if (changesetFile.changesType === ChangesetType.Schema || changesetFile.changesType === ChangesetType.SchemaSync)
356
356
  db.clearCaches(); // for schema changesets, statement caches may become invalid. Do this *before* applying, in case db needs to be closed (open statements hold db open.)
357
- db[_nativeDb].applyChangeset(changesetFile, fastForward);
357
+ db[_nativeDb].applyChangeset(changesetFile, fastForward, noUpdateLoop);
358
358
  db.changeset = db[_nativeDb].getCurrentChangeset();
359
359
  // we're done with this changeset, delete it
360
360
  IModelJsFs.removeSync(changesetFile.pathname);
@@ -495,7 +495,7 @@ export class BriefcaseManager {
495
495
  const stopwatch = new StopWatch(`[${changeset.id}]`, true);
496
496
  Logger.logInfo(loggerCategory, `Starting application of changeset with id ${stopwatch.description}`);
497
497
  try {
498
- await this.applySingleChangeset(db, changeset, false);
498
+ await this.applySingleChangeset(db, changeset, false, arg.noUpdateLoop);
499
499
  Logger.logInfo(loggerCategory, `Applied changeset with id ${stopwatch.description} (${stopwatch.elapsedSeconds} seconds)`);
500
500
  }
501
501
  catch (err) {