import { type Flow } from '@equinor/fusion-observable'; import { type BookmarkActions } from './BookmarkProvider.actions'; import type { IBookmarkClient } from './BookmarkClient.interface'; import type { BookmarkState } from './BookmarkProvider.store'; /** * Handles the fetch bookmark action by making an API request to get the bookmark by its ID. * * @param api - The bookmark client API. * @returns A flow that handles the fetch bookmark action. */ export declare const handleFetchBookmark: (api: IBookmarkClient) => Flow; /** * Creates a flow for handling fetching bookmark data. * * @param api - The bookmark client API. * @returns A flow of bookmark actions. */ export declare const handleFetchBookmarkData: (api: IBookmarkClient) => Flow; /** * Creates a Flow for handling fetching users bookmarks. * * @param api - The bookmark API client to use for fetching bookmarks. * @param options - Optional configuration options, including a `throttle` value in milliseconds. * @returns An observable that emits the result of the bookmark fetch operation. */ export declare const handleFetchAllBookmark: (api: IBookmarkClient) => Flow; /** * Creates a Flow for handling creating bookmarks. * * @param api - An instance of the `IBookmarkClient` interface, which provides the necessary API methods for creating bookmarks. * @returns A flow that listens for `createBookmark` actions, creates a new bookmark using the provided API. */ export declare const handleCreateBookmark: (api: IBookmarkClient) => Flow; /** * Creates a Flow for handling updating bookmarks. * * @param api - An instance of the `IBookmarkClient` interface, which provides the necessary API methods for updating bookmarks. * @returns A flow that listens for `updateBookmark` actions, updates the bookmark using the provided API. */ export declare const handleUpdateBookmark: (api: IBookmarkClient) => Flow; /** * Creates a flow for handling deleting bookmarks. * * @param api - An instance of the `IBookmarkClient` interface, which provides the necessary API methods for deleting bookmarks. * @returns A flow that listens for `deleteBookmark` actions, deletes the bookmark using the provided API. */ export declare const handleDeleteBookmark: (api: IBookmarkClient) => Flow; /** * Creates a Flow for handling deleting bookmarks. * * @param api - An instance of the `IBookmarkClient` interface, which provides the necessary API methods for managing favorite bookmarks. * @returns A flow that listens for `removeBookmarkAsFavorite` actions, removes the bookmark from the user's favorites using the provided API. */ export declare const handleRemoveBookmarkFromFavorites: (api: IBookmarkClient) => Flow; /** * Handles the flow of adding a bookmark as a favorite. * * @param api - The `IBookmarkClient` API instance to use for interacting with bookmarks. * @returns An RxJS `Flow` that handles the `addBookmarkAsFavourite` action. */ export declare const handleAddBookmarkAsFavorite: (api: IBookmarkClient) => Flow; /** * Creates a flow for handling bookmark removal. * * This function observes actions related to deleting a bookmark or removing a bookmark as a favorite, and dispatches the appropriate actions for each case. * If the bookmark is currently a favorite, it will dispatch an action to remove it as a favorite. * If the bookmark is not a favorite, it will dispatch an action to delete it. * * @param api - An instance of the `IBookmarkClient` interface, which provides the necessary API methods checking if bookmarks are favorites. * @returns A flow that handles the removal of a bookmark. */ export declare const handleRemoveBookmark: (api: IBookmarkClient) => Flow; /** * Defines a set of flows that handle various bookmark-related actions, such as fetching, creating, updating, and deleting bookmarks. * * @param api - An instance of `IBookmarkClient` that provides the necessary API methods for interacting with the bookmark service. * @returns A combined flow that handles all the bookmark-related actions. */ export declare const bookmarkApiFlows: (api: IBookmarkClient) => Flow;