import type { BlockOutputsBase, BlockState } from "@milaboratories/pl-model-common"; /** Patch for the structural object */ export type Patch = { /** Field name to patch */ readonly key: K; /** New value for the field */ readonly value: V; }; /** Creates union type of all possible shallow patches for the given structure */ export type Unionize> = { [K in keyof T]: Patch; }[keyof T]; /** Patch for the BlockState, pushed by onStateUpdates method in SDK. */ export type BlockStatePatch< Args = unknown, Outputs extends BlockOutputsBase = BlockOutputsBase, UiState = unknown, Href extends `/${string}` = `/${string}`, > = Unionize>;