/**
 * Protocol-aware repository factory.
 *
 * `repository()` takes a `TypedWeb5` instance and returns a Proxy-backed
 * object whose shape mirrors the protocol's `structure` tree with
 * ergonomic CRUD methods on each node.
 *
 * - **Collections** (default): `create`, `query`, `get`, `delete`, `subscribe`
 * - **Singletons** (`$recordLimit: { max: 1 }`): `set`, `get`, `delete`
 * - **Nested types**: first argument is `parentContextId`
 * - **`configure()`**: idempotent protocol installation
 *
 * @example
 * ```ts
 * const social = repository(web5.using(SocialGraphProtocol));
 * await social.configure();
 *
 * // Root collection
 * const { record } = await social.friend.create({
 *   data: { did: 'did:example:alice' },
 * });
 *
 * // Nested under group
 * const members = await social.group.member.query(groupContextId);
 * ```
 *
 * @module
 */
import type { Repository } from './repository-types.js';
import type { SchemaMap } from './protocol-types.js';
import type { TypedWeb5 } from './typed-web5.js';
import type { ProtocolDefinition } from '@enbox/dwn-sdk-js';
/**
 * Creates a protocol-aware repository from a `TypedWeb5` instance.
 *
 * The returned object provides domain-specific CRUD methods that mirror
 * the protocol's structure tree:
 *
 * - Root types: `repo.friend.create()`, `repo.friend.query()`
 * - Nested types: `repo.group.member.create(groupCtxId, { data })`
 * - Singletons: `repo.profile.set()`, `repo.profile.get()`
 * - Protocol install: `repo.configure()`
 *
 * @param typed - A `TypedWeb5` instance from `web5.using(protocol)`.
 * @returns A typed repository object.
 *
 * @example
 * ```ts
 * const social = repository(web5.using(SocialGraphProtocol));
 * await social.configure();
 *
 * const rec = await social.friend.create({
 *   data: { did: 'did:example:alice' },
 * });
 * const friends = await social.friend.query();
 * ```
 */
export declare function repository<D extends ProtocolDefinition, M extends SchemaMap>(typed: TypedWeb5<D, M>): Repository<D, M>;
//# sourceMappingURL=repository.d.ts.map