@itwin/core-backend 5.0.0-dev.8 → 5.0.0-dev.83
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 +53 -1
- package/lib/cjs/BackendHubAccess.d.ts +13 -22
- package/lib/cjs/BackendHubAccess.d.ts.map +1 -1
- package/lib/cjs/BackendHubAccess.js +2 -0
- package/lib/cjs/BackendHubAccess.js.map +1 -1
- package/lib/cjs/BisCoreSchema.d.ts.map +1 -1
- package/lib/cjs/BisCoreSchema.js +2 -0
- package/lib/cjs/BisCoreSchema.js.map +1 -1
- package/lib/cjs/BlobContainerService.d.ts +4 -4
- package/lib/cjs/BlobContainerService.d.ts.map +1 -1
- package/lib/cjs/BlobContainerService.js.map +1 -1
- package/lib/cjs/BriefcaseManager.d.ts +10 -0
- package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
- package/lib/cjs/BriefcaseManager.js +63 -20
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/Category.js +6 -1
- package/lib/cjs/Category.js.map +1 -1
- package/lib/cjs/ChangeSummaryManager.d.ts.map +1 -1
- package/lib/cjs/ChangeSummaryManager.js +90 -22
- package/lib/cjs/ChangeSummaryManager.js.map +1 -1
- package/lib/cjs/ChangedElementsDb.d.ts +3 -3
- package/lib/cjs/ChangedElementsDb.d.ts.map +1 -1
- package/lib/cjs/ChangedElementsDb.js +8 -7
- package/lib/cjs/ChangedElementsDb.js.map +1 -1
- package/lib/cjs/ChangesetECAdaptor.d.ts +3 -3
- package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
- package/lib/cjs/ChangesetECAdaptor.js +31 -19
- package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
- package/lib/cjs/CheckpointManager.d.ts.map +1 -1
- package/lib/cjs/CheckpointManager.js +15 -12
- package/lib/cjs/CheckpointManager.js.map +1 -1
- package/lib/cjs/ClassRegistry.js +8 -18
- package/lib/cjs/ClassRegistry.js.map +1 -1
- package/lib/cjs/CloudSqlite.d.ts +2 -1
- package/lib/cjs/CloudSqlite.d.ts.map +1 -1
- package/lib/cjs/CloudSqlite.js +15 -8
- package/lib/cjs/CloudSqlite.js.map +1 -1
- package/lib/cjs/CodeService.d.ts +2 -0
- package/lib/cjs/CodeService.d.ts.map +1 -1
- package/lib/cjs/CodeService.js +4 -0
- package/lib/cjs/CodeService.js.map +1 -1
- package/lib/cjs/CodeSpecs.js +3 -2
- package/lib/cjs/CodeSpecs.js.map +1 -1
- package/lib/cjs/CustomViewState3dCreator.js +7 -6
- package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
- package/lib/cjs/DevTools.js +16 -16
- package/lib/cjs/DevTools.js.map +1 -1
- package/lib/cjs/DisplayStyle.js +2 -0
- package/lib/cjs/DisplayStyle.js.map +1 -1
- package/lib/cjs/ECDb.d.ts +16 -9
- package/lib/cjs/ECDb.d.ts.map +1 -1
- package/lib/cjs/ECDb.js +34 -9
- package/lib/cjs/ECDb.js.map +1 -1
- package/lib/cjs/ECSchemaXmlContext.js +1 -0
- package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
- package/lib/cjs/ECSqlStatement.d.ts +4 -2
- package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
- package/lib/cjs/ECSqlStatement.js +13 -4
- package/lib/cjs/ECSqlStatement.js.map +1 -1
- package/lib/cjs/Element.d.ts +1 -9
- package/lib/cjs/Element.d.ts.map +1 -1
- package/lib/cjs/Element.js +122 -31
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/ElementAspect.js +24 -0
- package/lib/cjs/ElementAspect.js.map +1 -1
- package/lib/cjs/ElementTreeWalker.js +13 -12
- package/lib/cjs/ElementTreeWalker.js.map +1 -1
- package/lib/cjs/Entity.d.ts +18 -0
- package/lib/cjs/Entity.d.ts.map +1 -1
- package/lib/cjs/Entity.js +53 -16
- package/lib/cjs/Entity.js.map +1 -1
- package/lib/cjs/ExportGraphics.js +4 -0
- package/lib/cjs/ExportGraphics.js.map +1 -1
- package/lib/cjs/ExternalSource.js +22 -0
- package/lib/cjs/ExternalSource.js.map +1 -1
- package/lib/cjs/FontFile.d.ts +68 -0
- package/lib/cjs/FontFile.d.ts.map +1 -0
- package/lib/cjs/FontFile.js +36 -0
- package/lib/cjs/FontFile.js.map +1 -0
- package/lib/cjs/GeoCoordConfig.js +8 -8
- package/lib/cjs/GeoCoordConfig.js.map +1 -1
- package/lib/cjs/GeometrySummary.js +6 -3
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/HubMock.d.ts +1 -1
- package/lib/cjs/HubMock.d.ts.map +1 -1
- package/lib/cjs/HubMock.js +9 -5
- package/lib/cjs/HubMock.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +127 -17
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +225 -83
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelDbFonts.d.ts +54 -0
- package/lib/cjs/IModelDbFonts.d.ts.map +1 -0
- package/lib/cjs/IModelDbFonts.js +11 -0
- package/lib/cjs/IModelDbFonts.js.map +1 -0
- package/lib/cjs/IModelElementCloneContext.d.ts +2 -0
- package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
- package/lib/cjs/IModelElementCloneContext.js +11 -1
- package/lib/cjs/IModelElementCloneContext.js.map +1 -1
- package/lib/cjs/IModelHost.d.ts +14 -14
- package/lib/cjs/IModelHost.d.ts.map +1 -1
- package/lib/cjs/IModelHost.js +75 -42
- package/lib/cjs/IModelHost.js.map +1 -1
- package/lib/cjs/IModelJsFs.d.ts.map +1 -1
- package/lib/cjs/IModelJsFs.js +17 -1
- package/lib/cjs/IModelJsFs.js.map +1 -1
- package/lib/cjs/ImageSourceConversion.d.ts +49 -0
- package/lib/cjs/ImageSourceConversion.d.ts.map +1 -0
- package/lib/cjs/ImageSourceConversion.js +37 -0
- package/lib/cjs/ImageSourceConversion.js.map +1 -0
- package/lib/cjs/IpcHost.d.ts.map +1 -1
- package/lib/cjs/IpcHost.js +17 -12
- package/lib/cjs/IpcHost.js.map +1 -1
- package/lib/cjs/LocalHub.js +8 -2
- package/lib/cjs/LocalHub.js.map +1 -1
- package/lib/cjs/LocalhostIpcHost.js +5 -6
- package/lib/cjs/LocalhostIpcHost.js.map +1 -1
- package/lib/cjs/Material.js +40 -0
- package/lib/cjs/Material.js.map +1 -1
- package/lib/cjs/Model.d.ts +1 -1
- package/lib/cjs/Model.d.ts.map +1 -1
- package/lib/cjs/Model.js +27 -2
- package/lib/cjs/Model.js.map +1 -1
- package/lib/cjs/NativeAppStorage.js +5 -3
- package/lib/cjs/NativeAppStorage.js.map +1 -1
- package/lib/cjs/NativeHost.js +6 -3
- package/lib/cjs/NativeHost.js.map +1 -1
- package/lib/cjs/NavigationRelationship.js +25 -25
- package/lib/cjs/NavigationRelationship.js.map +1 -1
- package/lib/cjs/PromiseMemoizer.d.ts +2 -3
- package/lib/cjs/PromiseMemoizer.d.ts.map +1 -1
- package/lib/cjs/PromiseMemoizer.js +12 -5
- package/lib/cjs/PromiseMemoizer.js.map +1 -1
- package/lib/cjs/PropertyStore.js +1 -4
- package/lib/cjs/PropertyStore.js.map +1 -1
- package/lib/cjs/Relationship.d.ts.map +1 -1
- package/lib/cjs/Relationship.js +13 -1
- package/lib/cjs/Relationship.js.map +1 -1
- package/lib/cjs/SQLiteDb.d.ts +6 -4
- package/lib/cjs/SQLiteDb.d.ts.map +1 -1
- package/lib/cjs/SQLiteDb.js +74 -15
- package/lib/cjs/SQLiteDb.js.map +1 -1
- package/lib/cjs/Schema.d.ts +6 -0
- package/lib/cjs/Schema.d.ts.map +1 -1
- package/lib/cjs/Schema.js +12 -1
- package/lib/cjs/Schema.js.map +1 -1
- package/lib/cjs/SchemaSync.js +1 -4
- package/lib/cjs/SchemaSync.js.map +1 -1
- package/lib/cjs/SheetIndex.js +6 -0
- package/lib/cjs/SheetIndex.js.map +1 -1
- package/lib/cjs/SqliteChangesetReader.d.ts +11 -3
- package/lib/cjs/SqliteChangesetReader.d.ts.map +1 -1
- package/lib/cjs/SqliteChangesetReader.js +21 -5
- package/lib/cjs/SqliteChangesetReader.js.map +1 -1
- package/lib/cjs/SqliteStatement.d.ts +4 -2
- package/lib/cjs/SqliteStatement.d.ts.map +1 -1
- package/lib/cjs/SqliteStatement.js +13 -1
- package/lib/cjs/SqliteStatement.js.map +1 -1
- package/lib/cjs/TextAnnotationLayout.d.ts +6 -3
- package/lib/cjs/TextAnnotationLayout.d.ts.map +1 -1
- package/lib/cjs/TextAnnotationLayout.js +30 -12
- package/lib/cjs/TextAnnotationLayout.js.map +1 -1
- package/lib/cjs/Texture.js +3 -0
- package/lib/cjs/Texture.js.map +1 -1
- package/lib/cjs/TileStorage.js +6 -1
- package/lib/cjs/TileStorage.js.map +1 -1
- package/lib/cjs/TxnManager.d.ts +55 -4
- package/lib/cjs/TxnManager.d.ts.map +1 -1
- package/lib/cjs/TxnManager.js +230 -58
- package/lib/cjs/TxnManager.js.map +1 -1
- package/lib/cjs/ViewDefinition.d.ts +6 -6
- package/lib/cjs/ViewDefinition.d.ts.map +1 -1
- package/lib/cjs/ViewDefinition.js +81 -26
- package/lib/cjs/ViewDefinition.js.map +1 -1
- package/lib/cjs/ViewStateHydrator.d.ts +0 -1
- package/lib/cjs/ViewStateHydrator.d.ts.map +1 -1
- package/lib/cjs/ViewStateHydrator.js +1 -11
- package/lib/cjs/ViewStateHydrator.js.map +1 -1
- package/lib/cjs/ViewStore.js +3 -1
- package/lib/cjs/ViewStore.js.map +1 -1
- package/lib/cjs/core-backend.d.ts +7 -0
- package/lib/cjs/core-backend.d.ts.map +1 -1
- package/lib/cjs/core-backend.js +7 -0
- package/lib/cjs/core-backend.js.map +1 -1
- package/lib/cjs/domains/FunctionalElements.js +1 -1
- package/lib/cjs/domains/FunctionalElements.js.map +1 -1
- package/lib/cjs/internal/ChangesetConflictArgs.d.ts +40 -2
- package/lib/cjs/internal/ChangesetConflictArgs.d.ts.map +1 -1
- package/lib/cjs/internal/ChangesetConflictArgs.js +101 -0
- package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
- package/lib/cjs/internal/ChannelAdmin.d.ts +1 -1
- package/lib/cjs/internal/ChannelAdmin.d.ts.map +1 -1
- package/lib/cjs/internal/ChannelAdmin.js +25 -16
- package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
- package/lib/cjs/internal/FontFileImpl.d.ts +34 -0
- package/lib/cjs/internal/FontFileImpl.d.ts.map +1 -0
- package/lib/cjs/internal/FontFileImpl.js +143 -0
- package/lib/cjs/internal/FontFileImpl.js.map +1 -0
- package/lib/cjs/internal/IModelDbFontsImpl.d.ts +7 -0
- package/lib/cjs/internal/IModelDbFontsImpl.d.ts.map +1 -0
- package/lib/cjs/internal/IModelDbFontsImpl.js +186 -0
- package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -0
- package/lib/cjs/internal/NoLocks.js +2 -5
- package/lib/cjs/internal/NoLocks.js.map +1 -1
- package/lib/cjs/internal/ServerBasedLocks.d.ts.map +1 -1
- package/lib/cjs/internal/ServerBasedLocks.js +6 -6
- package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
- package/lib/cjs/internal/Symbols.d.ts +7 -0
- package/lib/cjs/internal/Symbols.d.ts.map +1 -1
- package/lib/cjs/internal/Symbols.js +8 -1
- package/lib/cjs/internal/Symbols.js.map +1 -1
- package/lib/cjs/internal/workspace/SettingsImpl.js +6 -9
- package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/SettingsSchemasImpl.js +8 -12
- package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/WorkspaceImpl.js +22 -17
- package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
- package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js +1 -4
- package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
- package/lib/cjs/rpc/multipart.d.ts.map +1 -1
- package/lib/cjs/rpc/multipart.js +2 -1
- package/lib/cjs/rpc/multipart.js.map +1 -1
- package/lib/cjs/rpc/tracing.js +2 -2
- package/lib/cjs/rpc/tracing.js.map +1 -1
- package/lib/cjs/rpc/web/request.d.ts.map +1 -1
- package/lib/cjs/rpc/web/request.js +2 -1
- package/lib/cjs/rpc/web/request.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +4 -2
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.js +5 -3
- package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +4 -3
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/package.json +29 -26
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,58 @@
|
|
|
1
1
|
# Change Log - @itwin/core-backend
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 11 Mar 2025 15:27:53 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 4.10.10
|
|
6
|
+
Tue, 11 Mar 2025 15:25:11 GMT
|
|
7
|
+
|
|
8
|
+
### Updates
|
|
9
|
+
|
|
10
|
+
- Resolves CVE-2025-27152
|
|
11
|
+
|
|
12
|
+
## 4.10.9
|
|
13
|
+
Tue, 11 Mar 2025 05:17:33 GMT
|
|
14
|
+
|
|
15
|
+
_Version update only_
|
|
16
|
+
|
|
17
|
+
## 4.10.8
|
|
18
|
+
Thu, 06 Mar 2025 14:13:37 GMT
|
|
19
|
+
|
|
20
|
+
_Version update only_
|
|
21
|
+
|
|
22
|
+
## 4.10.7
|
|
23
|
+
Tue, 18 Feb 2025 17:27:03 GMT
|
|
24
|
+
|
|
25
|
+
### Updates
|
|
26
|
+
|
|
27
|
+
- Fix issue with concurrent query where it interrupt statement during prepare
|
|
28
|
+
|
|
29
|
+
## 4.10.6
|
|
30
|
+
Fri, 24 Jan 2025 08:02:40 GMT
|
|
31
|
+
|
|
32
|
+
_Version update only_
|
|
33
|
+
|
|
34
|
+
## 4.10.5
|
|
35
|
+
Tue, 21 Jan 2025 21:56:45 GMT
|
|
36
|
+
|
|
37
|
+
_Version update only_
|
|
38
|
+
|
|
39
|
+
## 4.10.4
|
|
40
|
+
Mon, 13 Jan 2025 14:06:43 GMT
|
|
41
|
+
|
|
42
|
+
_Version update only_
|
|
43
|
+
|
|
44
|
+
## 4.10.3
|
|
45
|
+
Mon, 06 Jan 2025 14:00:13 GMT
|
|
46
|
+
|
|
47
|
+
_Version update only_
|
|
48
|
+
|
|
49
|
+
## 4.10.2
|
|
50
|
+
Thu, 21 Nov 2024 15:22:20 GMT
|
|
51
|
+
|
|
52
|
+
### Updates
|
|
53
|
+
|
|
54
|
+
- Add test for BE_SQLITE_CONSTRAINT_UNIQUE
|
|
55
|
+
- Fix CloudSqlite.DbAccess.createBlobContainer always overwriting containerType with "property-store".
|
|
4
56
|
|
|
5
57
|
## 4.10.1
|
|
6
58
|
Thu, 14 Nov 2024 18:11:00 GMT
|
|
@@ -35,7 +35,7 @@ export declare enum LockState {
|
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* The properties to access a V2 checkpoint through a daemon.
|
|
38
|
-
* @
|
|
38
|
+
* @public
|
|
39
39
|
*/
|
|
40
40
|
export interface V2CheckpointAccessProps {
|
|
41
41
|
/** blob store account name. */
|
|
@@ -49,11 +49,14 @@ export interface V2CheckpointAccessProps {
|
|
|
49
49
|
/** blob storage module: e.g. "azure", "google", "aws". May also include URI style parameters. */
|
|
50
50
|
readonly storageType: string;
|
|
51
51
|
}
|
|
52
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Maps element Ids to their corresponding [LockState]($common)s.
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
53
56
|
export type LockMap = Map<Id64String, CommonLockState>;
|
|
54
57
|
/**
|
|
55
58
|
* The properties of a lock that may be obtained from a lock server.
|
|
56
|
-
* @
|
|
59
|
+
* @public
|
|
57
60
|
*/
|
|
58
61
|
export interface LockProps {
|
|
59
62
|
/** The elementId for the lock */
|
|
@@ -63,7 +66,7 @@ export interface LockProps {
|
|
|
63
66
|
}
|
|
64
67
|
/**
|
|
65
68
|
* Argument for cancelling and tracking download progress.
|
|
66
|
-
* @
|
|
69
|
+
* @public
|
|
67
70
|
*/
|
|
68
71
|
export interface DownloadProgressArg {
|
|
69
72
|
/** Called to show progress during a download. If this function returns non-zero, the download is aborted. */
|
|
@@ -116,7 +119,7 @@ export interface ChangesetArg extends IModelIdArg {
|
|
|
116
119
|
readonly changeset: ChangesetIndexOrId;
|
|
117
120
|
}
|
|
118
121
|
/** Argument for downloading a changeset.
|
|
119
|
-
* @
|
|
122
|
+
* @public
|
|
120
123
|
*/
|
|
121
124
|
export interface DownloadChangesetArg extends ChangesetArg, DownloadProgressArg {
|
|
122
125
|
/** Directory where the changeset should be downloaded. */
|
|
@@ -134,7 +137,7 @@ export interface ChangesetRangeArg extends IModelIdArg {
|
|
|
134
137
|
readonly range?: ChangesetRange;
|
|
135
138
|
}
|
|
136
139
|
/** Argument for downloading a changeset range.
|
|
137
|
-
* @
|
|
140
|
+
* @public
|
|
138
141
|
*/
|
|
139
142
|
export interface DownloadChangesetRangeArg extends ChangesetRangeArg, DownloadProgressArg {
|
|
140
143
|
/** Directory where the changesets should be downloaded. */
|
|
@@ -157,9 +160,7 @@ export interface CreateNewIModelProps extends IModelNameArg {
|
|
|
157
160
|
/**
|
|
158
161
|
* Methods for accessing services of IModelHub from an iTwin.js backend.
|
|
159
162
|
* Generally direct access to these methods should not be required, since higher-level apis are provided.
|
|
160
|
-
* @
|
|
161
|
-
* the implementation found here: https://github.com/iTwin/imodels-clients/blob/main/itwin-platform-access/imodels-access-backend/src/BackendIModelsAccess.ts
|
|
162
|
-
* @internal
|
|
163
|
+
* @public
|
|
163
164
|
*/
|
|
164
165
|
export interface BackendHubAccess {
|
|
165
166
|
/** Download all the changesets in the specified range. */
|
|
@@ -198,26 +199,16 @@ export interface BackendHubAccess {
|
|
|
198
199
|
* @internal
|
|
199
200
|
*/
|
|
200
201
|
downloadV1Checkpoint: (arg: CheckpointArg) => Promise<ChangesetIndexAndId>;
|
|
201
|
-
/**
|
|
202
|
-
* Get the access props for a V2 checkpoint. Returns undefined if no V2 checkpoint exists.
|
|
203
|
-
* @internal
|
|
204
|
-
*/
|
|
202
|
+
/** Get the access props for a V2 checkpoint. Returns undefined if no V2 checkpoint exists. */
|
|
205
203
|
queryV2Checkpoint: (arg: CheckpointProps) => Promise<V2CheckpointAccessProps | undefined>;
|
|
206
204
|
/**
|
|
207
205
|
* acquire one or more locks. Throws if unsuccessful. If *any* lock cannot be obtained, no locks are acquired
|
|
208
|
-
* @internal
|
|
209
206
|
* @throws ConflictingLocksError if one or more requested locks are held by other briefcases.
|
|
210
207
|
*/
|
|
211
208
|
acquireLocks: (arg: BriefcaseDbArg, locks: LockMap) => Promise<void>;
|
|
212
|
-
/**
|
|
213
|
-
* Get the list of all held locks for a briefcase. This can be very expensive and is currently used only for tests.
|
|
214
|
-
* @internal
|
|
215
|
-
*/
|
|
209
|
+
/** Get the list of all held locks for a briefcase. This can be very expensive and is currently used only for tests. */
|
|
216
210
|
queryAllLocks: (arg: BriefcaseDbArg) => Promise<LockProps[]>;
|
|
217
|
-
/**
|
|
218
|
-
* Release all currently held locks
|
|
219
|
-
* @internal
|
|
220
|
-
*/
|
|
211
|
+
/** Release all currently held locks */
|
|
221
212
|
releaseAllLocks: (arg: BriefcaseDbArg) => Promise<void>;
|
|
222
213
|
/** Get the iModelId of an iModel by name. Undefined if no iModel with that name exists. */
|
|
223
214
|
queryIModelByName: (arg: IModelNameArg) => Promise<GuidString | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackendHubAccess.d.ts","sourceRoot":"","s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AAe,EAAE,CAAC,GAAG,EAAE,oBAAoB,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAEpE,uBAAuB;IACvB,YAAY,EAAE,CAAC,GAAG,EAAE,WAAW,GAAG,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackendHubAccess.js","sourceRoot":"","sources":["../../src/BackendHubAccess.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2F;AAC3F,oDAI4B;AAI5B;;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;AAED;;;GAGG;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,yBAAT,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, ChangesetIndexAndId, ChangesetIndexOrId, ChangesetProps, ChangesetRange,\n LockState as CommonLockState, IModelError, IModelVersion,\n LocalDirName, LocalFileName,\n} from \"@itwin/core-common\";\nimport { CheckpointProps, DownloadRequest, 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 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 * @internal\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/** @internal */\nexport type LockMap = Map<Id64String, CommonLockState>;\n\n/**\n * The properties of a lock that may be obtained from a lock server.\n * @beta\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 * @beta\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}\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 * @beta\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 * @beta\n */\nexport interface DownloadChangesetRangeArg extends ChangesetRangeArg, DownloadProgressArg {\n /** Directory where the changesets should be downloaded. */\n targetDir: LocalDirName;\n}\n\n/**\n * @deprecated in 3.x. Use [[DownloadRequest]].\n * @internal\n */\nexport type CheckpointArg = DownloadRequest;\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 * @note This interface is implemented in another repository. Any changes made to this interface must be validated against\n * the implementation found here: https://github.com/iTwin/imodels-clients/blob/main/itwin-platform-access/imodels-access-backend/src/BackendIModelsAccess.ts\n * @internal\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 /**\n * Download a v1 checkpoint\n * @deprecated in 3.x. V1 checkpoints are deprecated. Download V2 checkpoint using [[V2CheckpointManager.downloadCheckpoint]].\n * @internal\n */\n downloadV1Checkpoint: (arg: CheckpointArg) => Promise<ChangesetIndexAndId>; // eslint-disable-line @typescript-eslint/no-deprecated\n\n /**\n * Get the access props for a V2 checkpoint. Returns undefined if no V2 checkpoint exists.\n * @internal\n */\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 * @internal\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 * Get the list of all held locks for a briefcase. This can be very expensive and is currently used only for tests.\n * @internal\n */\n queryAllLocks: (arg: BriefcaseDbArg) => Promise<LockProps[]>;\n\n /**\n * Release all currently held locks\n * @internal\n */\n releaseAllLocks: (arg: BriefcaseDbArg) => 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,sDAA2F;AAC3F,oDAI4B;AAI5B;;EAEE;AACF,MAAa,YAAa,SAAQ,yBAAW;IAGzB;IAEA;IAJlB;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;AAED;;;GAGG;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,yBAAT,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, ChangesetIndexAndId, ChangesetIndexOrId, ChangesetProps, ChangesetRange,\n LockState as CommonLockState, IModelError, IModelVersion,\n LocalDirName, LocalFileName,\n} from \"@itwin/core-common\";\nimport { CheckpointProps, DownloadRequest, 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 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}\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 * @deprecated in 3.x. Use [[DownloadRequest]].\n * @internal\n */\nexport type CheckpointArg = DownloadRequest;\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 /**\n * Download a v1 checkpoint\n * @deprecated in 3.x. V1 checkpoints are deprecated. Download V2 checkpoint using [[V2CheckpointManager.downloadCheckpoint]].\n * @internal\n */\n downloadV1Checkpoint: (arg: CheckpointArg) => Promise<ChangesetIndexAndId>; // eslint-disable-line @typescript-eslint/no-deprecated\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 /** 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 /** Get the iModelId of an iModel by name. Undefined if no iModel with that name exists. */\n queryIModelByName: (arg: IModelNameArg) => Promise<GuidString | undefined>;\n\n /** create a new iModel. Returns the Guid of the newly created iModel */\n createNewIModel: (arg: CreateNewIModelProps) => Promise<GuidString>;\n\n /** delete an iModel */\n deleteIModel: (arg: IModelIdArg & ITwinIdArg) => Promise<void>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BisCoreSchema.d.ts","sourceRoot":"","sources":["../../src/BisCoreSchema.ts"],"names":[],"mappings":"AAIA;;GAEG;AAYH,OAAO,EAAE,MAAM,EAAW,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"BisCoreSchema.d.ts","sourceRoot":"","sources":["../../src/BisCoreSchema.ts"],"names":[],"mappings":"AAIA;;GAEG;AAYH,OAAO,EAAE,MAAM,EAAW,MAAM,UAAU,CAAC;AAO3C;;;;;;;;;;GAUG;AACH,qBAAa,aAAc,SAAQ,MAAM;IACvC,WAA2B,UAAU,IAAI,MAAM,CAAsB;IACrE,WAAkB,cAAc,IAAI,MAAM,CAAsH;IAEhK,gBAAgB;WACF,cAAc;CAuB7B"}
|
package/lib/cjs/BisCoreSchema.js
CHANGED
|
@@ -23,6 +23,7 @@ const textureMod = require("./Texture");
|
|
|
23
23
|
const viewMod = require("./ViewDefinition");
|
|
24
24
|
const displayStyleMod = require("./DisplayStyle");
|
|
25
25
|
const annotationsMod = require("./TextAnnotationElement");
|
|
26
|
+
const sheetIndex = require("./SheetIndex");
|
|
26
27
|
/**
|
|
27
28
|
* The [BisCore]($docs/bis/guide/fundamentals/schemas-domains.md) schema is the lowest level Schema in an iModel.
|
|
28
29
|
*
|
|
@@ -56,6 +57,7 @@ class BisCoreSchema extends Schema_1.Schema {
|
|
|
56
57
|
externalSourceMod,
|
|
57
58
|
displayStyleMod,
|
|
58
59
|
annotationsMod,
|
|
60
|
+
sheetIndex
|
|
59
61
|
].forEach((module) => ClassRegistry_1.ClassRegistry.registerModule(module, this));
|
|
60
62
|
}
|
|
61
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BisCoreSchema.js","sourceRoot":"","sources":["../../src/BisCoreSchema.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,6BAA6B;AAC7B,0CAA0C;AAC1C,mDAAgD;AAChD,wCAAwC;AACxC,6CAA6C;AAC7C,sDAAsD;AACtD,6CAA8C;AAC9C,0CAA0C;AAC1C,oCAAoC;AACpC,0CAA0C;AAC1C,qCAA2C;AAC3C,wCAAwC;AACxC,4CAA4C;AAC5C,kDAAkD;AAClD,0DAA0D;
|
|
1
|
+
{"version":3,"file":"BisCoreSchema.js","sourceRoot":"","sources":["../../src/BisCoreSchema.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,6BAA6B;AAC7B,0CAA0C;AAC1C,mDAAgD;AAChD,wCAAwC;AACxC,6CAA6C;AAC7C,sDAAsD;AACtD,6CAA8C;AAC9C,0CAA0C;AAC1C,oCAAoC;AACpC,0CAA0C;AAC1C,qCAA2C;AAC3C,wCAAwC;AACxC,4CAA4C;AAC5C,kDAAkD;AAClD,0DAA0D;AAC1D,2CAA2C;AAE3C;;;;;;;;;;GAUG;AACH,MAAa,aAAc,SAAQ,eAAM;IAChC,MAAM,KAAc,UAAU,KAAa,OAAO,SAAS,CAAC,CAAC,CAAC;IAC9D,MAAM,KAAK,cAAc,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,2BAAc,CAAC,eAAe,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,aAAa,CAAC,UAAU,eAAe,CAAC,CAAC,CAAC,CAAC;IAEhK,gBAAgB;IACT,MAAM,CAAC,cAAc;QAC1B,IAAI,IAAI,KAAK,gBAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC;YACvD,OAAO;QAET,gBAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC1C,gBAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAE7B,sHAAsH;QACtH;YACE,UAAU;YACV,SAAS;YACT,QAAQ;YACR,WAAW;YACX,OAAO;YACP,OAAO;YACP,UAAU;YACV,WAAW;YACX,iBAAiB;YACjB,eAAe;YACf,cAAc;YACd,UAAU;SACX,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,6BAAa,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IACpE,CAAC;CACF;AA5BD,sCA4BC","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 Schema\n */\n\nimport * as path from \"path\";\nimport * as categoryMod from \"./Category\";\nimport { ClassRegistry } from \"./ClassRegistry\";\nimport * as elementMod from \"./Element\";\nimport * as aspectMod from \"./ElementAspect\";\nimport * as externalSourceMod from \"./ExternalSource\";\nimport { KnownLocations } from \"./IModelHost\";\nimport * as materialMod from \"./Material\";\nimport * as modelMod from \"./Model\";\nimport * as linkMod from \"./Relationship\";\nimport { Schema, Schemas } from \"./Schema\";\nimport * as textureMod from \"./Texture\";\nimport * as viewMod from \"./ViewDefinition\";\nimport * as displayStyleMod from \"./DisplayStyle\";\nimport * as annotationsMod from \"./TextAnnotationElement\";\nimport * as sheetIndex from \"./SheetIndex\";\n\n/**\n * The [BisCore]($docs/bis/guide/fundamentals/schemas-domains.md) schema is the lowest level Schema in an iModel.\n *\n * It is automatically registered when [[IModelHost.startup]] is called.\n *\n * Example:\n * ``` ts\n * [[include:BisCore.registerSchemaAndGetClass]]\n * ```\n * @public\n */\nexport class BisCoreSchema extends Schema {\n public static override get schemaName(): string { return \"BisCore\"; }\n public static get schemaFilePath(): string { return path.join(KnownLocations.nativeAssetsDir, \"ECSchemas\", \"Dgn\", `${BisCoreSchema.schemaName}.ecschema.xml`); }\n\n /** @internal */\n public static registerSchema() {\n if (this === Schemas.getRegisteredSchema(this.schemaName))\n return;\n\n Schemas.unregisterSchema(this.schemaName);\n Schemas.registerSchema(this);\n\n // this list should include all backend .ts files with implementations of Entity-based classes. Order does not matter.\n [\n elementMod,\n aspectMod,\n modelMod,\n categoryMod,\n viewMod,\n linkMod,\n textureMod,\n materialMod,\n externalSourceMod,\n displayStyleMod,\n annotationsMod,\n sheetIndex\n ].forEach((module) => ClassRegistry.registerModule(module, this));\n }\n}\n"]}
|
|
@@ -61,19 +61,19 @@ export declare namespace BlobContainer {
|
|
|
61
61
|
/** Properties returned by `Service.requestToken` */
|
|
62
62
|
interface TokenProps {
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* Expiring token that provides the requested access to the container. Should be used in all subsequent requests for blobs within the container,
|
|
65
65
|
* and must be refreshed before it expires
|
|
66
66
|
*/
|
|
67
67
|
token: ContainerToken;
|
|
68
|
-
/**
|
|
68
|
+
/** Scope of the container. */
|
|
69
69
|
scope: Scope;
|
|
70
|
-
/**
|
|
70
|
+
/** Name of the blob storage provider. */
|
|
71
71
|
provider: Provider;
|
|
72
72
|
/** Time at which the token will expire. The token should be refreshed (that is, a new token should be requested) before this time. */
|
|
73
73
|
expiration: Date;
|
|
74
74
|
/** Metadata of the container. */
|
|
75
75
|
metadata: Metadata;
|
|
76
|
-
/** Base URI of container */
|
|
76
|
+
/** Base URI of the storage account that hosts the container */
|
|
77
77
|
baseUri: string;
|
|
78
78
|
}
|
|
79
79
|
/** The URI and Id of the container. */
|
|
@@ -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,E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G;QACxG,MAAM,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;QAEvE;;;WAGG;QACH,MAAM,CAAC,SAAS,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAEvD,sCAAsC;QACtC,UAAU,CAAC,SAAS,EAAE,oBAAoB,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QAE5D,kDAAkD;QAClD,aAAa,CAAC,SAAS,EAAE,oBAAoB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;QAElE,oIAAoI;QACpI,uBAAuB,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;QAEtG,mDAAmD;QACnD,UAAU,CAAC,SAAS,EAAE,oBAAoB,EAAE,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAEpF,qEAAqE;QACrE,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,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,IAAiB,aAAa,CA2K7B;AA3KD,WAAiB,aAAa;AA2K9B,CAAC,EA3KgB,aAAa,6BAAb,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 *
|
|
1
|
+
{"version":3,"file":"BlobContainerService.js","sourceRoot":"","sources":["../../src/BlobContainerService.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH;;;GAGG;AACH,IAAiB,aAAa,CA2K7B;AA3KD,WAAiB,aAAa;AA2K9B,CAAC,EA3KgB,aAAa,6BAAb,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"]}
|
|
@@ -32,6 +32,11 @@ export interface PushChangesArgs extends TokenArg {
|
|
|
32
32
|
pushRetryCount?: number;
|
|
33
33
|
/** The delay to wait between retry attempts on failed pushes. Default is 3 seconds. */
|
|
34
34
|
pushRetryDelay?: BeDuration;
|
|
35
|
+
/**
|
|
36
|
+
* For testing purpose
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
noFastForward?: true;
|
|
35
40
|
}
|
|
36
41
|
/**
|
|
37
42
|
* Specifies a specific index for pulling changes.
|
|
@@ -49,6 +54,11 @@ export type PullChangesArgs = ToChangesetArgs & {
|
|
|
49
54
|
* @note return non-zero from this function to abort the download.
|
|
50
55
|
*/
|
|
51
56
|
onProgress?: ProgressFunction;
|
|
57
|
+
/**
|
|
58
|
+
* For testing purpose
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
noFastForward?: true;
|
|
52
62
|
};
|
|
53
63
|
/** Arguments for [[BriefcaseManager.revertTimelineChanges]]
|
|
54
64
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BriefcaseManager.d.ts","sourceRoot":"","sources":["../../src/BriefcaseManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,EACL,WAAW,EAAE,UAAU,EAAmB,UAAU,EAAmD,QAAQ,EAChH,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,WAAW,EAAoB,cAAc,EAAsB,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,cAAc,EAA6C,mBAAmB,EACrM,YAAY,EAAE,aAAa,EAAE,wBAAwB,EACtD,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE7E,OAAO,EAAsC,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAS7D;;EAEE;AACF,MAAM,WAAW,sBAAuB,SAAQ,QAAQ,EAAE,wBAAwB;IAChF;;OAEG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,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AC,KAAK,EAAE,cAAc,CAAA;KAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAIpH,wEAAwE;WACpD,kBAAkB,CAAC,GAAG,EAAE;QAAE,QAAQ,EAAE,UAAU,CAAA;KAAE,GAAG,OAAO,CAAC,cAAc,CAAC;IAI9F;;;OAGG;WACiB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAI1F;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAuB;mBAajB,oBAAoB;IAWzC,gBAAgB;WACI,qBAAqB,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoD9F,gBAAgB;WACI,sBAAsB,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IA8E7F,4EAA4E;mBACvD,WAAW;IA4ChC;;OAEG;WACiB,aAAa,CAAC,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;CAgBxF"}
|
|
@@ -33,6 +33,7 @@ class BriefcaseManager {
|
|
|
33
33
|
static getChangeCachePathName(iModelId) { return path.join(this.getIModelPath(iModelId), iModelId.concat(".bim.ecchanges")); }
|
|
34
34
|
/** @internal */
|
|
35
35
|
static getChangedElementsPathName(iModelId) { return path.join(this.getIModelPath(iModelId), iModelId.concat(".bim.elems")); }
|
|
36
|
+
static _briefcaseSubDir = "briefcases";
|
|
36
37
|
/** Get the local path of the folder storing briefcases associated with the specified iModel. */
|
|
37
38
|
static getBriefcaseBasePath(iModelId) {
|
|
38
39
|
return path.join(this.getIModelPath(iModelId), this._briefcaseSubDir);
|
|
@@ -49,6 +50,7 @@ class BriefcaseManager {
|
|
|
49
50
|
this._cacheDir = cacheRootDir;
|
|
50
51
|
IModelJsFs_1.IModelJsFs.recursiveMkDirSync(this._cacheDir);
|
|
51
52
|
}
|
|
53
|
+
static _initialized;
|
|
52
54
|
/** Initialize BriefcaseManager
|
|
53
55
|
* @param cacheRootDir The root directory for storing a cache of downloaded briefcase files on the local computer.
|
|
54
56
|
* Briefcases are stored relative to this path in sub-folders organized by IModelId.
|
|
@@ -99,6 +101,7 @@ class BriefcaseManager {
|
|
|
99
101
|
}
|
|
100
102
|
return briefcaseList;
|
|
101
103
|
}
|
|
104
|
+
static _cacheDir;
|
|
102
105
|
/** Get the root directory for the briefcase cache */
|
|
103
106
|
static get cacheDir() { return this._cacheDir; }
|
|
104
107
|
/** Determine whether the supplied briefcaseId is in the range of assigned BriefcaseIds issued by iModelHub
|
|
@@ -112,7 +115,7 @@ class BriefcaseManager {
|
|
|
112
115
|
* it's a good idea to supply different aliases for each of them.
|
|
113
116
|
*/
|
|
114
117
|
static async acquireNewBriefcaseId(arg) {
|
|
115
|
-
return IModelHost_1.IModelHost.
|
|
118
|
+
return IModelHost_1.IModelHost[Symbols_1._hubAccess].acquireNewBriefcaseId(arg);
|
|
116
119
|
}
|
|
117
120
|
/**
|
|
118
121
|
* Download a new briefcase from iModelHub for the supplied iModelId.
|
|
@@ -140,7 +143,7 @@ class BriefcaseManager {
|
|
|
140
143
|
if (IModelJsFs_1.IModelJsFs.existsSync(fileName))
|
|
141
144
|
throw new core_common_1.IModelError(core_bentley_1.IModelStatus.FileAlreadyExists, `Briefcase "${fileName}" already exists`);
|
|
142
145
|
const asOf = arg.asOf ?? core_common_1.IModelVersion.latest().toJSON();
|
|
143
|
-
const changeset = await IModelHost_1.IModelHost.
|
|
146
|
+
const changeset = await IModelHost_1.IModelHost[Symbols_1._hubAccess].getChangesetFromVersion({ ...arg, version: core_common_1.IModelVersion.fromJSON(asOf) });
|
|
144
147
|
const checkpoint = { ...arg, changeset };
|
|
145
148
|
try {
|
|
146
149
|
await CheckpointManager_1.CheckpointManager.downloadCheckpoint({ localFile: fileName, checkpoint, onProgress: arg.onProgress });
|
|
@@ -208,7 +211,7 @@ class BriefcaseManager {
|
|
|
208
211
|
*/
|
|
209
212
|
static async releaseBriefcase(accessToken, briefcase) {
|
|
210
213
|
if (this.isValidBriefcaseId(briefcase.briefcaseId))
|
|
211
|
-
return IModelHost_1.IModelHost.
|
|
214
|
+
return IModelHost_1.IModelHost[Symbols_1._hubAccess].releaseBriefcase({ accessToken, iModelId: briefcase.iModelId, briefcaseId: briefcase.briefcaseId });
|
|
212
215
|
}
|
|
213
216
|
/**
|
|
214
217
|
* Delete and clean up a briefcase and all of its associated files. First, this method opens the supplied filename to determine its briefcaseId.
|
|
@@ -302,22 +305,22 @@ class BriefcaseManager {
|
|
|
302
305
|
}
|
|
303
306
|
/** Query the hub for the properties for a ChangesetIndex or ChangesetId */
|
|
304
307
|
static async queryChangeset(arg) {
|
|
305
|
-
return IModelHost_1.IModelHost.
|
|
308
|
+
return IModelHost_1.IModelHost[Symbols_1._hubAccess].queryChangeset({ ...arg, accessToken: await IModelHost_1.IModelHost.getAccessToken() });
|
|
306
309
|
}
|
|
307
310
|
/** Query the hub for an array of changeset properties given a ChangesetRange */
|
|
308
311
|
static async queryChangesets(arg) {
|
|
309
|
-
return IModelHost_1.IModelHost.
|
|
312
|
+
return IModelHost_1.IModelHost[Symbols_1._hubAccess].queryChangesets({ ...arg, accessToken: await IModelHost_1.IModelHost.getAccessToken() });
|
|
310
313
|
}
|
|
311
314
|
/** Query the hub for the ChangesetProps of the most recent changeset */
|
|
312
315
|
static async getLatestChangeset(arg) {
|
|
313
|
-
return IModelHost_1.IModelHost.
|
|
316
|
+
return IModelHost_1.IModelHost[Symbols_1._hubAccess].getLatestChangeset({ ...arg, accessToken: await IModelHost_1.IModelHost.getAccessToken() });
|
|
314
317
|
}
|
|
315
318
|
/** Query the Id of an iModel by name.
|
|
316
319
|
* @param arg Identifies the iModel of interest
|
|
317
320
|
* @returns the Id of the corresponding iModel, or `undefined` if no such iModel exists.
|
|
318
321
|
*/
|
|
319
322
|
static async queryIModelByName(arg) {
|
|
320
|
-
return IModelHost_1.IModelHost.
|
|
323
|
+
return IModelHost_1.IModelHost[Symbols_1._hubAccess].queryIModelByName(arg);
|
|
321
324
|
}
|
|
322
325
|
/** Deletes a folder and all it's contents.
|
|
323
326
|
* - Does not throw any errors, but logs them.
|
|
@@ -333,10 +336,10 @@ class BriefcaseManager {
|
|
|
333
336
|
status = BriefcaseManager.deleteFolderIfEmpty(folderPathname);
|
|
334
337
|
return status;
|
|
335
338
|
}
|
|
336
|
-
static async applySingleChangeset(db, changesetFile) {
|
|
339
|
+
static async applySingleChangeset(db, changesetFile, fastForward) {
|
|
337
340
|
if (changesetFile.changesType === core_common_1.ChangesetType.Schema || changesetFile.changesType === core_common_1.ChangesetType.SchemaSync)
|
|
338
341
|
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.)
|
|
339
|
-
db[Symbols_1._nativeDb].applyChangeset(changesetFile);
|
|
342
|
+
db[Symbols_1._nativeDb].applyChangeset(changesetFile, fastForward);
|
|
340
343
|
db.changeset = db[Symbols_1._nativeDb].getCurrentChangeset();
|
|
341
344
|
// we're done with this changeset, delete it
|
|
342
345
|
IModelJsFs_1.IModelJsFs.removeSync(changesetFile.pathname);
|
|
@@ -347,7 +350,7 @@ class BriefcaseManager {
|
|
|
347
350
|
throw new core_common_1.IModelError(core_bentley_1.ChangeSetStatus.ApplyError, "Briefcase must be open ReadWrite to revert timeline changes");
|
|
348
351
|
let currentIndex = db.changeset.index;
|
|
349
352
|
if (currentIndex === undefined)
|
|
350
|
-
currentIndex = (await IModelHost_1.IModelHost.
|
|
353
|
+
currentIndex = (await IModelHost_1.IModelHost[Symbols_1._hubAccess].queryChangeset({ accessToken: arg.accessToken, iModelId: db.iModelId, changeset: { id: db.changeset.id } })).index;
|
|
351
354
|
if (!arg.toIndex) {
|
|
352
355
|
throw new core_common_1.IModelError(core_bentley_1.ChangeSetStatus.ApplyError, "toIndex must be specified to revert changesets");
|
|
353
356
|
}
|
|
@@ -358,7 +361,7 @@ class BriefcaseManager {
|
|
|
358
361
|
throw new core_common_1.IModelError(core_bentley_1.ChangeSetStatus.ApplyError, "Cannot revert timeline changesets without holding a schema lock");
|
|
359
362
|
}
|
|
360
363
|
// Download change sets
|
|
361
|
-
const changesets = await IModelHost_1.IModelHost.
|
|
364
|
+
const changesets = await IModelHost_1.IModelHost[Symbols_1._hubAccess].downloadChangesets({
|
|
362
365
|
accessToken: arg.accessToken,
|
|
363
366
|
iModelId: db.iModelId,
|
|
364
367
|
range: { first: arg.toIndex, end: currentIndex },
|
|
@@ -391,10 +394,13 @@ class BriefcaseManager {
|
|
|
391
394
|
throw new core_common_1.IModelError(core_bentley_1.ChangeSetStatus.ApplyError, "Briefcase must be open ReadWrite to process change sets");
|
|
392
395
|
let currentIndex = db.changeset.index;
|
|
393
396
|
if (currentIndex === undefined)
|
|
394
|
-
currentIndex = (await IModelHost_1.IModelHost.
|
|
397
|
+
currentIndex = (await IModelHost_1.IModelHost[Symbols_1._hubAccess].queryChangeset({ accessToken: arg.accessToken, iModelId: db.iModelId, changeset: { id: db.changeset.id } })).index;
|
|
395
398
|
const reverse = (arg.toIndex && arg.toIndex < currentIndex) ? true : false;
|
|
399
|
+
if (db[Symbols_1._nativeDb].hasPendingTxns() && reverse) {
|
|
400
|
+
throw new core_common_1.IModelError(core_bentley_1.ChangeSetStatus.ApplyError, "Cannot reverse changesets when there are pending changes");
|
|
401
|
+
}
|
|
396
402
|
// Download change sets
|
|
397
|
-
const changesets = await IModelHost_1.IModelHost.
|
|
403
|
+
const changesets = await IModelHost_1.IModelHost[Symbols_1._hubAccess].downloadChangesets({
|
|
398
404
|
accessToken: arg.accessToken,
|
|
399
405
|
iModelId: db.iModelId,
|
|
400
406
|
range: { first: reverse ? arg.toIndex + 1 : currentIndex + 1, end: reverse ? currentIndex : arg.toIndex }, // eslint-disable-line @typescript-eslint/no-non-null-assertion
|
|
@@ -405,11 +411,49 @@ class BriefcaseManager {
|
|
|
405
411
|
return; // nothing to apply
|
|
406
412
|
if (reverse)
|
|
407
413
|
changesets.reverse();
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
414
|
+
let appliedChangesets = -1;
|
|
415
|
+
if (db[Symbols_1._nativeDb].hasPendingTxns() && !reverse && !arg.noFastForward) {
|
|
416
|
+
// attempt to perform fast forward
|
|
417
|
+
for (const changeset of changesets) {
|
|
418
|
+
// do not waste time on schema changesets. They cannot be fastforwarded.
|
|
419
|
+
if (changeset.changesType === core_common_1.ChangesetType.Schema || changeset.changesType === core_common_1.ChangesetType.SchemaSync)
|
|
420
|
+
break;
|
|
421
|
+
try {
|
|
422
|
+
const stopwatch = new core_bentley_1.StopWatch(`[${changeset.id}]`, true);
|
|
423
|
+
core_bentley_1.Logger.logInfo(loggerCategory, `Starting application of changeset with id ${stopwatch.description} using fast forward method`);
|
|
424
|
+
await this.applySingleChangeset(db, changeset, true);
|
|
425
|
+
core_bentley_1.Logger.logInfo(loggerCategory, `Applied changeset with id ${stopwatch.description} (${stopwatch.elapsedSeconds} seconds)`);
|
|
426
|
+
appliedChangesets++;
|
|
427
|
+
db.saveChanges();
|
|
428
|
+
}
|
|
429
|
+
catch {
|
|
430
|
+
db.abandonChanges();
|
|
431
|
+
break;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
if (appliedChangesets < changesets.length - 1) {
|
|
436
|
+
db[Symbols_1._nativeDb].pullMergeBegin();
|
|
437
|
+
for (const changeset of changesets.filter((_, index) => index > appliedChangesets)) {
|
|
438
|
+
const stopwatch = new core_bentley_1.StopWatch(`[${changeset.id}]`, true);
|
|
439
|
+
core_bentley_1.Logger.logInfo(loggerCategory, `Starting application of changeset with id ${stopwatch.description}`);
|
|
440
|
+
try {
|
|
441
|
+
await this.applySingleChangeset(db, changeset, false);
|
|
442
|
+
core_bentley_1.Logger.logInfo(loggerCategory, `Applied changeset with id ${stopwatch.description} (${stopwatch.elapsedSeconds} seconds)`);
|
|
443
|
+
}
|
|
444
|
+
catch (err) {
|
|
445
|
+
if (err instanceof Error) {
|
|
446
|
+
core_bentley_1.Logger.logError(loggerCategory, `Error applying changeset with id ${stopwatch.description}: ${err.message}`);
|
|
447
|
+
}
|
|
448
|
+
db.abandonChanges();
|
|
449
|
+
db[Symbols_1._nativeDb].pullMergeEnd();
|
|
450
|
+
throw err;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
db[Symbols_1._nativeDb].pullMergeEnd();
|
|
454
|
+
if (!db.isReadonly) {
|
|
455
|
+
db.saveChanges("Merge.");
|
|
456
|
+
}
|
|
413
457
|
}
|
|
414
458
|
// notify listeners
|
|
415
459
|
db.notifyChangesetApplied();
|
|
@@ -427,7 +471,7 @@ class BriefcaseManager {
|
|
|
427
471
|
while (true) {
|
|
428
472
|
try {
|
|
429
473
|
const accessToken = await IModelHost_1.IModelHost.getAccessToken();
|
|
430
|
-
const index = await IModelHost_1.IModelHost.
|
|
474
|
+
const index = await IModelHost_1.IModelHost[Symbols_1._hubAccess].pushChangeset({ accessToken, iModelId: db.iModelId, changesetProps });
|
|
431
475
|
db[Symbols_1._nativeDb].completeCreateChangeset({ index });
|
|
432
476
|
db.changeset = db[Symbols_1._nativeDb].getCurrentChangeset();
|
|
433
477
|
if (!arg.retainLocks)
|
|
@@ -477,5 +521,4 @@ class BriefcaseManager {
|
|
|
477
521
|
}
|
|
478
522
|
}
|
|
479
523
|
exports.BriefcaseManager = BriefcaseManager;
|
|
480
|
-
BriefcaseManager._briefcaseSubDir = "briefcases";
|
|
481
524
|
//# sourceMappingURL=BriefcaseManager.js.map
|