import { encodeSegment, type WritebackResult } from '@relayfile/adapter-core/vfs-client'; import { type WritebackProvider, type WritebackResource } from '@relayfile/adapter-core/writeback-paths'; import { type RelayClientOptions } from './transport.js'; export type RelayParams = Record; /** * A catalog-backed client for one provider. Every path comes from * `@relayfile/adapter-core/writeback-paths` (the adapter-owned source of * truth), so handlers never hardcode `/linear/issues/...` strings that drift * from the adapter. Works for any provider in the catalog; the * `linearClient` / `githubClient` / `slackClient` factories wrap this with * named, ergonomic methods. */ export interface RelayClient

{ readonly provider: P; /** Resolve a resource's canonical mount path (no IO). */ path(resource: WritebackResource

& string, params?: RelayParams): string; /** * Write `body`. For a collection resource (e.g. `/linear/issues/{id}/comments`) * this drops a uniquely-named draft the Relayfile writeback worker turns into * the create call. For an item resource (a path ending in `.json`, e.g. * `…/pulls/{n}/merge.json`) this writes the body to that exact path. */ write(resource: WritebackResource

& string, params: RelayParams, body: unknown): Promise; /** Read a single item resource (a `.json` path). */ read(resource: WritebackResource

& string, params?: RelayParams): Promise; /** List the records of a collection resource. */ list(resource: WritebackResource

& string, params?: RelayParams): Promise; } /** * Build a {@link RelayClient} for `provider`. `opts` (mount root, writeback * timeout, …) is bound once and reused by every method; it defaults to the * ambient sandbox mount-root env, so `relayClient('linear')` is enough inside * a sandbox handler. */ export declare function relayClient

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

; /** Re-exported so callers can build item-read paths (`${collection}/${id}.json`). */ export { encodeSegment, type RelayClientOptions, type WritebackResult }; //# sourceMappingURL=generic.d.ts.map