import type { Identity, MethodRegistry } from '@kokuin/token'; import type { StoreProvider } from '@kubun/db'; import type { CatalogUpstreamLookup } from '@kubun/graphql'; import type { CatalogHeadPayload } from '@kubun/store-graph'; import type { Runtime } from '@sozai/runtime'; import type { AccessChecker } from './access-control.js'; import type { CustodyAuthority } from './plugin.js'; export type CatalogListing = { id: string; app: string | null; name: string; deletedAt: string | null; catalog: (CatalogHeadPayload & { id: string; }) | null; }; export type CatalogAPIDeps = { provider: StoreProvider; identity: Identity; viewerDID: string; runtime: Runtime; nextDecisionHLC: (after: ReadonlyArray) => string; resolveController: (provider: StoreProvider, did: string) => Promise; methodsFor: (provider: StoreProvider) => MethodRegistry | undefined; upstreamLookup?: CatalogUpstreamLookup; lookupFor?: (provider: StoreProvider) => CatalogUpstreamLookup | undefined; accessChecker: AccessChecker; /** The own-agents view custody is decided against; absent without the p2p plugin. */ custodyAuthorityFor?: (provider: StoreProvider) => CustodyAuthority | undefined; /** Called after this device's custody assignment commits, so it can replicate promptly. */ onCustodyAssigned?: (custodyOwner: string) => void; /** Called after a level change commits: an assignment may now be acceptable. */ onDeviceLevelChanged?: () => void; /** Called after this device's custody opt-in commits. */ onCustodyEligibilityChanged?: () => void; /** Called after a hold is placed, so a wake can be set for its expiry. */ onHoldPlaced?: () => void; /** Rejects a local rule change that takes a routed catalog past its limits. */ validateRuleWrite?: (provider: StoreProvider, catalog: { owner: string; id: string; }) => Promise; }; export declare class CatalogNotFoundError extends Error { constructor(); }