import type { UnlockedKeyring } from '../../with-party/team/keyring.js'; import type { ExportFormat } from '../../kernel/types.js'; /** * Authorize an `@noy-db/as-*` export against the keyring's `exportCapability`. * Throws `ExportCapabilityError` if the keyring is not authorised. * * - plaintext tier requires a `format`; defaults to empty for every role. * - bundle tier defaults to on for owner/admin, off for others. */ export declare function assertCanExport(keyring: UnlockedKeyring, tier: 'plaintext' | 'bundle', format?: ExportFormat): void; /** * Authorize an `@noy-db/as-*` import against the keyring's `importCapability`. * Throws `ImportCapabilityError` if the keyring is not authorised. * * - plaintext tier requires a `format`; default-closed for every role. * - bundle tier is default-closed for every role, including owner — import is * more dangerous than export (corrupts vs leaks). */ export declare function assertCanImport(keyring: UnlockedKeyring, tier: 'plaintext' | 'bundle', format?: ExportFormat): void; /** * Read-only accessor for the keyring's export capability, with role-based * defaults resolved. Useful for UI affordances (grey out the export button if * no capability) without throwing. */ export declare function canExport(keyring: UnlockedKeyring, tier: 'plaintext' | 'bundle', format?: ExportFormat): boolean; /** * Read-only accessor for the keyring's import capability. UI affordance — * returns false in every default-closed case (every role with no explicit * `importCapability` grant). */ export declare function canImport(keyring: UnlockedKeyring, tier: 'plaintext' | 'bundle', format?: ExportFormat): boolean;