import type { WritebackResult } from '@relayfile/adapter-core/vfs-client'; import { type WritebackProvider, type WritebackResource } from '@relayfile/adapter-core/writeback-paths'; import { type RelayParams } from './generic.js'; import type { RelayClientOptions } from './transport.js'; /** * One resource of a provider, bound to a client. Every path is resolved from * the writeback-path catalog. */ export interface ResourceClient { /** Resolve this resource's canonical mount path (no IO). */ path(params?: RelayParams): string; /** * Write `body`: a uniquely-named draft for a collection resource, or a direct * write for an item (`.json`) resource. The writeback worker materializes the * draft into the real provider call. */ write(params: RelayParams, body: unknown): Promise; /** Read a single item resource (a `.json` path). */ read(params?: RelayParams): Promise; /** List the records of a collection resource. */ list(params?: RelayParams): Promise; } /** A provider client: one {@link ResourceClient} per catalog resource. */ export type ProviderClient

= { readonly [R in WritebackResource

& string]: ResourceClient; }; /** * Build a resource-keyed client for any provider in the catalog. The mount * root / writeback options are bound once and shared by every resource. * * @example * const notion = providerClient('notion'); * await notion.pages.write({ databaseId }, { ... }); * await notion.comments.path({ databaseId, pageId }); */ export declare function providerClient

(provider: P, opts?: RelayClientOptions): ProviderClient

; //# sourceMappingURL=provider-client.d.ts.map