ViewStoreRpc.Writer Interface

Methods for writing to a ViewStore via Rpc from a frontend via IModelConnection.views.viewsStoreWriter. These methods use the current ViewStore for the iModel, and attempt to load the default ViewStore if no ViewStore is currently loaded. They will throw exceptions if the request cannot be fulfilled.

@note The user's accessToken is validated against the ViewStore for every request. For each of these methods, the user must have write permission to the ViewStore.

Methods

Name Description
addCategorySelector(args: { name?: string, owner?: string, selector: ViewStoreRpc.SelectorProps }): Promise<string> Add a category selector to a ViewStore.  
addDisplayStyle(args: { className: string, name?: string, owner?: string, settings: DisplayStyleSettingsProps }): Promise<string> Add a display style to a ViewStore.  
addModelSelector(args: { name?: string, owner?: string, selector: ViewStoreRpc.SelectorProps }): Promise<string> Add a model selector to a ViewStore.  
addOrReplaceThumbnail(args: { thumbnail: ThumbnailProps, viewId: string }): Promise<void> Add a thumbnail for a view.  
addTagsToView(args: { tags: string[], viewId: string }): Promise<void> Add tags to a view.  
addTimeline(args: { name?: string, owner?: string, timeline: RenderSchedule.ScriptProps }): Promise<string> Add a render timeline to a ViewStore.  
addView(args: ViewStoreRpc.AddViewArgs): Promise<string> Add a view to a ViewStore.  
addViewGroup(args: { name: string, owner?: string, parentId?: string }): Promise<string> Add a view group to a ViewStore.  
changeDefaultViewId(args: { defaultView: string, group?: string }): Promise<void> Change the default view for a view group.  
deleteCategorySelector(args: { id: string }): Promise<void> Delete a category selector from a ViewStore.  
deleteDisplayStyle(args: { id: string }): Promise<void> Delete a display style from a ViewStore.  
deleteModelSelector(args: { id: string }): Promise<void> Delete a model selector from a ViewStore.  
deleteTag(args: { name: string }): Promise<void> Delete a tag.  
deleteThumbnail(args: { viewId: string }): Promise<void> Delete the thumbnail for a view.  
deleteTimeline(args: { id: string }): Promise<void> Delete a render timeline from a ViewStore.  
deleteView(args: { viewId: string }): Promise<void> Delete a view from a ViewStore.  
deleteViewGroup(args: { name: string }): Promise<void> Delete a view group from a ViewStore.  
removeTagFromView(args: { tag: string, viewId: string }): Promise<void> remove a tag from a view.  
renameCategorySelector(args: { id: string, name?: string }): Promise<void> Set the name of a category selector.  
renameDisplayStyle(args: { id: string, name?: string }): Promise<void> Set the name of a display style.  
renameModelSelector(args: { id: string, name?: string }): Promise<void> Set the name of a model selector.  
renameTag(args: { newName: string, oldName: string }): Promise<void> rename an existing tag.  
renameTimeline(args: { id: string, name?: string }): Promise<void> Set the name of a render timeline.  
renameView(args: { name: string, viewId: string }): Promise<void> Set the name of a view.  
renameViewGroup(args: { groupId: string, name: string }): Promise<void> Set the name of a view group.  
updateCategorySelector(args: ViewStoreRpc.NameOrId & { selector: ViewStoreRpc.SelectorProps }): Promise<void> Update the properties of a category selector.  
updateDisplayStyle(args: ViewStoreRpc.NameOrId & { className: string, settings: DisplayStyleSettingsProps }): Promise<void> Update the properties of a display style.  
updateModelSelector(args: ViewStoreRpc.NameOrId & { selector: ViewStoreRpc.SelectorProps }): Promise<void> Update the properties of a model selector.  
updateTimeline(args: ViewStoreRpc.NameOrId & { timeline: RenderSchedule.ScriptProps }): Promise<void> Update the properties of a render timeline.  
updateViewDefinition(args: { viewDefinition: ViewDefinitionProps, viewId: string }): Promise<void> Update the properties of a view definition.  
updateViewShared(arg: { isShared: boolean, owner?: string, viewId: string }): Promise<void> Change a view from shared to private, or vice versa.  

Defined in

Last Updated: 17 May, 2024