@itwin/core-backend 4.0.0-dev.4 → 4.0.0-dev.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +89 -67
- package/lib/cjs/AliCloudStorageService.d.ts +1 -1
- package/lib/cjs/AliCloudStorageService.js.map +1 -1
- package/lib/cjs/BackendHubAccess.d.ts +3 -3
- package/lib/cjs/BackendHubAccess.js.map +1 -1
- package/lib/cjs/BriefcaseManager.js +13 -19
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/ChangeSummaryManager.js +6 -7
- package/lib/cjs/ChangeSummaryManager.js.map +1 -1
- package/lib/cjs/CheckpointManager.js +3 -4
- package/lib/cjs/CheckpointManager.js.map +1 -1
- package/lib/cjs/ClassRegistry.js +1 -2
- package/lib/cjs/ClassRegistry.js.map +1 -1
- package/lib/cjs/CloudSqlite.js +1 -1
- package/lib/cjs/CloudSqlite.js.map +1 -1
- package/lib/cjs/CloudStorageBackend.d.ts +4 -4
- package/lib/cjs/CloudStorageBackend.js +8 -11
- package/lib/cjs/CloudStorageBackend.js.map +1 -1
- package/lib/cjs/CodeService.d.ts +6 -6
- package/lib/cjs/CodeService.d.ts.map +1 -1
- package/lib/cjs/CodeService.js +3 -3
- package/lib/cjs/CodeService.js.map +1 -1
- package/lib/cjs/CustomViewState3dCreator.js +2 -2
- package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
- package/lib/cjs/DevTools.d.ts +4 -2
- package/lib/cjs/DevTools.d.ts.map +1 -1
- package/lib/cjs/DevTools.js +4 -2
- package/lib/cjs/DevTools.js.map +1 -1
- package/lib/cjs/DisplayStyle.js +8 -11
- package/lib/cjs/DisplayStyle.js.map +1 -1
- package/lib/cjs/ECDb.js +2 -4
- package/lib/cjs/ECDb.js.map +1 -1
- package/lib/cjs/Element.js +13 -21
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/ElementTreeWalker.js +2 -2
- package/lib/cjs/ElementTreeWalker.js.map +1 -1
- package/lib/cjs/GeoCoordConfig.js +1 -1
- package/lib/cjs/GeoCoordConfig.js.map +1 -1
- package/lib/cjs/HubMock.js +3 -5
- package/lib/cjs/HubMock.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +15 -1
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +44 -59
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelHost.d.ts +4 -4
- package/lib/cjs/IModelHost.d.ts.map +1 -1
- package/lib/cjs/IModelHost.js +15 -23
- package/lib/cjs/IModelHost.js.map +1 -1
- package/lib/cjs/IModelJsFs.js +2 -3
- package/lib/cjs/IModelJsFs.js.map +1 -1
- package/lib/cjs/IpcHost.js +11 -13
- package/lib/cjs/IpcHost.js.map +1 -1
- package/lib/cjs/LocalHub.js +11 -16
- package/lib/cjs/LocalHub.js.map +1 -1
- package/lib/cjs/LocalhostIpcHost.js +3 -5
- package/lib/cjs/LocalhostIpcHost.js.map +1 -1
- package/lib/cjs/Material.js +1 -2
- package/lib/cjs/Material.js.map +1 -1
- package/lib/cjs/NativeHost.js +3 -6
- package/lib/cjs/NativeHost.js.map +1 -1
- package/lib/cjs/SQLiteDb.js +2 -4
- package/lib/cjs/SQLiteDb.js.map +1 -1
- package/lib/cjs/TileStorage.js +4 -7
- package/lib/cjs/TileStorage.js.map +1 -1
- package/lib/cjs/ViewDefinition.d.ts +10 -14
- package/lib/cjs/ViewDefinition.d.ts.map +1 -1
- package/lib/cjs/ViewDefinition.js +14 -14
- package/lib/cjs/ViewDefinition.js.map +1 -1
- package/lib/cjs/rpc/tracing.js +1 -2
- package/lib/cjs/rpc/tracing.js.map +1 -1
- package/lib/cjs/rpc/web/request.js +1 -2
- package/lib/cjs/rpc/web/request.js.map +1 -1
- package/lib/cjs/rpc/web/response.js +1 -2
- package/lib/cjs/rpc/web/response.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +2 -3
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.js +4 -7
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +6 -8
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +1 -2
- package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
- package/lib/cjs/workspace/Settings.js +1 -2
- package/lib/cjs/workspace/Settings.js.map +1 -1
- package/lib/cjs/workspace/SettingsSchemas.js +3 -4
- package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
- package/lib/cjs/workspace/Workspace.js +15 -21
- package/lib/cjs/workspace/Workspace.js.map +1 -1
- package/package.json +17 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
# Change Log - @itwin/core-backend
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 08 Feb 2023 14:58:39 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 3.6.0
|
|
6
|
+
Wed, 08 Feb 2023 14:58:39 GMT
|
|
7
|
+
|
|
8
|
+
### Updates
|
|
9
|
+
|
|
10
|
+
- add CodeSpecs.updateProperties
|
|
11
|
+
- add flag schemaLockHeld
|
|
12
|
+
- Added getOriginPropertyName() method to column info.
|
|
13
|
+
- add allowPreceding as an optional boolean to CheckpointProps interface
|
|
14
|
+
- Log a warning when we fail to download a v2 checkpoint, but download a v1 checkpoint successfully.
|
|
15
|
+
- Promote IModelHost.authorizationClient to public.
|
|
16
|
+
- Add support for material elements with normal maps
|
|
17
|
+
- React to RPC deprecations.
|
|
18
|
+
- Fix documentation of ExternalSourceAspectProps.jsonProperties. It must be a string.
|
|
19
|
+
- Element.toJSON should not include undefined values for userLabel or federationGuid
|
|
20
|
+
- allow passing a custom schema read context to IModelDb.importSchemas
|
|
21
|
+
|
|
22
|
+
## 3.5.6
|
|
23
|
+
Fri, 24 Feb 2023 16:02:47 GMT
|
|
24
|
+
|
|
25
|
+
_Version update only_
|
|
4
26
|
|
|
5
27
|
## 3.5.5
|
|
6
28
|
Thu, 26 Jan 2023 22:53:27 GMT
|
|
@@ -496,7 +518,7 @@ Mon, 26 Jul 2021 12:21:25 GMT
|
|
|
496
518
|
|
|
497
519
|
- Reactivated test that stopped working when a previous PR for ecef dependency to geographicCRS was reverted
|
|
498
520
|
- store changesetIndex on IModelDb
|
|
499
|
-
- Better error checks when creating SpatialViewDefinition-s.
|
|
521
|
+
- Better error checks when creating SpatialViewDefinition-s.
|
|
500
522
|
- remove internal barrel-import usage
|
|
501
523
|
- throw exception when attempting to download a briefcase on top of an existing file
|
|
502
524
|
- Add case for InterpolationCurve3d
|
|
@@ -531,11 +553,11 @@ Fri, 09 Jul 2021 18:11:24 GMT
|
|
|
531
553
|
### Updates
|
|
532
554
|
|
|
533
555
|
- TemplateModelCloner now assigns a new FederationGuid for cloned element instances.
|
|
534
|
-
- Accomodated the inability to reverse Changesets when creating change summaries.
|
|
556
|
+
- Accomodated the inability to reverse Changesets when creating change summaries.
|
|
535
557
|
- fix lint issue
|
|
536
558
|
- begin api transition to changeset index rather than changeset Id
|
|
537
559
|
- Use ecef location calculated for projected iModels
|
|
538
|
-
- Push refreshes access token if necessary.
|
|
560
|
+
- Push refreshes access token if necessary.
|
|
539
561
|
- Do not reuse briefcase ids in ReadWrite workflows when using the RPC interfaces (if the briefcase was not found in the local file system)
|
|
540
562
|
- Add missing SectionDrawing properties.
|
|
541
563
|
|
|
@@ -556,7 +578,7 @@ Fri, 02 Jul 2021 15:38:31 GMT
|
|
|
556
578
|
|
|
557
579
|
### Updates
|
|
558
580
|
|
|
559
|
-
- Update to @bentley/imodeljs-native@2.17.10
|
|
581
|
+
- Update to @bentley/imodeljs-native@2.17.10
|
|
560
582
|
|
|
561
583
|
## 2.17.0
|
|
562
584
|
Mon, 28 Jun 2021 16:20:11 GMT
|
|
@@ -822,8 +844,8 @@ Thu, 28 Jan 2021 13:39:27 GMT
|
|
|
822
844
|
|
|
823
845
|
- Changed storageType from azure to azure?sas=1 for getCommandArgs function
|
|
824
846
|
- Fix brep DataProps to/from flatbuffer to account for base64 string header.
|
|
825
|
-
- Element geometry creation by brep operations.
|
|
826
|
-
- Reinstated behavior when re-opening files read-write.
|
|
847
|
+
- Element geometry creation by brep operations.
|
|
848
|
+
- Reinstated behavior when re-opening files read-write.
|
|
827
849
|
- enhance BriefcaseManager and BriefcaseDb for edit commands
|
|
828
850
|
- Improve ElementGeometry documentation.
|
|
829
851
|
- Add a check to verify, and fix, the DbGuid in the iModel if it is different than the Guid in iModelHub.
|
|
@@ -1013,8 +1035,8 @@ Fri, 02 Oct 2020 18:03:32 GMT
|
|
|
1013
1035
|
### Updates
|
|
1014
1036
|
|
|
1015
1037
|
- Update to @bentley/imodeljs-native@2.7.4
|
|
1016
|
-
- Fixes to front end methods to pull, merge and push.
|
|
1017
|
-
- Setup IModelHost.startup() to use proxy servers if configured/available - this is valuable for debugging agents, backends and electron applications.
|
|
1038
|
+
- Fixes to front end methods to pull, merge and push.
|
|
1039
|
+
- Setup IModelHost.startup() to use proxy servers if configured/available - this is valuable for debugging agents, backends and electron applications.
|
|
1018
1040
|
- On iOS download in background
|
|
1019
1041
|
- Fix ios hang issue
|
|
1020
1042
|
- Modify queryModelRanges to handle non geometric model errors
|
|
@@ -1105,7 +1127,7 @@ Thu, 20 Aug 2020 20:57:09 GMT
|
|
|
1105
1127
|
### Updates
|
|
1106
1128
|
|
|
1107
1129
|
- Update to imodeljs-native 2.5.0
|
|
1108
|
-
- VSTS#419723: Accomodated "bad" checkpoints that may have serialized transactions preventing their use in ReadWrite cases.
|
|
1130
|
+
- VSTS#419723: Accomodated "bad" checkpoints that may have serialized transactions preventing their use in ReadWrite cases.
|
|
1109
1131
|
- Fix for a recursive exception while closing a briefcase
|
|
1110
1132
|
- Added mobile oidc client
|
|
1111
1133
|
- Remove special code handling for mobile.
|
|
@@ -1169,7 +1191,7 @@ Fri, 10 Jul 2020 17:23:14 GMT
|
|
|
1169
1191
|
- Changes to support imodel-bridge
|
|
1170
1192
|
- fix spelling mistakes in Device class
|
|
1171
1193
|
- Fix typo in comments
|
|
1172
|
-
- Setup BriefcaseDb.open() to allow profile and domain schema validation and upgrades.
|
|
1194
|
+
- Setup BriefcaseDb.open() to allow profile and domain schema validation and upgrades.
|
|
1173
1195
|
- disallow protected operations for missing schemas marked with SchemaHasBehavior custom attribute
|
|
1174
1196
|
|
|
1175
1197
|
## 2.2.1
|
|
@@ -1210,25 +1232,25 @@ Thu, 28 May 2020 22:48:59 GMT
|
|
|
1210
1232
|
- Update to imodeljs-native 2.1.0
|
|
1211
1233
|
- Support for finding an ExternalSourceAspect given scope, id, and kind/hash.
|
|
1212
1234
|
- ApplyChangeset perf tests updated
|
|
1213
|
-
- Fixed token expiry check for desktop authorization.
|
|
1235
|
+
- Fixed token expiry check for desktop authorization.
|
|
1214
1236
|
- Download ChangeSets in chunks
|
|
1215
1237
|
- (1) In xy region booleans, support curved edges; (2) ExportGraphicsMeshVisitor class
|
|
1216
1238
|
- Add ability to convert ExportGraphicsMesh to Polyface
|
|
1217
1239
|
- Fixed validation of Guids (ContextId, IModelId) cached within a briefcase.
|
|
1218
1240
|
- Moved iModelBridgeFwk to a separate package
|
|
1219
|
-
- Simplified logging for monitoring briefcase operations.
|
|
1241
|
+
- Simplified logging for monitoring briefcase operations.
|
|
1220
1242
|
- Fix transforms for creating and querying part instance geometry in world coordinate.
|
|
1221
1243
|
- Fix and improvement to performance tests
|
|
1222
1244
|
- Added support for schema XML import to iModelJs backend via the IModelDb.importSchemaStrings method.
|
|
1223
1245
|
- channel rules
|
|
1224
|
-
- Fixed logging usage when opening connections.
|
|
1246
|
+
- Fixed logging usage when opening connections.
|
|
1225
1247
|
|
|
1226
1248
|
## 2.0.0
|
|
1227
1249
|
Wed, 06 May 2020 13:17:49 GMT
|
|
1228
1250
|
|
|
1229
1251
|
### Updates
|
|
1230
1252
|
|
|
1231
|
-
- Fixed setup of UserInfo from browser clients, and more cleanups to AccessToken API.
|
|
1253
|
+
- Fixed setup of UserInfo from browser clients, and more cleanups to AccessToken API.
|
|
1232
1254
|
- Added RivisionUtility class for debug/testing
|
|
1233
1255
|
- node addon 2.0.18
|
|
1234
1256
|
- addon 2.0.25
|
|
@@ -1241,23 +1263,23 @@ Wed, 06 May 2020 13:17:49 GMT
|
|
|
1241
1263
|
- Performance tests for Applying Changesets
|
|
1242
1264
|
- `IModelHost.startup` is now async.
|
|
1243
1265
|
- `IModelHost.shutdown` is now async.
|
|
1244
|
-
- Refined checks for briefcase id, and fixed failing integration tests.
|
|
1266
|
+
- Refined checks for briefcase id, and fixed failing integration tests.
|
|
1245
1267
|
- Product Backlog Item 276268: Deleting the briefcase cache if the cache version is incorrect should not attempt to delete the root directory.
|
|
1246
1268
|
- Setup initialization of briefcase cache for offline workflows. (VSTS#286489)
|
|
1247
|
-
- Monitor progress of downloading briefcases, ability to cancel download of briefcases.
|
|
1269
|
+
- Monitor progress of downloading briefcases, ability to cancel download of briefcases.
|
|
1248
1270
|
- Move briefcase-specific events into BriefcaseIModelDb subclass
|
|
1249
1271
|
- Fixed param when calling logger so that it is a function as the logger expects
|
|
1250
|
-
- Setup a common cache locaton for iModel.js, with briefcases taking up a sub-folder.
|
|
1272
|
+
- Setup a common cache locaton for iModel.js, with briefcases taking up a sub-folder.
|
|
1251
1273
|
- Changed ChangeSets download API
|
|
1252
1274
|
- Added unlink for file handler
|
|
1253
1275
|
- Update UlasClient tests to send more detailed feature log data
|
|
1254
1276
|
- react to renaming of imodeljs-clients-backend to backend-itwin-client
|
|
1255
1277
|
- apply changeset performance tests with local datasets
|
|
1256
|
-
- BriefcaseManager.delete should work in offline scenarios.
|
|
1278
|
+
- BriefcaseManager.delete should work in offline scenarios.
|
|
1257
1279
|
- Remove deprecated members of SectionLocation and downgrade to alpha pending refactor.
|
|
1258
1280
|
- Support for progress/cancel from ios
|
|
1259
1281
|
- Remove deprecated ExportGraphics types etc for 2.0
|
|
1260
|
-
- Updated docs.
|
|
1282
|
+
- Updated docs.
|
|
1261
1283
|
- IModelDb.findByKey replaces IModelDb.find
|
|
1262
1284
|
- Include model extents with ViewStateProps for drawing views.
|
|
1263
1285
|
- Remove deprecated APIs; see NextVersion.md for details.
|
|
@@ -1278,29 +1300,29 @@ Wed, 06 May 2020 13:17:49 GMT
|
|
|
1278
1300
|
- Introduce the BriefcaseIModelDb class, make IModelDb abstract.
|
|
1279
1301
|
- Cleaned up unused async-s in BriefcaseManager
|
|
1280
1302
|
- Avoided casting of BriefcaseProps to IModelRpcProps.
|
|
1281
|
-
- Added NativeApp.deleteBriefcase, avoided authorization exceptions when offline.
|
|
1303
|
+
- Added NativeApp.deleteBriefcase, avoided authorization exceptions when offline.
|
|
1282
1304
|
- Move briefcase property from IModelDb --> BriefcaseIModelDb
|
|
1283
1305
|
- BriefcaseId is now an enum instead of a class
|
|
1284
1306
|
- Rename BriefcaseId --> ReservedBriefcaseId, introduce BriefcaseId type
|
|
1285
|
-
- VSTS#297017: Update cached briefcase information if changes were applied.
|
|
1286
|
-
- Refactored NativeApp API and RPC interfaces. This continues to be WIP.
|
|
1287
|
-
- Removed the call to simultaneously download and open the briefcase at the backend. This should be done in two separate steps henceforth. The download must be done with BriefcaseManager, and the open is now a synchronous call in BriefcaseDb.
|
|
1288
|
-
- Added DownloadBriefcaseOptions and OpenBriefcaseOptions as parameters to the download/open calls for a briefcase.
|
|
1307
|
+
- VSTS#297017: Update cached briefcase information if changes were applied.
|
|
1308
|
+
- Refactored NativeApp API and RPC interfaces. This continues to be WIP.
|
|
1309
|
+
- Removed the call to simultaneously download and open the briefcase at the backend. This should be done in two separate steps henceforth. The download must be done with BriefcaseManager, and the open is now a synchronous call in BriefcaseDb.
|
|
1310
|
+
- Added DownloadBriefcaseOptions and OpenBriefcaseOptions as parameters to the download/open calls for a briefcase.
|
|
1289
1311
|
- Removed BriefcaseDb.create
|
|
1290
|
-
- Setup ability to use NativeApp.openBriefcase() in offline scenarios.
|
|
1312
|
+
- Setup ability to use NativeApp.openBriefcase() in offline scenarios.
|
|
1291
1313
|
- fixed flaky test
|
|
1292
|
-
- VSTS#217447, 162382: Cleanups to implementation of downloading/opening/discovering briefcases in native applications (WIP).
|
|
1314
|
+
- VSTS#217447, 162382: Cleanups to implementation of downloading/opening/discovering briefcases in native applications (WIP).
|
|
1293
1315
|
- do not throw exception in NativeAppBackend.startup()
|
|
1294
|
-
- VSTS#296110: Setup a way to close briefcases when the native application is offline.
|
|
1316
|
+
- VSTS#296110: Setup a way to close briefcases when the native application is offline.
|
|
1295
1317
|
- Move concurrencyControl from IModelDb to BriefcaseIModelDb
|
|
1296
1318
|
- Renamed OIDC constructs for consistency; Removed SAML support.
|
|
1297
1319
|
- Add support for password-protecting snapshot iModels
|
|
1298
1320
|
- Fixed typo for ElementAspect perf tests
|
|
1299
|
-
- VSTS#217447, VSTS#162382: Reinstated option to open briefcases with SyncMode = PullOnly.
|
|
1321
|
+
- VSTS#217447, VSTS#162382: Reinstated option to open briefcases with SyncMode = PullOnly.
|
|
1300
1322
|
- Add purge dir method to iModelJsFs
|
|
1301
1323
|
- react to creation of new clients packages from imodeljs-clients
|
|
1302
1324
|
- ; substitute current date for feature usage without any set start/end dates
|
|
1303
|
-
- Removed deprecated utilities.
|
|
1325
|
+
- Removed deprecated utilities.
|
|
1304
1326
|
- enforce opening Snapshots readonly through StandaloneDb
|
|
1305
1327
|
- Remove the deprecated Entity.clone method
|
|
1306
1328
|
- Adjusted calls to some node addon changes (ECUtils removed)
|
|
@@ -1312,13 +1334,13 @@ Wed, 06 May 2020 13:17:49 GMT
|
|
|
1312
1334
|
- Add FileNameResolver class
|
|
1313
1335
|
- Move snapshot methods out of IModelDb and into new SnapshotIModelDb class.
|
|
1314
1336
|
- Add TemplateModelCloner to place instances of a template model
|
|
1315
|
-
- Renamed TestOidcClient and related constructs for consistency.
|
|
1337
|
+
- Renamed TestOidcClient and related constructs for consistency.
|
|
1316
1338
|
- Add IModelDb.tryPrepareStatement
|
|
1317
|
-
- Fixed usage logging.
|
|
1339
|
+
- Fixed usage logging.
|
|
1318
1340
|
- fix failing ulas tests due to invalid featureId
|
|
1319
1341
|
- update ULAS test logging & feedback
|
|
1320
1342
|
- Update UlasUtilities to support exception-throwing native functions
|
|
1321
|
-
- Use standalone briefcases for PullOnly cases.
|
|
1343
|
+
- Use standalone briefcases for PullOnly cases.
|
|
1322
1344
|
|
|
1323
1345
|
## 1.14.1
|
|
1324
1346
|
Wed, 22 Apr 2020 19:04:00 GMT
|
|
@@ -1333,7 +1355,7 @@ Tue, 31 Mar 2020 15:44:19 GMT
|
|
|
1333
1355
|
### Updates
|
|
1334
1356
|
|
|
1335
1357
|
- Update to addon 1.14.1
|
|
1336
|
-
- Fixed downloading of files using https/streaming to resolve when the filestream is closed instead of when the input stream is exhausted.
|
|
1358
|
+
- Fixed downloading of files using https/streaming to resolve when the filestream is closed instead of when the input stream is exhausted.
|
|
1337
1359
|
- Add handling for invalid predecessor ids to IModelTransformer
|
|
1338
1360
|
- Accomodate updated imodeljs-native ULAS functions
|
|
1339
1361
|
|
|
@@ -1348,7 +1370,7 @@ Wed, 12 Feb 2020 17:45:50 GMT
|
|
|
1348
1370
|
### Updates
|
|
1349
1371
|
|
|
1350
1372
|
- Fix IGeometry roundtripping issue through ECSql. Fix insert/update binary properties for Element Aspect.
|
|
1351
|
-
- Separated out routines to download and open briefcases.
|
|
1373
|
+
- Separated out routines to download and open briefcases.
|
|
1352
1374
|
- bulk mode
|
|
1353
1375
|
- Consolidated sign-in for integration tests
|
|
1354
1376
|
- bulkmode
|
|
@@ -1359,7 +1381,7 @@ Wed, 12 Feb 2020 17:45:50 GMT
|
|
|
1359
1381
|
- Add ViewDefinition.getAuxiliaryCoordinateSystemId and ViewDefinition.setAuxiliaryCoordinateSystemId methods
|
|
1360
1382
|
- Add SpatialLocationModel.insert
|
|
1361
1383
|
- Add optional isPlantProjection parameter to PhysicalModel.insert
|
|
1362
|
-
- VSTS#256133: Fixed issue with reopening connections if the backend crashes. Fixes to integration tests.
|
|
1384
|
+
- VSTS#256133: Fixed issue with reopening connections if the backend crashes. Fixes to integration tests.
|
|
1363
1385
|
- Better documentation of OidcDesktopClient
|
|
1364
1386
|
- Fixed changeset perf test by using another iModel on Hub
|
|
1365
1387
|
- Add ViewDetails to ViewDefinition.
|
|
@@ -1392,7 +1414,7 @@ Tue, 07 Jan 2020 19:44:01 GMT
|
|
|
1392
1414
|
- Allow events to be sent from backend to frontend
|
|
1393
1415
|
- Add tryGetInstance / tryGetInstanceProps methods to the Relationship class which return undefined rather than throwing an exception when a relationship is not found.
|
|
1394
1416
|
- Fix webpack for ios test that were failing due to new dependencies
|
|
1395
|
-
- VSTS#225894 - Allowed agents to bypass usage logging calls. These cause usage logging errors.
|
|
1417
|
+
- VSTS#225894 - Allowed agents to bypass usage logging calls. These cause usage logging errors.
|
|
1396
1418
|
- Add tryGetElement / tryGetElementProps which return undefined rather than throwing an exception when an element is not found.
|
|
1397
1419
|
- Add tryGetModel, tryGetModelProps, tryGetSubModel which return undefined instead of throwing exceptions when the model is not found.
|
|
1398
1420
|
|
|
@@ -1404,7 +1426,7 @@ Tue, 10 Dec 2019 18:08:56 GMT
|
|
|
1404
1426
|
- Updated to addon 9.1.3
|
|
1405
1427
|
- Added AliCloud tile cache service
|
|
1406
1428
|
- Added framework to run imodeljs-backend test on ios using appcenter
|
|
1407
|
-
- Setup OidcDesktopClient for Electron use cases.
|
|
1429
|
+
- Setup OidcDesktopClient for Electron use cases.
|
|
1408
1430
|
- fix warnings from static analysis
|
|
1409
1431
|
- Enabling testing code for updating LR aspects after fix in native side.
|
|
1410
1432
|
- Addressing typo in a couple of members, making them match the schema properly.
|
|
@@ -1460,9 +1482,9 @@ Mon, 30 Sep 2019 22:28:48 GMT
|
|
|
1460
1482
|
### Updates
|
|
1461
1483
|
|
|
1462
1484
|
- added support for blank IModelConnections
|
|
1463
|
-
- Setup a way to supply authorization through the backend for frontend requests.
|
|
1464
|
-
- Error log when downloading change sets should include iModelId for context.
|
|
1465
|
-
- Fixed the iModelHub client to properly dispose a file handle after upload to the iModelHub.
|
|
1485
|
+
- Setup a way to supply authorization through the backend for frontend requests.
|
|
1486
|
+
- Error log when downloading change sets should include iModelId for context.
|
|
1487
|
+
- Fixed the iModelHub client to properly dispose a file handle after upload to the iModelHub.
|
|
1466
1488
|
- Add IModelDb.Elements.hasSubModel
|
|
1467
1489
|
- Make ExternalSourceAspect.checksum optional
|
|
1468
1490
|
- Clear statement cache after schema import
|
|
@@ -1477,14 +1499,14 @@ Tue, 10 Sep 2019 12:09:49 GMT
|
|
|
1477
1499
|
|
|
1478
1500
|
### Updates
|
|
1479
1501
|
|
|
1480
|
-
- Setup a way to supply authorization through the backend for frontend requests.
|
|
1481
|
-
- Allow attaching change cache file before change summary extraction.
|
|
1482
|
-
- Added change summary test, and improved doc a little.
|
|
1502
|
+
- Setup a way to supply authorization through the backend for frontend requests.
|
|
1503
|
+
- Allow attaching change cache file before change summary extraction.
|
|
1504
|
+
- Added change summary test, and improved doc a little.
|
|
1483
1505
|
- Add minimum brep size option to IModelDb.exportGraphics
|
|
1484
1506
|
- FunctionalSchema.importSchema is now deprecated.
|
|
1485
1507
|
- Add support for GeometricModel.geometryGuid for detecting whether tiles for a model can be reused across versions
|
|
1486
1508
|
- Added performance logging for tile upload
|
|
1487
|
-
- IModelConnection.close() for read-only connections should not close the Db at the backend; Opening an iModel with SyncModel.PullAndPush() multiple times (without disposing it) must reuse the briefcase.
|
|
1509
|
+
- IModelConnection.close() for read-only connections should not close the Db at the backend; Opening an iModel with SyncModel.PullAndPush() multiple times (without disposing it) must reuse the briefcase.
|
|
1488
1510
|
- Add method to create view with camera
|
|
1489
1511
|
- Fixed misleading logging output in tile upload
|
|
1490
1512
|
|
|
@@ -1494,14 +1516,14 @@ Tue, 13 Aug 2019 20:25:53 GMT
|
|
|
1494
1516
|
### Updates
|
|
1495
1517
|
|
|
1496
1518
|
- Allow custom tile cache services.
|
|
1497
|
-
- Always acquire a briefcase when creating a new backend instance for PullAndPush workflows.
|
|
1498
|
-
- Added Change Summary integration test, and fixed documentation.
|
|
1519
|
+
- Always acquire a briefcase when creating a new backend instance for PullAndPush workflows.
|
|
1520
|
+
- Added Change Summary integration test, and fixed documentation.
|
|
1499
1521
|
- Trial code for tile upload errors
|
|
1500
1522
|
- Fixed changeset performance tests
|
|
1501
1523
|
- Tile upload logging.
|
|
1502
1524
|
- Mark ExportGraphics API as public
|
|
1503
1525
|
- Support for gzip compression of tiles
|
|
1504
|
-
- Fixed issue with opening iModels with names that are invalid on Unix or Windows.
|
|
1526
|
+
- Fixed issue with opening iModels with names that are invalid on Unix or Windows.
|
|
1505
1527
|
- Add IModelDb.isSnapshot
|
|
1506
1528
|
- Tile upload error catching.
|
|
1507
1529
|
- Azure tile upload logging
|
|
@@ -1513,7 +1535,7 @@ Wed, 24 Jul 2019 11:47:26 GMT
|
|
|
1513
1535
|
### Updates
|
|
1514
1536
|
|
|
1515
1537
|
- Added option to restrict tile cache URLs by client IP address.
|
|
1516
|
-
- Apply change sets at the backend in a non-blocking worker thread.
|
|
1538
|
+
- Apply change sets at the backend in a non-blocking worker thread.
|
|
1517
1539
|
- Add ElementAspect handler methods
|
|
1518
1540
|
- When deleting a parent element, make sure there are onDelete/onDeleted callbacks for child elements
|
|
1519
1541
|
- Add support for linework to IModelDb.exportGraphics
|
|
@@ -1531,19 +1553,19 @@ Mon, 01 Jul 2019 19:04:29 GMT
|
|
|
1531
1553
|
|
|
1532
1554
|
### Updates
|
|
1533
1555
|
|
|
1534
|
-
- Open fixes when briefcase requires merges.
|
|
1556
|
+
- Open fixes when briefcase requires merges.
|
|
1535
1557
|
- Catch tile upload errors.
|
|
1536
|
-
- Setting up briefcase is always from an older checkpoint.
|
|
1558
|
+
- Setting up briefcase is always from an older checkpoint.
|
|
1537
1559
|
- Add materialId, subCategory to ExportGraphicsInfo
|
|
1538
|
-
- Fix crash in getViewThumbnail for odd number of bytes
|
|
1560
|
+
- Fix crash in getViewThumbnail for odd number of bytes
|
|
1539
1561
|
- Adding relationship class for GraphicalElement3dRepresentsElement.
|
|
1540
1562
|
- Initial implementation of the LinearReferencing typescript domain
|
|
1541
1563
|
- Adding domain classes for all relatinships in the LinearReferencing schema.
|
|
1542
1564
|
- Exporting relationships module.
|
|
1543
|
-
- Fixes to opening iModel-s ReadWrite from mutiple IModelConnection-s.
|
|
1544
|
-
- Fixed issues with deleting briefcases if there were errors with preparing briefcases.
|
|
1565
|
+
- Fixes to opening iModel-s ReadWrite from mutiple IModelConnection-s.
|
|
1566
|
+
- Fixed issues with deleting briefcases if there were errors with preparing briefcases.
|
|
1545
1567
|
- Add a new method `forceLoadSchemas` to `IModelJsNative.ECPresentationManager`.
|
|
1546
|
-
- Introduced AsyncMutex - a utility to run async blocks of code in sequence.
|
|
1568
|
+
- Introduced AsyncMutex - a utility to run async blocks of code in sequence.
|
|
1547
1569
|
- Properly document ModelSelector.models and CategorySelector.categories as Id64String arrays
|
|
1548
1570
|
- Made `insertElement` not return Id64.invalid, throws error instead
|
|
1549
1571
|
- Update to TypeScript 3.5
|
|
@@ -1554,7 +1576,7 @@ Mon, 03 Jun 2019 18:09:39 GMT
|
|
|
1554
1576
|
|
|
1555
1577
|
### Updates
|
|
1556
1578
|
|
|
1557
|
-
- Migrated agent applications to the newer client
|
|
1579
|
+
- Migrated agent applications to the newer client
|
|
1558
1580
|
- RPC system now accepts only basic values (primitives, "interface" objects, and binary).
|
|
1559
1581
|
- Switched from iModelHub Project API to Context API
|
|
1560
1582
|
- Fix bug in IModelDb.createSnapshotFromSeed
|
|
@@ -1602,12 +1624,12 @@ Mon, 13 May 2019 15:52:05 GMT
|
|
|
1602
1624
|
- Cleanup old imodelbank references
|
|
1603
1625
|
- Add InformationRecordModel.insert, GroupModel.insert
|
|
1604
1626
|
- Introduce LoggerCategory enum to advertise logger categories used by this package.
|
|
1605
|
-
- Limited maximum cache size of the backend PromiseMemoizer.
|
|
1627
|
+
- Limited maximum cache size of the backend PromiseMemoizer.
|
|
1606
1628
|
- Missing dependency on node-report
|
|
1607
|
-
- Fixed memoization problem that caused an endless stream of 404 NotFound errors.
|
|
1629
|
+
- Fixed memoization problem that caused an endless stream of 404 NotFound errors.
|
|
1608
1630
|
- Reinstated old version of OidcAgentClient
|
|
1609
|
-
- Unauthorized open requests should cause a more obvious error.
|
|
1610
|
-
- Improved performance logging, especially of IModelDb open operations; ChangeSets are merged one-by-one to prevent hogging the event loop.
|
|
1631
|
+
- Unauthorized open requests should cause a more obvious error.
|
|
1632
|
+
- Improved performance logging, especially of IModelDb open operations; ChangeSets are merged one-by-one to prevent hogging the event loop.
|
|
1611
1633
|
- Memoization fix when opening iModels in shared, read-only mode .
|
|
1612
1634
|
- Fixed setup of application version.
|
|
1613
1635
|
- Updated Element CRUD perf tests
|
|
@@ -1617,7 +1639,7 @@ Mon, 13 May 2019 15:52:05 GMT
|
|
|
1617
1639
|
- Remove ElementPropertyFormatter, IModelDb.getElementPropertiesForDisplay (use presentation rules instead)
|
|
1618
1640
|
- Remove StandaloneIModelRpcImpl
|
|
1619
1641
|
- Fix for Render Gradient.Symb test
|
|
1620
|
-
- Setup a generic context for tracking client requests, and made various related enhancements to logging, usage tracking and authorization.
|
|
1642
|
+
- Setup a generic context for tracking client requests, and made various related enhancements to logging, usage tracking and authorization.
|
|
1621
1643
|
- Add IModelDb.createSnapshot/openSnapshot/closeSnapshot, deprecate IModelDb.createStandalone/openStandalone/closeStandalone
|
|
1622
1644
|
- Moved IModelJsExpressServer class into a new package (@itwin/express-server).
|
|
1623
1645
|
- Simplified tile caching IModelHost config and removed dev flags. Allow
|
|
@@ -1644,7 +1666,7 @@ Wed, 06 Mar 2019 15:41:22 GMT
|
|
|
1644
1666
|
- Changes package.json to include api-extractor and adds api-extractor.json
|
|
1645
1667
|
- Use new buildIModelJsBuild script
|
|
1646
1668
|
- AxisAlignedBox and ElementAlignedBox are now typed to Range3d rather than classes
|
|
1647
|
-
- Moved AzureFileHandler, IOSAzureFileHandler, UrlFileHandler and the iModelHub tests to the imodeljs-clients-backend package. This removes the dependency of imodeljs-clients on the "fs" module, and turns it into a browser only package.
|
|
1669
|
+
- Moved AzureFileHandler, IOSAzureFileHandler, UrlFileHandler and the iModelHub tests to the imodeljs-clients-backend package. This removes the dependency of imodeljs-clients on the "fs" module, and turns it into a browser only package.
|
|
1648
1670
|
- Clone methods are no longer generic
|
|
1649
1671
|
- Remove unneeded typedoc plugin dependency
|
|
1650
1672
|
- Added spatial <-> cartographic methods that check/use the geographic coordinate system before using ecef location.
|
|
@@ -1689,8 +1711,8 @@ Mon, 14 Jan 2019 23:09:10 GMT
|
|
|
1689
1711
|
|
|
1690
1712
|
### Updates
|
|
1691
1713
|
|
|
1692
|
-
- More logging of HTTP requests, and enabled use of fiddler for backend diagnostics.
|
|
1693
|
-
- Removed IModelDb's cache of accessToken. For long running operations like AutoPush, the user must explicitly supply an IAccessTokenManager to keep the token current.
|
|
1714
|
+
- More logging of HTTP requests, and enabled use of fiddler for backend diagnostics.
|
|
1715
|
+
- Removed IModelDb's cache of accessToken. For long running operations like AutoPush, the user must explicitly supply an IAccessTokenManager to keep the token current.
|
|
1694
1716
|
- Renamed RequestProxy->RequestHost. Allowed applications to configure proxy server with HTTPS_PROXY env.
|
|
1695
1717
|
- Add backend TextureAPI and accompanying test
|
|
1696
1718
|
|
|
@@ -1795,7 +1817,7 @@ Mon, 03 Dec 2018 18:52:58 GMT
|
|
|
1795
1817
|
|
|
1796
1818
|
### Updates
|
|
1797
1819
|
|
|
1798
|
-
- More information logged from BriefcaseManager.\nFixed deletion/cleanup of invalid briefcases.\nAdded OIDC support for simpleviewtest application.
|
|
1820
|
+
- More information logged from BriefcaseManager.\nFixed deletion/cleanup of invalid briefcases.\nAdded OIDC support for simpleviewtest application.
|
|
1799
1821
|
- Add ElementRefersToElements.insert
|
|
1800
1822
|
- Fixed front end integration tests.
|
|
1801
1823
|
- Document the intended purpose of IModelJsExpressServer within a deployment environment.
|
|
@@ -1864,11 +1886,11 @@ Thu, 08 Nov 2018 17:59:20 GMT
|
|
|
1864
1886
|
|
|
1865
1887
|
- Fix JSON representation of DisplayStyle.
|
|
1866
1888
|
- Add IModelImporter as a base class for utility methods needed by all importers
|
|
1867
|
-
- Removed assertion when deleting a memoized open call.
|
|
1889
|
+
- Removed assertion when deleting a memoized open call.
|
|
1868
1890
|
- Add more methods to IModelImporter
|
|
1869
1891
|
- Fix snapping test
|
|
1870
1892
|
- OIDC related enhancments (WIP).
|
|
1871
|
-
- Re-enabled several backend integration tests.
|
|
1893
|
+
- Re-enabled several backend integration tests.
|
|
1872
1894
|
- Refactor analysis-importer to use IModelImporter
|
|
1873
1895
|
- Updated to TypeScript 3.1
|
|
1874
1896
|
|
|
@@ -2,7 +2,7 @@ import { CloudStorageContainerDescriptor, CloudStorageContainerUrl, CloudStorage
|
|
|
2
2
|
import { CloudStorageService, CloudStorageUploadOptions } from "./CloudStorageBackend";
|
|
3
3
|
/**
|
|
4
4
|
* @beta
|
|
5
|
-
* @deprecated in 3.x.
|
|
5
|
+
* @deprecated in 3.x. Use `@itwin/object-storage-oss` instead, see https://github.com/iTwin/object-storage for more details.
|
|
6
6
|
*/
|
|
7
7
|
export interface AliCloudStorageServiceCredentials {
|
|
8
8
|
region: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AliCloudStorageService.js","sourceRoot":"","sources":["../../src/AliCloudStorageService.ts"],"names":[],"mappings":"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","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { PassThrough, Readable } from \"stream\";\r\nimport * as zlib from \"zlib\";\r\nimport { BentleyStatus } from \"@itwin/core-bentley\";\r\nimport { CloudStorageContainerDescriptor, CloudStorageContainerUrl, CloudStorageProvider, IModelError } from \"@itwin/core-common\";\r\nimport { CloudStorageService, CloudStorageUploadOptions } from \"./CloudStorageBackend\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/**\r\n * @beta\r\n * @deprecated in 3.x.\r\n */\r\nexport interface AliCloudStorageServiceCredentials {\r\n region: string;\r\n accessKeyId: string;\r\n accessKeySecret: string;\r\n}\r\n\r\ndeclare class OSS {\r\n constructor(params: AliCloudStorageServiceCredentials)\r\n public useBucket(name: string): void;\r\n public signatureUrl(name: string, policy: OSS.SignatureUrlOptions): string;\r\n public list(params: { marker: string, \"max-keys\": number }, arg2: {}): Promise<{ objects?: Array<{ name: string }> }>;\r\n public putBucket(name: string): Promise<void>;\r\n public putBucketCORS(name: string, params: Array<{ allowedOrigin: string, allowedMethod: string[], allowedHeader: string }>): Promise<void>;\r\n public putStream(name: string, source: Readable, options: OSS.PutStreamOptions): Promise<void>;\r\n}\r\n\r\ndeclare namespace OSS { // eslint-disable-line no-redeclare\r\n interface SignatureUrlOptions {\r\n expires: number;\r\n }\r\n\r\n interface PutStreamOptions {\r\n mime: string;\r\n headers: { [index: string]: string };\r\n }\r\n}\r\n\r\n/**\r\n * @beta\r\n * @deprecated in 3.x. Use `@itwin/object-storage-oss` instead, see https://github.com/iTwin/object-storage for more details.\r\n */\r\nexport class AliCloudStorageService extends CloudStorageService {\r\n private _client: OSS;\r\n\r\n public id = CloudStorageProvider.AliCloud;\r\n\r\n public constructor(credentials: AliCloudStorageServiceCredentials) {\r\n super();\r\n\r\n this._client = new OSS(credentials);\r\n }\r\n\r\n public obtainContainerUrl(id: CloudStorageContainerDescriptor, expiry: Date, _clientIp?: string): CloudStorageContainerUrl {\r\n const now = new Date().getTime();\r\n\r\n const policy: OSS.SignatureUrlOptions = {\r\n expires: expiry.getTime() - now,\r\n };\r\n\r\n this._client.useBucket(id.name);\r\n\r\n if (undefined === id.resource)\r\n throw new IModelError(BentleyStatus.ERROR, \"Attribute 'resource' on CloudStorageContainerDescriptor object is undefined.\");\r\n\r\n const url: CloudStorageContainerUrl = {\r\n descriptor: this.makeDescriptor(id),\r\n valid: 0,\r\n expires: expiry.getTime(),\r\n url: this._client.signatureUrl(id.resource, policy),\r\n bound: true,\r\n };\r\n\r\n return url;\r\n }\r\n\r\n public async listContainer(name: string, marker: string, count: number): Promise<string[]> {\r\n this._client.useBucket(name);\r\n const query = await this._client.list({ marker, \"max-keys\": count }, {});\r\n return query.objects ? query.objects.map((o) => o.name) : [];\r\n }\r\n\r\n public async upload(container: string, name: string, data: Uint8Array, options?: CloudStorageUploadOptions): Promise<string> {\r\n await this._client.putBucket(container);\r\n await this._client.putBucketCORS(container, [{ allowedOrigin: \"*\", allowedMethod: [\"GET\", \"POST\", \"PUT\", \"DELETE\", \"HEAD\"], allowedHeader: \"*\" }]);\r\n this._client.useBucket(container);\r\n\r\n const dataStream = new PassThrough();\r\n dataStream.end(data);\r\n\r\n let source: Readable;\r\n\r\n const putOptions = {\r\n mime: (options && options.type) ? options.type : \"application/octet-stream\",\r\n headers: {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n \"Cache-Control\": (options && options.cacheControl) ? options.cacheControl : \"private, max-age=31536000, immutable\",\r\n },\r\n } as OSS.PutStreamOptions;\r\n\r\n if (options && options.contentEncoding === \"gzip\") {\r\n (putOptions.headers as any)[\"Content-Encoding\"] = options.contentEncoding;\r\n const compressor = zlib.createGzip();\r\n source = dataStream.pipe(compressor);\r\n } else {\r\n source = dataStream;\r\n }\r\n await this._client.putStream(name, source, putOptions);\r\n return \"\";\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"AliCloudStorageService.js","sourceRoot":"","sources":["../../src/AliCloudStorageService.ts"],"names":[],"mappings":"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","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nimport { PassThrough, Readable } from \"stream\";\r\nimport * as zlib from \"zlib\";\r\nimport { BentleyStatus } from \"@itwin/core-bentley\";\r\nimport { CloudStorageContainerDescriptor, CloudStorageContainerUrl, CloudStorageProvider, IModelError } from \"@itwin/core-common\";\r\nimport { CloudStorageService, CloudStorageUploadOptions } from \"./CloudStorageBackend\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/**\r\n * @beta\r\n * @deprecated in 3.x. Use `@itwin/object-storage-oss` instead, see https://github.com/iTwin/object-storage for more details.\r\n */\r\nexport interface AliCloudStorageServiceCredentials {\r\n region: string;\r\n accessKeyId: string;\r\n accessKeySecret: string;\r\n}\r\n\r\ndeclare class OSS {\r\n constructor(params: AliCloudStorageServiceCredentials)\r\n public useBucket(name: string): void;\r\n public signatureUrl(name: string, policy: OSS.SignatureUrlOptions): string;\r\n public list(params: { marker: string, \"max-keys\": number }, arg2: {}): Promise<{ objects?: Array<{ name: string }> }>;\r\n public putBucket(name: string): Promise<void>;\r\n public putBucketCORS(name: string, params: Array<{ allowedOrigin: string, allowedMethod: string[], allowedHeader: string }>): Promise<void>;\r\n public putStream(name: string, source: Readable, options: OSS.PutStreamOptions): Promise<void>;\r\n}\r\n\r\ndeclare namespace OSS { // eslint-disable-line no-redeclare\r\n interface SignatureUrlOptions {\r\n expires: number;\r\n }\r\n\r\n interface PutStreamOptions {\r\n mime: string;\r\n headers: { [index: string]: string };\r\n }\r\n}\r\n\r\n/**\r\n * @beta\r\n * @deprecated in 3.x. Use `@itwin/object-storage-oss` instead, see https://github.com/iTwin/object-storage for more details.\r\n */\r\nexport class AliCloudStorageService extends CloudStorageService {\r\n private _client: OSS;\r\n\r\n public id = CloudStorageProvider.AliCloud;\r\n\r\n public constructor(credentials: AliCloudStorageServiceCredentials) {\r\n super();\r\n\r\n this._client = new OSS(credentials);\r\n }\r\n\r\n public obtainContainerUrl(id: CloudStorageContainerDescriptor, expiry: Date, _clientIp?: string): CloudStorageContainerUrl {\r\n const now = new Date().getTime();\r\n\r\n const policy: OSS.SignatureUrlOptions = {\r\n expires: expiry.getTime() - now,\r\n };\r\n\r\n this._client.useBucket(id.name);\r\n\r\n if (undefined === id.resource)\r\n throw new IModelError(BentleyStatus.ERROR, \"Attribute 'resource' on CloudStorageContainerDescriptor object is undefined.\");\r\n\r\n const url: CloudStorageContainerUrl = {\r\n descriptor: this.makeDescriptor(id),\r\n valid: 0,\r\n expires: expiry.getTime(),\r\n url: this._client.signatureUrl(id.resource, policy),\r\n bound: true,\r\n };\r\n\r\n return url;\r\n }\r\n\r\n public async listContainer(name: string, marker: string, count: number): Promise<string[]> {\r\n this._client.useBucket(name);\r\n const query = await this._client.list({ marker, \"max-keys\": count }, {});\r\n return query.objects ? query.objects.map((o) => o.name) : [];\r\n }\r\n\r\n public async upload(container: string, name: string, data: Uint8Array, options?: CloudStorageUploadOptions): Promise<string> {\r\n await this._client.putBucket(container);\r\n await this._client.putBucketCORS(container, [{ allowedOrigin: \"*\", allowedMethod: [\"GET\", \"POST\", \"PUT\", \"DELETE\", \"HEAD\"], allowedHeader: \"*\" }]);\r\n this._client.useBucket(container);\r\n\r\n const dataStream = new PassThrough();\r\n dataStream.end(data);\r\n\r\n let source: Readable;\r\n\r\n const putOptions = {\r\n mime: (options && options.type) ? options.type : \"application/octet-stream\",\r\n headers: {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n \"Cache-Control\": (options && options.cacheControl) ? options.cacheControl : \"private, max-age=31536000, immutable\",\r\n },\r\n } as OSS.PutStreamOptions;\r\n\r\n if (options && options.contentEncoding === \"gzip\") {\r\n (putOptions.headers as any)[\"Content-Encoding\"] = options.contentEncoding;\r\n const compressor = zlib.createGzip();\r\n source = dataStream.pipe(compressor);\r\n } else {\r\n source = dataStream;\r\n }\r\n await this._client.putStream(name, source, putOptions);\r\n return \"\";\r\n }\r\n}\r\n"]}
|
|
@@ -140,7 +140,7 @@ export interface DownloadChangesetRangeArg extends ChangesetRangeArg, DownloadPr
|
|
|
140
140
|
targetDir: LocalDirName;
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
143
|
-
* @deprecated in 3.x.
|
|
143
|
+
* @deprecated in 3.x. Use [[DownloadRequest]].
|
|
144
144
|
* @internal
|
|
145
145
|
*/
|
|
146
146
|
export declare type CheckpointArg = DownloadRequest;
|
|
@@ -190,8 +190,8 @@ export interface BackendHubAccess {
|
|
|
190
190
|
/** get an array of the briefcases assigned to a user. */
|
|
191
191
|
getMyBriefcaseIds: (arg: IModelIdArg) => Promise<BriefcaseId[]>;
|
|
192
192
|
/**
|
|
193
|
-
*
|
|
194
|
-
* @deprecated in 3.x.
|
|
193
|
+
* Download a v1 checkpoint
|
|
194
|
+
* @deprecated in 3.x. V1 checkpoints are deprecated. Download V2 checkpoint using [[V2CheckpointManager.downloadCheckpoint]].
|
|
195
195
|
* @internal
|
|
196
196
|
*/
|
|
197
197
|
downloadV1Checkpoint: (arg: CheckpointArg) => Promise<ChangesetIndexAndId>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackendHubAccess.js","sourceRoot":"","sources":["../../src/BackendHubAccess.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2F;AAC3F,oDAG4B;AAI5B;;GAEG;AACH,IAAY,SASX;AATD,WAAY,SAAS;IACnB,gCAAgC;IAChC,yCAAQ,CAAA;IACR,mJAAmJ;IACnJ,6CAAU,CAAA;IACV;;OAEG;IACH,mDAAa,CAAA;AACf,CAAC,EATW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QASpB;AAED;;EAEE;AACF,MAAa,YAAa,SAAQ,yBAAW;IAC3C;IACE,mCAAmC;IACnB,WAAwB;IACxC,sCAAsC;IACtB,cAAsB,EACtC,GAA6D;QAE7D,KAAK,CAAC,8BAAe,CAAC,2BAA2B,EAAE,GAAG,CAAC,CAAC;QALxC,gBAAW,GAAX,WAAW,CAAa;QAExB,mBAAc,GAAd,cAAc,CAAQ;IAIxC,CAAC;CACF;AAVD,oCAUC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module HubAccess\r\n */\r\n\r\nimport { AccessToken, GuidString, Id64String, IModelHubStatus } from \"@itwin/core-bentley\";\r\nimport {\r\n BriefcaseId, ChangesetFileProps, ChangesetIdWithIndex, ChangesetIndex, ChangesetIndexAndId, ChangesetIndexOrId, ChangesetProps, ChangesetRange,\r\n IModelError, IModelVersion, LocalDirName, LocalFileName,\r\n} from \"@itwin/core-common\";\r\nimport { CheckpointProps, DownloadRequest, ProgressFunction } from \"./CheckpointManager\";\r\nimport { TokenArg } from \"./IModelDb\";\r\n\r\n/** The state of a lock.\r\n * @public\r\n */\r\nexport enum LockState {\r\n /** The element is not locked */\r\n None = 0,\r\n /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */\r\n Shared = 1,\r\n /** A Lock that permits modifications to an element and blocks other users from making modifications to it.\r\n * Holding an exclusive lock on an \"owner\" (a model or a parent element), implicitly exclusively locks all its members.\r\n */\r\n Exclusive = 2,\r\n}\r\n\r\n/** Exception thrown if lock cannot be acquired.\r\n * @beta\r\n*/\r\nexport class LockConflict extends IModelError {\r\n public constructor(\r\n /** Id of Briefcase holding lock */\r\n public readonly briefcaseId: BriefcaseId,\r\n /** Alias of Briefcase holding lock */\r\n public readonly briefcaseAlias: string,\r\n msg: \"shared lock is held\" | \"exclusive lock is already held\"\r\n ) {\r\n super(IModelHubStatus.LockOwnedByAnotherBriefcase, msg);\r\n }\r\n}\r\n\r\n/**\r\n * The properties to access a V2 checkpoint through a daemon.\r\n * @internal\r\n */\r\nexport interface V2CheckpointAccessProps {\r\n /** blob store account name. */\r\n readonly accountName: string;\r\n /** AccessToken that grants access to the container. */\r\n readonly sasToken: AccessToken;\r\n /** The name of the iModel's blob store container holding all checkpoints. */\r\n readonly containerId: string;\r\n /** The name of the virtual file within the container, used for the checkpoint */\r\n readonly dbName: string;\r\n /** blob storage module: e.g. \"azure\", \"google\", \"aws\". May also include URI style parameters. */\r\n readonly storageType: string;\r\n}\r\n\r\n/** @internal */\r\nexport type LockMap = Map<Id64String, LockState>;\r\n\r\n/**\r\n * The properties of a lock that may be obtained from a lock server.\r\n * @beta\r\n */\r\nexport interface LockProps {\r\n /** The elementId for the lock */\r\n readonly id: Id64String;\r\n /** the lock state */\r\n readonly state: LockState;\r\n}\r\n\r\n/**\r\n * Argument for cancelling and tracking download progress.\r\n * @beta\r\n */\r\nexport interface DownloadProgressArg {\r\n /** Called to show progress during a download. If this function returns non-zero, the download is aborted. */\r\n progressCallback?: ProgressFunction;\r\n}\r\n\r\n/**\r\n * Argument for methods that must supply an iTwinId\r\n * @public\r\n */\r\nexport interface ITwinIdArg {\r\n readonly iTwinId: GuidString;\r\n}\r\n\r\n/**\r\n * Argument for methods that must supply an IModelId\r\n * @public\r\n */\r\nexport interface IModelIdArg extends TokenArg {\r\n readonly iModelId: GuidString;\r\n}\r\n\r\n/**\r\n * Argument for acquiring a new BriefcaseId\r\n * @public\r\n */\r\nexport interface AcquireNewBriefcaseIdArg extends IModelIdArg {\r\n /** A string to be reported to other users to identify this briefcase, for example in the case of conflicts or lock collisions. */\r\n readonly briefcaseAlias?: string;\r\n}\r\n\r\n/** Argument for methods that must supply an IModel name and iTwinId\r\n * @public\r\n */\r\nexport interface IModelNameArg extends TokenArg, ITwinIdArg {\r\n readonly iModelName: string;\r\n}\r\n\r\n/** Argument for methods that must supply an IModelId and a BriefcaseId\r\n * @public\r\n */\r\nexport interface BriefcaseIdArg extends IModelIdArg {\r\n readonly briefcaseId: BriefcaseId;\r\n}\r\n\r\n/** Argument for methods that must supply a briefcaseId and a changeset\r\n * @public\r\n */\r\nexport interface BriefcaseDbArg extends BriefcaseIdArg {\r\n readonly changeset: ChangesetIdWithIndex;\r\n}\r\n\r\n/** Argument for methods that must supply an IModelId and a changeset\r\n * @public\r\n */\r\nexport interface ChangesetArg extends IModelIdArg {\r\n readonly changeset: ChangesetIndexOrId;\r\n}\r\n\r\n/** Argument for downloading a changeset.\r\n * @beta\r\n */\r\nexport interface DownloadChangesetArg extends ChangesetArg, DownloadProgressArg {\r\n /** Directory where the changeset should be downloaded. */\r\n targetDir: LocalDirName;\r\n}\r\n\r\n/** @internal */\r\nexport interface ChangesetIndexArg extends IModelIdArg {\r\n readonly changeset: ChangesetIdWithIndex;\r\n}\r\n\r\n/** Argument for methods that must supply an IModelId and a range of Changesets.\r\n * @public\r\n */\r\nexport interface ChangesetRangeArg extends IModelIdArg {\r\n /** the range of changesets desired. If is undefined, *all* changesets are returned. */\r\n readonly range?: ChangesetRange;\r\n}\r\n\r\n/** Argument for downloading a changeset range.\r\n * @beta\r\n */\r\nexport interface DownloadChangesetRangeArg extends ChangesetRangeArg, DownloadProgressArg {\r\n /** Directory where the changesets should be downloaded. */\r\n targetDir: LocalDirName;\r\n}\r\n\r\n/**\r\n * @deprecated in 3.x.\r\n * @internal\r\n */\r\nexport type CheckpointArg = DownloadRequest;\r\n\r\n/**\r\n * Arguments to create a new iModel in iModelHub\r\n * @public\r\n */\r\nexport interface CreateNewIModelProps extends IModelNameArg {\r\n readonly description?: string;\r\n readonly version0?: LocalFileName;\r\n readonly noLocks?: true;\r\n}\r\n\r\n/**\r\n * Methods for accessing services of IModelHub from an iTwin.js backend.\r\n * Generally direct access to these methods should not be required, since higher-level apis are provided.\r\n * @beta\r\n */\r\nexport interface BackendHubAccess {\r\n /** Download all the changesets in the specified range. */\r\n downloadChangesets: (arg: DownloadChangesetRangeArg) => Promise<ChangesetFileProps[]>;\r\n /** Download a single changeset. */\r\n downloadChangeset: (arg: DownloadChangesetArg) => Promise<ChangesetFileProps>;\r\n /** Query the changeset properties given a ChangesetIndex */\r\n queryChangeset: (arg: ChangesetArg) => Promise<ChangesetProps>;\r\n /** Query an array of changeset properties given a range of ChangesetIndexes */\r\n queryChangesets: (arg: ChangesetRangeArg) => Promise<ChangesetProps[]>;\r\n /** Push a changeset to iModelHub. Returns the newly pushed changeset's index */\r\n pushChangeset: (arg: IModelIdArg & { changesetProps: ChangesetFileProps }) => Promise<ChangesetIndex>;\r\n /** Get the ChangesetProps of the most recent changeset */\r\n getLatestChangeset: (arg: IModelIdArg) => Promise<ChangesetProps>;\r\n /** Get the ChangesetProps for an IModelVersion */\r\n getChangesetFromVersion: (arg: IModelIdArg & { version: IModelVersion }) => Promise<ChangesetProps>;\r\n /** Get the ChangesetProps for a named version */\r\n getChangesetFromNamedVersion: (arg: IModelIdArg & { versionName: string }) => Promise<ChangesetProps>;\r\n\r\n /** Acquire a new briefcaseId for the supplied iModelId\r\n * @note usually there should only be one briefcase per iModel per user.\r\n */\r\n acquireNewBriefcaseId: (arg: AcquireNewBriefcaseIdArg) => Promise<BriefcaseId>;\r\n /** Release a briefcaseId. After this call it is illegal to generate changesets for the released briefcaseId. */\r\n releaseBriefcase: (arg: BriefcaseIdArg) => Promise<void>;\r\n\r\n /** get an array of the briefcases assigned to a user. */\r\n getMyBriefcaseIds: (arg: IModelIdArg) => Promise<BriefcaseId[]>;\r\n\r\n /**\r\n * download a v1 checkpoint\r\n * @deprecated in 3.x.\r\n * @internal\r\n */\r\n downloadV1Checkpoint: (arg: CheckpointArg) => Promise<ChangesetIndexAndId>; // eslint-disable-line deprecation/deprecation\r\n\r\n /**\r\n * Get the access props for a V2 checkpoint. Returns undefined if no V2 checkpoint exists.\r\n * @internal\r\n */\r\n queryV2Checkpoint: (arg: CheckpointProps) => Promise<V2CheckpointAccessProps | undefined>;\r\n\r\n /**\r\n * acquire one or more locks. Throws if unsuccessful. If *any* lock cannot be obtained, no locks are acquired\r\n * @internal\r\n */\r\n acquireLocks: (arg: BriefcaseDbArg, locks: LockMap) => Promise<void>;\r\n\r\n /**\r\n * Get the list of all held locks for a briefcase. This can be very expensive and is currently used only for tests.\r\n * @internal\r\n */\r\n queryAllLocks: (arg: BriefcaseDbArg) => Promise<LockProps[]>;\r\n\r\n /**\r\n * Release all currently held locks\r\n * @internal\r\n */\r\n releaseAllLocks: (arg: BriefcaseDbArg) => Promise<void>;\r\n\r\n /** Get the iModelId of an iModel by name. Undefined if no iModel with that name exists. */\r\n queryIModelByName: (arg: IModelNameArg) => Promise<GuidString | undefined>;\r\n\r\n /** create a new iModel. Returns the Guid of the newly created iModel */\r\n createNewIModel: (arg: CreateNewIModelProps) => Promise<GuidString>;\r\n\r\n /** delete an iModel */\r\n deleteIModel: (arg: IModelIdArg & ITwinIdArg) => Promise<void>;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"BackendHubAccess.js","sourceRoot":"","sources":["../../src/BackendHubAccess.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2F;AAC3F,oDAG4B;AAI5B;;GAEG;AACH,IAAY,SASX;AATD,WAAY,SAAS;IACnB,gCAAgC;IAChC,yCAAQ,CAAA;IACR,mJAAmJ;IACnJ,6CAAU,CAAA;IACV;;OAEG;IACH,mDAAa,CAAA;AACf,CAAC,EATW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QASpB;AAED;;EAEE;AACF,MAAa,YAAa,SAAQ,yBAAW;IAC3C;IACE,mCAAmC;IACnB,WAAwB;IACxC,sCAAsC;IACtB,cAAsB,EACtC,GAA6D;QAE7D,KAAK,CAAC,8BAAe,CAAC,2BAA2B,EAAE,GAAG,CAAC,CAAC;QALxC,gBAAW,GAAX,WAAW,CAAa;QAExB,mBAAc,GAAd,cAAc,CAAQ;IAIxC,CAAC;CACF;AAVD,oCAUC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module HubAccess\r\n */\r\n\r\nimport { AccessToken, GuidString, Id64String, IModelHubStatus } from \"@itwin/core-bentley\";\r\nimport {\r\n BriefcaseId, ChangesetFileProps, ChangesetIdWithIndex, ChangesetIndex, ChangesetIndexAndId, ChangesetIndexOrId, ChangesetProps, ChangesetRange,\r\n IModelError, IModelVersion, LocalDirName, LocalFileName,\r\n} from \"@itwin/core-common\";\r\nimport { CheckpointProps, DownloadRequest, ProgressFunction } from \"./CheckpointManager\";\r\nimport { TokenArg } from \"./IModelDb\";\r\n\r\n/** The state of a lock.\r\n * @public\r\n */\r\nexport enum LockState {\r\n /** The element is not locked */\r\n None = 0,\r\n /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */\r\n Shared = 1,\r\n /** A Lock that permits modifications to an element and blocks other users from making modifications to it.\r\n * Holding an exclusive lock on an \"owner\" (a model or a parent element), implicitly exclusively locks all its members.\r\n */\r\n Exclusive = 2,\r\n}\r\n\r\n/** Exception thrown if lock cannot be acquired.\r\n * @beta\r\n*/\r\nexport class LockConflict extends IModelError {\r\n public constructor(\r\n /** Id of Briefcase holding lock */\r\n public readonly briefcaseId: BriefcaseId,\r\n /** Alias of Briefcase holding lock */\r\n public readonly briefcaseAlias: string,\r\n msg: \"shared lock is held\" | \"exclusive lock is already held\"\r\n ) {\r\n super(IModelHubStatus.LockOwnedByAnotherBriefcase, msg);\r\n }\r\n}\r\n\r\n/**\r\n * The properties to access a V2 checkpoint through a daemon.\r\n * @internal\r\n */\r\nexport interface V2CheckpointAccessProps {\r\n /** blob store account name. */\r\n readonly accountName: string;\r\n /** AccessToken that grants access to the container. */\r\n readonly sasToken: AccessToken;\r\n /** The name of the iModel's blob store container holding all checkpoints. */\r\n readonly containerId: string;\r\n /** The name of the virtual file within the container, used for the checkpoint */\r\n readonly dbName: string;\r\n /** blob storage module: e.g. \"azure\", \"google\", \"aws\". May also include URI style parameters. */\r\n readonly storageType: string;\r\n}\r\n\r\n/** @internal */\r\nexport type LockMap = Map<Id64String, LockState>;\r\n\r\n/**\r\n * The properties of a lock that may be obtained from a lock server.\r\n * @beta\r\n */\r\nexport interface LockProps {\r\n /** The elementId for the lock */\r\n readonly id: Id64String;\r\n /** the lock state */\r\n readonly state: LockState;\r\n}\r\n\r\n/**\r\n * Argument for cancelling and tracking download progress.\r\n * @beta\r\n */\r\nexport interface DownloadProgressArg {\r\n /** Called to show progress during a download. If this function returns non-zero, the download is aborted. */\r\n progressCallback?: ProgressFunction;\r\n}\r\n\r\n/**\r\n * Argument for methods that must supply an iTwinId\r\n * @public\r\n */\r\nexport interface ITwinIdArg {\r\n readonly iTwinId: GuidString;\r\n}\r\n\r\n/**\r\n * Argument for methods that must supply an IModelId\r\n * @public\r\n */\r\nexport interface IModelIdArg extends TokenArg {\r\n readonly iModelId: GuidString;\r\n}\r\n\r\n/**\r\n * Argument for acquiring a new BriefcaseId\r\n * @public\r\n */\r\nexport interface AcquireNewBriefcaseIdArg extends IModelIdArg {\r\n /** A string to be reported to other users to identify this briefcase, for example in the case of conflicts or lock collisions. */\r\n readonly briefcaseAlias?: string;\r\n}\r\n\r\n/** Argument for methods that must supply an IModel name and iTwinId\r\n * @public\r\n */\r\nexport interface IModelNameArg extends TokenArg, ITwinIdArg {\r\n readonly iModelName: string;\r\n}\r\n\r\n/** Argument for methods that must supply an IModelId and a BriefcaseId\r\n * @public\r\n */\r\nexport interface BriefcaseIdArg extends IModelIdArg {\r\n readonly briefcaseId: BriefcaseId;\r\n}\r\n\r\n/** Argument for methods that must supply a briefcaseId and a changeset\r\n * @public\r\n */\r\nexport interface BriefcaseDbArg extends BriefcaseIdArg {\r\n readonly changeset: ChangesetIdWithIndex;\r\n}\r\n\r\n/** Argument for methods that must supply an IModelId and a changeset\r\n * @public\r\n */\r\nexport interface ChangesetArg extends IModelIdArg {\r\n readonly changeset: ChangesetIndexOrId;\r\n}\r\n\r\n/** Argument for downloading a changeset.\r\n * @beta\r\n */\r\nexport interface DownloadChangesetArg extends ChangesetArg, DownloadProgressArg {\r\n /** Directory where the changeset should be downloaded. */\r\n targetDir: LocalDirName;\r\n}\r\n\r\n/** @internal */\r\nexport interface ChangesetIndexArg extends IModelIdArg {\r\n readonly changeset: ChangesetIdWithIndex;\r\n}\r\n\r\n/** Argument for methods that must supply an IModelId and a range of Changesets.\r\n * @public\r\n */\r\nexport interface ChangesetRangeArg extends IModelIdArg {\r\n /** the range of changesets desired. If is undefined, *all* changesets are returned. */\r\n readonly range?: ChangesetRange;\r\n}\r\n\r\n/** Argument for downloading a changeset range.\r\n * @beta\r\n */\r\nexport interface DownloadChangesetRangeArg extends ChangesetRangeArg, DownloadProgressArg {\r\n /** Directory where the changesets should be downloaded. */\r\n targetDir: LocalDirName;\r\n}\r\n\r\n/**\r\n * @deprecated in 3.x. Use [[DownloadRequest]].\r\n * @internal\r\n */\r\nexport type CheckpointArg = DownloadRequest;\r\n\r\n/**\r\n * Arguments to create a new iModel in iModelHub\r\n * @public\r\n */\r\nexport interface CreateNewIModelProps extends IModelNameArg {\r\n readonly description?: string;\r\n readonly version0?: LocalFileName;\r\n readonly noLocks?: true;\r\n}\r\n\r\n/**\r\n * Methods for accessing services of IModelHub from an iTwin.js backend.\r\n * Generally direct access to these methods should not be required, since higher-level apis are provided.\r\n * @beta\r\n */\r\nexport interface BackendHubAccess {\r\n /** Download all the changesets in the specified range. */\r\n downloadChangesets: (arg: DownloadChangesetRangeArg) => Promise<ChangesetFileProps[]>;\r\n /** Download a single changeset. */\r\n downloadChangeset: (arg: DownloadChangesetArg) => Promise<ChangesetFileProps>;\r\n /** Query the changeset properties given a ChangesetIndex */\r\n queryChangeset: (arg: ChangesetArg) => Promise<ChangesetProps>;\r\n /** Query an array of changeset properties given a range of ChangesetIndexes */\r\n queryChangesets: (arg: ChangesetRangeArg) => Promise<ChangesetProps[]>;\r\n /** Push a changeset to iModelHub. Returns the newly pushed changeset's index */\r\n pushChangeset: (arg: IModelIdArg & { changesetProps: ChangesetFileProps }) => Promise<ChangesetIndex>;\r\n /** Get the ChangesetProps of the most recent changeset */\r\n getLatestChangeset: (arg: IModelIdArg) => Promise<ChangesetProps>;\r\n /** Get the ChangesetProps for an IModelVersion */\r\n getChangesetFromVersion: (arg: IModelIdArg & { version: IModelVersion }) => Promise<ChangesetProps>;\r\n /** Get the ChangesetProps for a named version */\r\n getChangesetFromNamedVersion: (arg: IModelIdArg & { versionName: string }) => Promise<ChangesetProps>;\r\n\r\n /** Acquire a new briefcaseId for the supplied iModelId\r\n * @note usually there should only be one briefcase per iModel per user.\r\n */\r\n acquireNewBriefcaseId: (arg: AcquireNewBriefcaseIdArg) => Promise<BriefcaseId>;\r\n /** Release a briefcaseId. After this call it is illegal to generate changesets for the released briefcaseId. */\r\n releaseBriefcase: (arg: BriefcaseIdArg) => Promise<void>;\r\n\r\n /** get an array of the briefcases assigned to a user. */\r\n getMyBriefcaseIds: (arg: IModelIdArg) => Promise<BriefcaseId[]>;\r\n\r\n /**\r\n * Download a v1 checkpoint\r\n * @deprecated in 3.x. V1 checkpoints are deprecated. Download V2 checkpoint using [[V2CheckpointManager.downloadCheckpoint]].\r\n * @internal\r\n */\r\n downloadV1Checkpoint: (arg: CheckpointArg) => Promise<ChangesetIndexAndId>; // eslint-disable-line deprecation/deprecation\r\n\r\n /**\r\n * Get the access props for a V2 checkpoint. Returns undefined if no V2 checkpoint exists.\r\n * @internal\r\n */\r\n queryV2Checkpoint: (arg: CheckpointProps) => Promise<V2CheckpointAccessProps | undefined>;\r\n\r\n /**\r\n * acquire one or more locks. Throws if unsuccessful. If *any* lock cannot be obtained, no locks are acquired\r\n * @internal\r\n */\r\n acquireLocks: (arg: BriefcaseDbArg, locks: LockMap) => Promise<void>;\r\n\r\n /**\r\n * Get the list of all held locks for a briefcase. This can be very expensive and is currently used only for tests.\r\n * @internal\r\n */\r\n queryAllLocks: (arg: BriefcaseDbArg) => Promise<LockProps[]>;\r\n\r\n /**\r\n * Release all currently held locks\r\n * @internal\r\n */\r\n releaseAllLocks: (arg: BriefcaseDbArg) => Promise<void>;\r\n\r\n /** Get the iModelId of an iModel by name. Undefined if no iModel with that name exists. */\r\n queryIModelByName: (arg: IModelNameArg) => Promise<GuidString | undefined>;\r\n\r\n /** create a new iModel. Returns the Guid of the newly created iModel */\r\n createNewIModel: (arg: CreateNewIModelProps) => Promise<GuidString>;\r\n\r\n /** delete an iModel */\r\n deleteIModel: (arg: IModelIdArg & ITwinIdArg) => Promise<void>;\r\n}\r\n"]}
|