import type { APIEndpoints } from './types';
import type { ApiClient } from './request';
import type { BlockListItem } from './types';
export { blocksKeys } from './blocksKeys';
type SaveBlockContentResponse = NonNullable<APIEndpoints['saveBlockContent']['response']>;
type SaveBlockContentData = NonNullable<APIEndpoints['saveBlockContent']['body']>;
type SaveBlockContentFullBody = Extract<SaveBlockContentData, {
    data: unknown;
}>;
type SaveBlockContentPatchBody = Extract<SaveBlockContentData, {
    path: string;
    value: unknown;
}>;
type CreateBlockResponse = NonNullable<APIEndpoints['createBlock']['response']>;
type CreateBlockBody = NonNullable<APIEndpoints['createBlock']['body']>;
type CreateBlockOptions = {
    siteId: string;
    pageId: string;
    kind: CreateBlockBody['kind'];
    position?: CreateBlockBody['position'];
    purpose?: CreateBlockBody['purpose'];
    duplicatedFromBlockId?: CreateBlockBody['duplicatedFromBlockId'];
    options?: RequestInit;
};
type ReorderBlocksResponse = NonNullable<APIEndpoints['reorderBlocks']['response']>;
type ReorderBlocksBody = NonNullable<APIEndpoints['reorderBlocks']['body']>;
type ReorderBlocksOptions = {
    siteId: string;
    pageId: string;
    blockIds: ReorderBlocksBody['blockIds'];
    options?: RequestInit;
};
export declare function createBlock(apiClient: ApiClient, { siteId, pageId, kind, position, purpose, duplicatedFromBlockId, options }: CreateBlockOptions): Promise<CreateBlockResponse>;
export declare function reorderBlocks(apiClient: ApiClient, { siteId, pageId, blockIds, options }: ReorderBlocksOptions): Promise<ReorderBlocksResponse>;
type DeleteBlockResponse = NonNullable<APIEndpoints['deleteBlock']['response']>;
type DeleteBlockOptions = {
    siteId: string;
    pageId: string;
    blockId: string;
    options?: RequestInit;
};
export declare function deleteBlock(apiClient: ApiClient, { siteId, pageId, blockId, options }: DeleteBlockOptions): Promise<DeleteBlockResponse>;
export declare function listBlocks(apiClient: ApiClient, { siteId, pageId, options }: {
    siteId: string;
    pageId: string;
    options?: RequestInit;
}): Promise<{
    blocks: BlockListItem[];
}>;
type MutateBlockArgs = ({
    siteId: string;
    blockId: string;
} & {
    data: SaveBlockContentFullBody['data'];
    optimisticHash?: string | null;
    options?: RequestInit;
}) | ({
    siteId: string;
    blockId: string;
} & {
    path: SaveBlockContentPatchBody['path'];
    value: SaveBlockContentPatchBody['value'];
    optimisticHash?: string | null;
    options?: RequestInit;
});
export declare function mutateBlockContent(apiClient: ApiClient, args: MutateBlockArgs): Promise<SaveBlockContentResponse>;
