// This file is automatically generated, so please do not edit it. // @generated by `flutter_rust_bridge`@ 2.13.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import import '../frb_generated.dart'; import 'dto.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; // These functions are ignored because they are not marked as `pub`: `asset_dto`, `lock`, `outline`, `page_view`, `parse_date`, `parse_day`, `parse_id` // These functions are ignored (category: IgnoreBecauseExplicitAttribute): `shared` // Rust type: RustOpaqueMoi> abstract class SynapseGraph implements RustOpaqueInterface { Future addAlias({required String pageId, required String alias}); Future addPageTag({required String pageId, required String tag}); Future addPageType({required String pageId, required String ty}); /// Puts a page in a hub (no-op when it already is). Fails for journals, non-hub targets, /// the hub itself and memberships that would create a cycle. Future addToHub({required String pageId, required String hubId}); Future> aliases({required String pageId}); /// Local file path of an asset (for `asset://` images), if present. String? assetPath({required String hash}); /// Linked references grouped by page (most recently edited first). Future> backlinks({required String pageId}); /// Target of a `((block ref))`. Future blockRef({required String id}); /// Turns a note into a hub in one transaction: renames it to `title` (links rewritten), /// moves its outline to a new note `keep_outline_as` (or deletes it when `None`; a blank title is an error), sets the /// description and adds `member_ids` (invalid members are skipped). Future convertToHub({ required String pageId, required String title, required String description, required List memberIds, String? keepOutlineAs, }); /// Turns a hub back into a note: description, then one `[[Member]]` block per member. Future convertToNote({required String pageId}); /// Creates an empty hub. Fails when the title is taken. Future createHub({ required String title, required String description, }); /// Creates a note in the hub, starting from a copy of the hub's template. Future createPageFromTemplate({ required String hubId, required String title, }); /// Deletes a block and its subtree. Future> deleteBlock({required String id}); Future deletePage({required String id}); /// Graph directory. String dir(); /// The whole page-level graph (journals included; the UI filters). Cached until the /// graph changes. Future graphData(); /// Defaults for converting a note into a hub. Future hubConversionPreview({required String pageId}); /// Id of the hub's template page (created empty when missing). Open it like any note to /// edit the outline new notes of the hub start from. Future hubTemplate({required String hubId}); /// Every hub with its members, and the root hubs. Future hubs(); /// Tab: the block becomes the last child of its previous sibling (no-op for a first child). Future> indentBlock({required String id}); Future insertBlock({ required String pageId, required Place place, required String content, }); /// The journal of `date` (created if missing). Future journal({required String date}); Future<(String?, String?)> journalNeighbors({required String date}); /// Journals feed, newest first. With `before = None` it starts at today (creating today's /// journal); otherwise at the newest journal strictly before `before`. Future> journals({String? before, required int limit}); /// Pages that are probably leftovers of Logseq: its built-ins and pages with /// `type:: system`. Only the organisational files (`contents`, `card`, `favorites`, /// `hls__*`) and empty pages are preselected, and never a hub: a built-in title such as /// `todo` may hold real content. Future> legacyCandidates(); /// Pages ordered by last update, most recent first. Future> listPages({ required bool includeJournals, required int limit, required int offset, }); /// Backspace at the start of `id`: its text is appended to `into` (the previous visible /// block) and the block is deleted. Its children keep their visual place: they take the /// block's slot when `into` is its parent, otherwise they become last children of `into`. Future> mergeBlock({required String id, required String into}); /// Moves a block with its subtree (drag and drop), possibly to another page. Future> moveBlock({ required String id, required String pageId, required Place place, }); /// Opens (or creates) the graph stored in `dir`. static Future open({required String dir}) => RustLib.instance.api.crateApiGraphSynapseGraphOpen(dir: dir); /// Page by title or alias, created if missing (following a `[[link]]`). Date titles open /// the journal of that day. Future openPage({required String title}); /// Shift-Tab: the block moves right after its parent, adopting its following siblings as /// children so it keeps its visual place (Logseq's default outdenting). Future> outdentBlock({required String id}); /// Current outline of a page. Future> outline({required String pageId}); Future page({required String id}); /// Page by title or alias, without creating it. Future pageByTitle({required String title}); /// Hub and namespace context of a page. Future pageStructure({required String pageId}); /// Pages carrying a tag, most recently updated first. Future> pagesWithTag({required String tag}); /// Deletes pages and their blocks in one transaction. Returns how many existed. Future purgePages({required List ids}); /// Stores in-memory bytes (clipboard, Android content URIs). Future putAssetBytes({ required List bytes, String? name, String? mime, }); /// Copies a file into the blob store (streamed). Future putAssetFile({required String path, String? mime}); /// Records navigation between pages (strengthens their synapse). Future recordVisit({String? from, required String to}); /// Notes related to `page_id` by spreading activation. Future> related({ required String pageId, required int limit, }); Future removeAlias({required String alias}); /// Takes a page out of a hub (no-op when it is not in it). Future removeFromHub({required String pageId, required String hubId}); Future removePageTag({required String pageId, required String tag}); Future removePageType({required String pageId, required String ty}); Future renamePage({required String id, required String newTitle}); /// Blocks whose text contains `query` (for `((` autocomplete), most recent first. Future> searchBlocks({ required String query, required int limit, }); /// Page titles and aliases matching `query`: exact, then prefix, then word-prefix, then /// substring; shorter titles first within a tier. Empty query returns recent pages. Future> searchTitles({ required String query, required int limit, }); Future setCollapsed({required String id, required bool collapsed}); Future setHubDescription({ required String hubId, required String description, }); /// Replaces the tags of a page (each title gets a tag page if it has none). Journals, /// templates and tag pages cannot be tagged. Future setPageTags({ required String pageId, required List tags, }); /// Replaces the types of a page. Journals and templates cannot be typed. Future setPageTypes({ required String pageId, required List types, }); /// Every tag page with its number of pages, most used first. Future> tagCatalog(); /// Timeline data for `[from, to]` (oldest first) with titles of every page it mentions. Future timeline({required String from, required String to}); /// Today's date (graph clock) as `YYYY-MM-DD`. String today(); /// Types in use (most used first) followed by the seeded suggestions not used yet. Future> typeCatalog(); /// Replaces a block's Markdown (the debounced save while typing). Future updateBlock({required String id, required String content}); }