import type { MethodRegistry } from '@kokuin/token'; import type { StoreProvider } from '@kubun/db'; import type { CatalogDraftState, CatalogVersionPayload } from '@kubun/store-graph'; export type OwnerCatalogAncestry = ReadonlyMap; export type ChooseCatalogCommonAncestorParams = { leftVersionID: string; rightVersionID: string; ancestry: OwnerCatalogAncestry; }; export declare function chooseCatalogCommonAncestor(params: ChooseCatalogCommonAncestorParams): string | null; export type LoadOwnerCatalogAncestryParams = { provider: StoreProvider; catalogID: string; methods: MethodRegistry | undefined; }; export type OwnerCatalogAncestryPageParams = LoadOwnerCatalogAncestryParams & { first: number; after?: string; viewer: string; }; export declare class OwnerCatalogAncestryPageError extends Error { constructor(options?: ErrorOptions); } export declare function pageOwnerCatalogAncestry(params: OwnerCatalogAncestryPageParams): Promise<{ edges: { cursor: string; versionID: string; payload: CatalogVersionPayload; }[]; pageInfo: { endCursor: string | null; hasNextPage: boolean; }; }>; /** Only locally admitted owner history supplies merge inputs. */ export declare function loadOwnerCatalogAncestry(params: LoadOwnerCatalogAncestryParams): Promise; export type ReconcileOwnerCatalogBranchesParams = { provider: StoreProvider; catalogID: string; winningHeadVersionID: string; ancestry: OwnerCatalogAncestry; }; export declare function reconcileOwnerCatalogBranches(params: ReconcileOwnerCatalogBranchesParams): Promise;