package webextension_polyfill.bookmarks; typedef Static = { /** Retrieves the specified BookmarkTreeNode(s). **/ function get(idOrIdList:ts.AnyOf2>):js.lib.Promise>; /** Retrieves the children of the specified BookmarkTreeNode id. **/ function getChildren(id:String):js.lib.Promise>; /** Retrieves the recently added bookmarks. **/ function getRecent(numberOfItems:Float):js.lib.Promise>; /** Retrieves the entire Bookmarks hierarchy. **/ function getTree():js.lib.Promise>; /** Retrieves part of the Bookmarks hierarchy, starting at the specified node. **/ function getSubTree(id:String):js.lib.Promise>; /** Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties. **/ function search(query:ts.AnyOf2):js.lib.Promise>; /** Creates a bookmark or folder under the specified parentId. If url is NULL or missing, it will be a folder. **/ function create(bookmark:CreateDetails):js.lib.Promise; /** Moves the specified BookmarkTreeNode to the provided location. **/ function move(id:String, destination:MoveDestinationType):js.lib.Promise; /** Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. Note: Currently, only 'title' and 'url' are supported. **/ function update(id:String, changes:UpdateChangesType):js.lib.Promise; /** Removes a bookmark or an empty bookmark folder. **/ function remove(id:String):js.lib.Promise; /** Recursively removes a bookmark folder. **/ function removeTree(id:String):js.lib.Promise; /** Fired when a bookmark or folder is created. **/ var onCreated : webextension_polyfill.events.Event<(id:String, bookmark:BookmarkTreeNode) -> Void>; /** Fired when a bookmark or folder is removed. When a folder is removed recursively, a single notification is fired for the folder, and none for its contents. **/ var onRemoved : webextension_polyfill.events.Event<(id:String, removeInfo:OnRemovedRemoveInfoType) -> Void>; /** Fired when a bookmark or folder changes. Note: Currently, only title and url changes trigger this. **/ var onChanged : webextension_polyfill.events.Event<(id:String, changeInfo:OnChangedChangeInfoType) -> Void>; /** Fired when a bookmark or folder is moved to a different parent folder. **/ var onMoved : webextension_polyfill.events.Event<(id:String, moveInfo:OnMovedMoveInfoType) -> Void>; };