@itwin/imodel-transformer 0.3.18-fedguidopt.7 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -1
- package/lib/cjs/BranchProvenanceInitializer.d.ts +3 -10
- package/lib/cjs/BranchProvenanceInitializer.d.ts.map +1 -1
- package/lib/cjs/BranchProvenanceInitializer.js +13 -85
- package/lib/cjs/BranchProvenanceInitializer.js.map +1 -1
- package/lib/cjs/DetachedExportElementAspectsStrategy.d.ts +16 -0
- package/lib/cjs/DetachedExportElementAspectsStrategy.d.ts.map +1 -0
- package/lib/cjs/DetachedExportElementAspectsStrategy.js +98 -0
- package/lib/cjs/DetachedExportElementAspectsStrategy.js.map +1 -0
- package/lib/cjs/ECSqlReaderAsyncIterableIteratorAdapter.d.ts +19 -0
- package/lib/cjs/ECSqlReaderAsyncIterableIteratorAdapter.d.ts.map +1 -0
- package/lib/cjs/ECSqlReaderAsyncIterableIteratorAdapter.js +43 -0
- package/lib/cjs/ECSqlReaderAsyncIterableIteratorAdapter.js.map +1 -0
- package/lib/cjs/ExportElementAspectsStrategy.d.ts +35 -0
- package/lib/cjs/ExportElementAspectsStrategy.d.ts.map +1 -0
- package/lib/cjs/ExportElementAspectsStrategy.js +48 -0
- package/lib/cjs/ExportElementAspectsStrategy.js.map +1 -0
- package/lib/cjs/ExportElementAspectsWithElementsStrategy.d.ts +12 -0
- package/lib/cjs/ExportElementAspectsWithElementsStrategy.d.ts.map +1 -0
- package/lib/cjs/ExportElementAspectsWithElementsStrategy.js +43 -0
- package/lib/cjs/ExportElementAspectsWithElementsStrategy.js.map +1 -0
- package/lib/cjs/IModelCloneContext.d.ts.map +1 -1
- package/lib/cjs/IModelCloneContext.js +2 -0
- package/lib/cjs/IModelCloneContext.js.map +1 -1
- package/lib/cjs/IModelExporter.d.ts +15 -40
- package/lib/cjs/IModelExporter.d.ts.map +1 -1
- package/lib/cjs/IModelExporter.js +52 -125
- package/lib/cjs/IModelExporter.js.map +1 -1
- package/lib/cjs/IModelTransformer.d.ts +29 -162
- package/lib/cjs/IModelTransformer.d.ts.map +1 -1
- package/lib/cjs/IModelTransformer.js +281 -933
- package/lib/cjs/IModelTransformer.js.map +1 -1
- package/package.json +14 -14
- package/lib/cjs/Algo.d.ts +0 -7
- package/lib/cjs/Algo.d.ts.map +0 -1
- package/lib/cjs/Algo.js +0 -50
- package/lib/cjs/Algo.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccessToken,
|
|
1
|
+
import { AccessToken, Id64String } from "@itwin/core-bentley";
|
|
2
2
|
import * as ECSchemaMetaData from "@itwin/ecschema-metadata";
|
|
3
3
|
import { Element, ElementAspect, ElementMultiAspect, ElementUniqueAspect, Entity, IModelDb, Model, Relationship, RelationshipProps, SQLiteDb } from "@itwin/core-backend";
|
|
4
4
|
import { CodeSpec, ElementAspectProps, ElementProps, EntityReference, EntityReferenceSet, ExternalSourceAspectProps, FontProps, ModelProps, Placement2d, Placement3d } from "@itwin/core-common";
|
|
@@ -13,8 +13,7 @@ import { IModelCloneContext } from "./IModelCloneContext";
|
|
|
13
13
|
*/
|
|
14
14
|
export interface IModelTransformOptions {
|
|
15
15
|
/** The Id of the Element in the **target** iModel that represents the **source** repository as a whole and scopes its [ExternalSourceAspect]($backend) instances.
|
|
16
|
-
*
|
|
17
|
-
* or physical consolidation.
|
|
16
|
+
* When the goal is to consolidate multiple source iModels into a single target iModel, this option must be specified.
|
|
18
17
|
*/
|
|
19
18
|
targetScopeElementId?: Id64String;
|
|
20
19
|
/** Set to `true` if IModelTransformer should not record its provenance.
|
|
@@ -101,28 +100,6 @@ export interface IModelTransformOptions {
|
|
|
101
100
|
* @beta
|
|
102
101
|
*/
|
|
103
102
|
optimizeGeometry?: OptimizeGeometryOptions;
|
|
104
|
-
/**
|
|
105
|
-
* force the insertion of external source aspects to provide provenance, even if there are federation guids
|
|
106
|
-
* in the source that we can use. This can make some operations (like transforming new elements or initializing forks)
|
|
107
|
-
* much slower due to needing to insert aspects, but prevents requiring change information for future merges.
|
|
108
|
-
* @default false
|
|
109
|
-
*/
|
|
110
|
-
forceExternalSourceAspectProvenance?: boolean;
|
|
111
|
-
/**
|
|
112
|
-
* Do not detach the change cache that we build. Use this if you want to do multiple transformations to
|
|
113
|
-
* the same iModels, to avoid the performance cost of reinitializing the change cache which can be
|
|
114
|
-
* expensive. You should only use this if you know the cache will be reused.
|
|
115
|
-
* @note You must detach the change cache yourself.
|
|
116
|
-
* @default false
|
|
117
|
-
*/
|
|
118
|
-
noDetachChangeCache?: boolean;
|
|
119
|
-
/**
|
|
120
|
-
* Do not check that processChanges is called from the next changeset index.
|
|
121
|
-
* This is an unsafe option (e.g. it can cause data loss in future branch operations)
|
|
122
|
-
* and you should not use it.
|
|
123
|
-
* @default false
|
|
124
|
-
*/
|
|
125
|
-
ignoreMissingChangesetsInSynchronizations?: boolean;
|
|
126
103
|
}
|
|
127
104
|
/**
|
|
128
105
|
* A container for tracking the state of a partially committed entity and finalizing it when it's ready to be fully committed
|
|
@@ -146,10 +123,10 @@ declare class PartiallyCommittedEntity {
|
|
|
146
123
|
resolveReference(id: EntityReference): void;
|
|
147
124
|
forceComplete(): void;
|
|
148
125
|
}
|
|
149
|
-
/** Arguments you can pass to [[IModelTransformer.
|
|
126
|
+
/** Arguments you can pass to [[IModelTransformer.initExternalSourceAspects]]
|
|
150
127
|
* @beta
|
|
151
128
|
*/
|
|
152
|
-
export interface
|
|
129
|
+
export interface InitFromExternalSourceAspectsArgs {
|
|
153
130
|
accessToken?: AccessToken;
|
|
154
131
|
/**
|
|
155
132
|
* Include changes from this changeset up through and including the current changeset.
|
|
@@ -167,10 +144,6 @@ export interface InitOptions {
|
|
|
167
144
|
*/
|
|
168
145
|
export interface ProcessChangesOptions extends ExportChangesOptions {
|
|
169
146
|
}
|
|
170
|
-
/** Arguments you can pass to [[IModelTransformer.initExternalSourceAspects]]
|
|
171
|
-
* @deprecated in 0.1.0. Use [[InitOptions]] (and [[IModelTransformer.initialize]]) instead.
|
|
172
|
-
*/
|
|
173
|
-
export type InitFromExternalSourceAspectsArgs = InitOptions;
|
|
174
147
|
/** Base class used to transform a source iModel into a different target iModel.
|
|
175
148
|
* @see [iModel Transformation and Data Exchange]($docs/learning/transformer/index.md), [IModelExporter]($transformer), [IModelImporter]($transformer)
|
|
176
149
|
* @beta
|
|
@@ -193,16 +166,10 @@ export declare class IModelTransformer extends IModelExportHandler {
|
|
|
193
166
|
/** map of (unprocessed element, referencing processed element) pairs to the partially committed element that needs the reference resolved
|
|
194
167
|
* and have some helper methods below for now */
|
|
195
168
|
protected _pendingReferences: PendingReferenceMap<PartiallyCommittedEntity>;
|
|
196
|
-
/** a set of elements for which source provenance will be explicitly tracked by ExternalSourceAspects */
|
|
197
|
-
protected _elementsWithExplicitlyTrackedProvenance: Set<string>;
|
|
198
169
|
/** map of partially committed entities to their partial commit progress */
|
|
199
170
|
protected _partiallyCommittedEntities: EntityMap<PartiallyCommittedEntity>;
|
|
200
171
|
/** the options that were used to initialize this transformer */
|
|
201
172
|
private readonly _options;
|
|
202
|
-
private _isSynchronization;
|
|
203
|
-
private get _isReverseSynchronization();
|
|
204
|
-
private get _isForwardSynchronization();
|
|
205
|
-
private _changesetRanges;
|
|
206
173
|
/** Set if it can be determined whether this is the first source --> target synchronization. */
|
|
207
174
|
private _isFirstSynchronization?;
|
|
208
175
|
/** The element classes that are considered to define provenance in the iModel */
|
|
@@ -237,20 +204,6 @@ export declare class IModelTransformer extends IModelExportHandler {
|
|
|
237
204
|
isReverseSynchronization: boolean;
|
|
238
205
|
targetScopeElementId: Id64String;
|
|
239
206
|
}): ExternalSourceAspectProps;
|
|
240
|
-
static initRelationshipProvenanceOptions(sourceRelInstanceId: Id64String, targetRelInstanceId: Id64String, args: {
|
|
241
|
-
sourceDb: IModelDb;
|
|
242
|
-
targetDb: IModelDb;
|
|
243
|
-
isReverseSynchronization: boolean;
|
|
244
|
-
targetScopeElementId: Id64String;
|
|
245
|
-
forceOldRelationshipProvenanceMethod: boolean;
|
|
246
|
-
}): ExternalSourceAspectProps;
|
|
247
|
-
/**
|
|
248
|
-
* Previously the transformer would insert provenance always pointing to the "target" relationship.
|
|
249
|
-
* It should (and now by default does) instead insert provenance pointing to the provenanceSource
|
|
250
|
-
* SEE: https://github.com/iTwin/imodel-transformer/issues/54
|
|
251
|
-
* This exists only to facilitate testing that the transformer can handle the older, flawed method
|
|
252
|
-
*/
|
|
253
|
-
private _forceOldRelationshipProvenanceMethod;
|
|
254
207
|
/** Create an ExternalSourceAspectProps in a standard way for an Element in an iModel --> iModel transformation. */
|
|
255
208
|
private initElementProvenance;
|
|
256
209
|
/** Create an ExternalSourceAspectProps in a standard way for a Relationship in an iModel --> iModel transformations.
|
|
@@ -259,38 +212,9 @@ export declare class IModelTransformer extends IModelExportHandler {
|
|
|
259
212
|
* The ECInstanceId of the relationship in the target iModel will be stored in the JsonProperties of the ExternalSourceAspect.
|
|
260
213
|
*/
|
|
261
214
|
private initRelationshipProvenance;
|
|
262
|
-
|
|
263
|
-
private
|
|
264
|
-
/**
|
|
265
|
-
* Index of the changeset that the transformer was at when the transformation begins (was constructed).
|
|
266
|
-
* Used to determine at the end which changesets were part of a synchronization.
|
|
267
|
-
*/
|
|
268
|
-
private _startingChangesetIndices;
|
|
269
|
-
private _cachedSynchronizationVersion;
|
|
270
|
-
/** the changeset in the scoping element's source version found for this transformation
|
|
271
|
-
* @note: the version depends on whether this is a reverse synchronization or not, as
|
|
272
|
-
* it is stored separately for both synchronization directions
|
|
273
|
-
* @note: empty string and -1 for changeset and index if it has never been transformed
|
|
274
|
-
*/
|
|
275
|
-
private get _synchronizationVersion();
|
|
276
|
-
/**
|
|
277
|
-
* Make sure there are no conflicting other scope-type external source aspects on the *target scope element*,
|
|
278
|
-
* If there are none at all, insert one, then this must be a first synchronization.
|
|
279
|
-
* @returns the last synced version (changesetId) on the target scope's external source aspect,
|
|
280
|
-
* if this was a [BriefcaseDb]($backend)
|
|
281
|
-
*/
|
|
282
|
-
private initScopeProvenance;
|
|
283
|
-
/**
|
|
284
|
-
* @returns the id and version of an aspect with the given element, scope, kind, and identifier
|
|
285
|
-
* May also return a reverseSyncVersion from json properties if requested
|
|
286
|
-
*/
|
|
287
|
-
private queryScopeExternalSource;
|
|
288
|
-
/**
|
|
289
|
-
* Iterate all matching federation guids and ExternalSourceAspects in the provenance iModel (target unless reverse sync)
|
|
290
|
-
* and call a function for each one.
|
|
291
|
-
* @note provenance is done by federation guids where possible
|
|
292
|
-
* @note this may execute on each element more than once! Only use in cases where that is handled
|
|
293
|
-
*/
|
|
215
|
+
private validateScopeProvenance;
|
|
216
|
+
private queryExternalSourceAspectId;
|
|
217
|
+
/** Iterate all matching ExternalSourceAspects in the provenance iModel (target unless reverse sync) and call a function for each one. */
|
|
294
218
|
static forEachTrackedElement(args: {
|
|
295
219
|
provenanceSourceDb: IModelDb;
|
|
296
220
|
provenanceDb: IModelDb;
|
|
@@ -305,30 +229,19 @@ export declare class IModelTransformer extends IModelExportHandler {
|
|
|
305
229
|
* @note Passing an [[InitFromExternalSourceAspectsArgs]] is required when processing changes, to remap any elements that may have been deleted.
|
|
306
230
|
* You must await the returned promise as well in this case. The synchronous behavior has not changed but is deprecated and won't process everything.
|
|
307
231
|
*/
|
|
308
|
-
initFromExternalSourceAspects(args?:
|
|
309
|
-
/**
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
*/
|
|
313
|
-
private
|
|
314
|
-
private _queryProvenanceForElement;
|
|
315
|
-
private _queryProvenanceForRelationship;
|
|
316
|
-
private _queryTargetRelId;
|
|
317
|
-
private _targetClassNameToClassIdCache;
|
|
318
|
-
private _targetClassNameToClassId;
|
|
319
|
-
private _getRelClassId;
|
|
320
|
-
private _queryElemIdByFedGuid;
|
|
232
|
+
initFromExternalSourceAspects(args?: InitFromExternalSourceAspectsArgs): void | Promise<void>;
|
|
233
|
+
/** When processing deleted elements in a reverse synchronization, the [[provenanceDb]] (usually a branch iModel) has already
|
|
234
|
+
* deleted the [ExternalSourceAspect]($backend)s that tell us which elements in the reverse synchronization target (usually
|
|
235
|
+
* a master iModel) should be deleted. We must use the changesets to get the values of those before they were deleted.
|
|
236
|
+
*/
|
|
237
|
+
private remapDeletedSourceElements;
|
|
321
238
|
/** Returns `true` if *brute force* delete detections should be run.
|
|
322
239
|
* @note Not relevant for processChanges when change history is known.
|
|
323
240
|
*/
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
* @deprecated in 0.1.x. This method is only called during [[processAll]] when the option
|
|
329
|
-
* [[IModelTransformerOptions.forceExternalSourceAspectProvenance]] is enabled. It is not
|
|
330
|
-
* necessary when using [[processChanges]] since changeset information is sufficient.
|
|
331
|
-
* @note you do not need to call this directly unless processing a subset of an iModel.
|
|
241
|
+
protected shouldDetectDeletes(): boolean;
|
|
242
|
+
/** Detect Element deletes using ExternalSourceAspects in the target iModel and a *brute force* comparison against Elements in the source iModel.
|
|
243
|
+
* @see processChanges
|
|
244
|
+
* @note This method is called from [[processAll]] and is not needed by [[processChanges]], so it only needs to be called directly when processing a subset of an iModel.
|
|
332
245
|
* @throws [[IModelError]] If the required provenance information is not available to detect deletes.
|
|
333
246
|
*/
|
|
334
247
|
detectElementDeletes(): Promise<void>;
|
|
@@ -343,15 +256,12 @@ export declare class IModelTransformer extends IModelExportHandler {
|
|
|
343
256
|
* @note This can be called more than once for an element in arbitrary order, so it should not have side-effects.
|
|
344
257
|
*/
|
|
345
258
|
onTransformElement(sourceElement: Element): ElementProps;
|
|
346
|
-
private _hasElementChangedCache?;
|
|
347
|
-
private _deletedSourceRelationshipData?;
|
|
348
|
-
private _cacheSourceChanges;
|
|
349
259
|
/** Returns true if a change within sourceElement is detected.
|
|
350
260
|
* @param sourceElement The Element from the source iModel
|
|
351
261
|
* @param targetElementId The Element from the target iModel to compare against.
|
|
352
262
|
* @note A subclass can override this method to provide custom change detection behavior.
|
|
353
263
|
*/
|
|
354
|
-
protected hasElementChanged(sourceElement: Element,
|
|
264
|
+
protected hasElementChanged(sourceElement: Element, targetElementId: Id64String): boolean;
|
|
355
265
|
private static transformCallbackFor;
|
|
356
266
|
/** callback to perform when a partial element says it's ready to be completed
|
|
357
267
|
* transforms the source element with all references now valid, then updates the partial element with the results
|
|
@@ -397,6 +307,8 @@ export declare class IModelTransformer extends IModelExportHandler {
|
|
|
397
307
|
onExportModel(sourceModel: Model): void;
|
|
398
308
|
/** Override of [IModelExportHandler.onDeleteModel]($transformer) that is called when [IModelExporter]($transformer) detects that a [Model]($backend) has been deleted from the source iModel. */
|
|
399
309
|
onDeleteModel(sourceModelId: Id64String): void;
|
|
310
|
+
/** Schedule modeled partition deletion */
|
|
311
|
+
private scheduleModeledPartitionDeletion;
|
|
400
312
|
/** Cause the model container, contents, and sub-models to be exported from the source iModel and imported into the target iModel.
|
|
401
313
|
* @param sourceModeledElementId Import this [Model]($backend) from the source IModelDb.
|
|
402
314
|
* @note This method is called from [[processChanges]] and [[processAll]], so it only needs to be called directly when processing a subset of an iModel.
|
|
@@ -422,19 +334,6 @@ export declare class IModelTransformer extends IModelExportHandler {
|
|
|
422
334
|
* @deprecated in 3.x. This method is no longer necessary since the transformer no longer needs to defer elements
|
|
423
335
|
*/
|
|
424
336
|
processDeferredElements(_numRetries?: number): Promise<void>;
|
|
425
|
-
/** called at the end ([[finalizeTransformation]]) of a transformation,
|
|
426
|
-
* updates the target scope element to say that transformation up through the
|
|
427
|
-
* source's changeset has been performed. Also stores all changesets that occurred
|
|
428
|
-
* during the transformation as "pending synchronization changeset indices"
|
|
429
|
-
*
|
|
430
|
-
* You generally should not call this function yourself and use [[processChanges]] instead.
|
|
431
|
-
* It is public for unsupported use cases of custom synchronization transforms.
|
|
432
|
-
* @note if you are not running processChanges in this transformation, this will fail
|
|
433
|
-
* without setting the `force` option to `true`
|
|
434
|
-
*/
|
|
435
|
-
updateSynchronizationVersion({ force }?: {
|
|
436
|
-
force?: boolean | undefined;
|
|
437
|
-
}): void;
|
|
438
337
|
private finalizeTransformation;
|
|
439
338
|
/** Imports all relationships that subclass from the specified base class.
|
|
440
339
|
* @param baseRelClassFullName The specified base relationship class.
|
|
@@ -455,7 +354,6 @@ export declare class IModelTransformer extends IModelExportHandler {
|
|
|
455
354
|
onDeleteRelationship(sourceRelInstanceId: Id64String): void;
|
|
456
355
|
private _yieldManager;
|
|
457
356
|
/** Detect Relationship deletes using ExternalSourceAspects in the target iModel and a *brute force* comparison against relationships in the source iModel.
|
|
458
|
-
* @deprecated
|
|
459
357
|
* @see processChanges
|
|
460
358
|
* @note This method is called from [[processAll]] and is not needed by [[processChanges]], so it only needs to be called directly when processing a subset of an iModel.
|
|
461
359
|
* @throws [[IModelError]] If the required provenance information is not available to detect deletes.
|
|
@@ -467,6 +365,7 @@ export declare class IModelTransformer extends IModelExportHandler {
|
|
|
467
365
|
* @note A subclass can override this method to provide custom transform behavior.
|
|
468
366
|
*/
|
|
469
367
|
protected onTransformRelationship(sourceRelationship: Relationship): RelationshipProps;
|
|
368
|
+
shouldExportElementAspect(aspect: ElementAspect): boolean;
|
|
470
369
|
/** Override of [IModelExportHandler.onExportElementUniqueAspect]($transformer) that imports an ElementUniqueAspect into the target iModel when it is exported from the source iModel.
|
|
471
370
|
* This override calls [[onTransformElementAspect]] and then [IModelImporter.importElementUniqueAspect]($transformer) to update the target iModel.
|
|
472
371
|
*/
|
|
@@ -529,22 +428,17 @@ export declare class IModelTransformer extends IModelExportHandler {
|
|
|
529
428
|
processSubject(sourceSubjectId: Id64String, targetSubjectId: Id64String): Promise<void>;
|
|
530
429
|
/** state to prevent reinitialization, @see [[initialize]] */
|
|
531
430
|
private _initialized;
|
|
532
|
-
/** length === 0 when _changeDataState = "no-change", length > 0 means "has-changes", otherwise undefined */
|
|
533
|
-
private _changeSummaryIds?;
|
|
534
|
-
private _sourceChangeDataState;
|
|
535
431
|
/**
|
|
536
|
-
* Initialize prerequisites of processing, you must initialize with an [[
|
|
537
|
-
* are intending
|
|
538
|
-
*
|
|
432
|
+
* Initialize prerequisites of processing, you must initialize with an [[InitFromExternalSourceAspectsArgs]] if you
|
|
433
|
+
* are intending process changes, but prefer using [[processChanges]]
|
|
434
|
+
* Called by all `process*` functions implicitly.
|
|
539
435
|
* Overriders must call `super.initialize()` first
|
|
540
436
|
*/
|
|
541
|
-
initialize(args?:
|
|
542
|
-
private _tryInitChangesetData;
|
|
437
|
+
initialize(args?: InitFromExternalSourceAspectsArgs): Promise<void>;
|
|
543
438
|
/** Export everything from the source iModel and import the transformed entities into the target iModel.
|
|
544
439
|
* @note [[processSchemas]] is not called automatically since the target iModel may want a different collection of schemas.
|
|
545
440
|
*/
|
|
546
441
|
processAll(): Promise<void>;
|
|
547
|
-
/** previous provenance, either a federation guid, a `${sourceFedGuid}/${targetFedGuid}` pair, or required aspect props */
|
|
548
442
|
private _lastProvenanceEntityInfo;
|
|
549
443
|
private markLastProvenance;
|
|
550
444
|
/** @internal the name of the table where javascript state of the transformer is serialized in transformer state dumps */
|
|
@@ -559,9 +453,6 @@ export declare class IModelTransformer extends IModelExportHandler {
|
|
|
559
453
|
*/
|
|
560
454
|
protected loadStateFromDb(db: SQLiteDb): void;
|
|
561
455
|
/**
|
|
562
|
-
* @deprecated in 0.1.x, this is buggy, and it is now equivalently efficient to simply restart the transformation
|
|
563
|
-
* from the original changeset
|
|
564
|
-
*
|
|
565
456
|
* Return a new transformer instance with the same remappings state as saved from a previous [[IModelTransformer.saveStateToFile]] call.
|
|
566
457
|
* This allows you to "resume" an iModel transformation, you will have to call [[IModelTransformer.processChanges]]/[[IModelTransformer.processAll]]
|
|
567
458
|
* again but the remapping state will cause already mapped elements to be skipped.
|
|
@@ -591,9 +482,6 @@ export declare class IModelTransformer extends IModelExportHandler {
|
|
|
591
482
|
*/
|
|
592
483
|
protected saveStateToDb(db: SQLiteDb): void;
|
|
593
484
|
/**
|
|
594
|
-
* @deprecated in 0.1.x, this is buggy, and it is now equivalently efficient to simply restart the transformation
|
|
595
|
-
* from the original changeset
|
|
596
|
-
*
|
|
597
485
|
* Save the state of the active transformation to a file path, if a file at the path already exists, it will be overwritten
|
|
598
486
|
* This state can be used by [[IModelTransformer.resumeTransformation]] to resume a transformation from this point.
|
|
599
487
|
* The serialization format is a custom sqlite database.
|
|
@@ -604,33 +492,12 @@ export declare class IModelTransformer extends IModelExportHandler {
|
|
|
604
492
|
*/
|
|
605
493
|
saveStateToFile(nativeStatePath: string): void;
|
|
606
494
|
/** Export changes from the source iModel and import the transformed entities into the target iModel.
|
|
607
|
-
*
|
|
608
|
-
*
|
|
609
|
-
* modify the iModel after processChanges until saveChanges, failure to do so may result in corrupted
|
|
610
|
-
* data loss in future branch operations
|
|
611
|
-
* @param accessToken A valid access token string
|
|
612
|
-
* @param startChangesetId Include changes from this changeset up through and including the current changeset.
|
|
613
|
-
* @note if no startChangesetId or startChangeset option is provided, the next unsynchronized changeset
|
|
614
|
-
* will automatically be determined and used
|
|
615
|
-
* @note To form a range of versions to process, set `startChangesetId` for the start (inclusive) of the desired range and open the source iModel as of the end (inclusive) of the desired range.
|
|
616
|
-
*/
|
|
617
|
-
processChanges(options: ProcessChangesOptions): Promise<void>;
|
|
618
|
-
/**
|
|
619
|
-
* @deprecated in 0.1.x, use a single [[ProcessChangesOptions]] object instead
|
|
620
|
-
* This overload follows the older behavior of defaulting an undefined startChangesetId to the
|
|
621
|
-
* current changeset.
|
|
495
|
+
* @note To form a range of versions to process, set `startChangesetId` for the start (inclusive)
|
|
496
|
+
* of the desired range and open the source iModel as of the end (inclusive) of the desired range.
|
|
622
497
|
*/
|
|
498
|
+
processChanges(args: ProcessChangesOptions): Promise<void>;
|
|
499
|
+
/** @deprecated in 0.1.x, use a single [[ProcessChangesOptions]] object instead */
|
|
623
500
|
processChanges(accessToken: AccessToken, startChangesetId?: string): Promise<void>;
|
|
624
|
-
/** Changeset data must be initialized in order to build correct changeOptions.
|
|
625
|
-
* Call [[IModelTransformer.initialize]] for initialization of synchronization provenance data
|
|
626
|
-
*/
|
|
627
|
-
private getExportInitOpts;
|
|
628
|
-
/** Combine an array of source elements into a single target element.
|
|
629
|
-
* All source and target elements must be created before calling this method.
|
|
630
|
-
* The "combine" operation is a remap and no properties from the source elements will be exported into the target
|
|
631
|
-
* and provenance will be explicitly tracked by ExternalSourceAspects
|
|
632
|
-
*/
|
|
633
|
-
combineElements(sourceElementIds: Id64Array, targetElementId: Id64String): void;
|
|
634
501
|
}
|
|
635
502
|
/** IModelTransformer that clones the contents of a template model.
|
|
636
503
|
* @beta
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelTransformer.d.ts","sourceRoot":"","sources":["../../src/IModelTransformer.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,WAAW,
|
|
1
|
+
{"version":3,"file":"IModelTransformer.d.ts","sourceRoot":"","sources":["../../src/IModelTransformer.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,WAAW,EAAgC,UAAU,EAEtD,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,gBAAgB,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAE2H,OAAO,EAAE,aAAa,EAAE,kBAAkB,EACjJ,mBAAmB,EAAE,MAAM,EACA,QAAQ,EAAuE,KAAK,EAC/G,YAAY,EAAE,iBAAiB,EAAU,QAAQ,EAC3E,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAC0B,QAAQ,EAAuB,kBAAkB,EAAE,YAAY,EAAE,eAAe,EAAE,kBAAkB,EACnI,yBAAyB,EAAE,SAAS,EAAyE,UAAU,EACvH,WAAW,EAAE,WAAW,EACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,cAAc,EAAuB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACtI,OAAO,EAAE,cAAc,EAAuB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEhG,OAAO,EAAoB,mBAAmB,EAAE,MAAM,uBAAuB,C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