import { AuthorMarker, BlockOutputsBase, BlockState, NavigationState, ResultOrError, ValueWithUTag, ValueWithUTagAndAuthor } from "@milaboratories/pl-model-common"; import { Operation } from "fast-json-patch"; /** Defines methods to read and write current block data. */ export interface BlockApiV2 { /** * Use this method to retrieve block state during UI initialization. Then use * {@link onStateUpdates} method to subscribe for updates. * */ loadBlockState(): Promise>>>; /** * Get all json patches (rfc6902) that were applied to the block state. * */ getPatches(uTag: string): Promise>>; /** * Sets block args. * * This method returns when corresponding arguments are safely saved so in * case the window is closed there will be no information losses. This * function under the hood may delay actual persistence of the supplied * arguments. * */ setBlockArgs(args: Args, author?: AuthorMarker): Promise>; /** * Sets block ui state. * * This method returns when corresponding arguments are safely saved so in * case the window is closed there will be no information losses. This * function under the hood may delay actual persistence of the supplied * values. * */ setBlockUiState(state: UiState, author?: AuthorMarker): Promise>; /** * Sets block args and ui state. * * This method returns when corresponding arguments are safely saved so in * case the window is closed there will be no information losses. This * function under the hood may delay actual persistence of the supplied * values. * */ setBlockArgsAndUiState(args: Args, state: UiState, author?: AuthorMarker): Promise>; /** * Sets block navigation state. * */ setNavigationState(state: NavigationState): Promise>; /** * Disposes the block API. * */ dispose(): Promise>; } //# sourceMappingURL=block_api_v2.d.ts.map