Added callbacks to entities that have links to related entities:
Briefcase.getOwner
Changeset.getCreator
NamedVersion.getCreator
NamedVersion.getChangeset
Refactored IModelsClient from @itwin/imodels-client-authoring package to extend the IModelsClient from @itwin/imodels-client-management package. This surfaces all operations from management client to authoring without having to duplicate operations. It also allows for the authoring client to be passed to functions that require management client which is relevant for next item in this list.
Refactored specific operations entity operation classes that require handles to other entity operations, for example NamedVersionOperations that require ChangesetOperations. The constructor was changed to accept whole IModelsClient instead of specific operation instances. This approach has two benefits:
It avoids circular dependencies. We have a scenario where NamedVersionOperations require ChangesetOperations and ChangesetOperations require NamedVersionOperations. This is a circular dependency which is avoided when both operation classes accept a parent class (IModelsClient).
It does not require to change the constructor when new operations are required.
Added tests and refactored assertions to check the callbacks.
In this PR:
Briefcase.getOwner
Changeset.getCreator
NamedVersion.getCreator
NamedVersion.getChangeset
IModelsClient
from@itwin/imodels-client-authoring
package to extend theIModelsClient
from@itwin/imodels-client-management
package. This surfaces all operations from management client to authoring without having to duplicate operations. It also allows for the authoring client to be passed to functions that require management client which is relevant for next item in this list.NamedVersionOperations
that requireChangesetOperations
. The constructor was changed to accept wholeIModelsClient
instead of specific operation instances. This approach has two benefits:NamedVersionOperations
requireChangesetOperations
andChangesetOperations
requireNamedVersionOperations
. This is a circular dependency which is avoided when both operation classes accept a parent class (IModelsClient
).