/*! * Copyright (c) 2026 Interop Alliance. All rights reserved. */ /** * The app-side seam between the generic sync adapter and `@interop/was-client`. * Delegates to the client's own `createWasSyncPort` -- which owns the WAS URL * grammar, the verbatim (codec-bypassing) `was.request()` writes, the `changes` * feed pull, the key-epoch header, and the conditional-write ETag handling -- * and pins the two options this package needs: the collection's delegated * capability, and `mapAuthErrors` so a `401` / `403` / the server's masked `404` * arrive as a `WasSyncAuthError` the sync controller can `instanceof`-match. * * What stays here is the narrowing to a {@link WasSyncBasePort}: the 412 * conflict re-read (`get`) is supplied separately by `withFeedMasterRead`, which * resolves the master state from the changes-feed BODY -- origin-independent, * unlike a cross-origin `GET` whose ETag header CORS hides. */ import type { WasClient } from '@interop/was-client'; import type { IZcap } from '@interop/data-integrity-core'; import type { WasSyncBasePort } from './types.js'; /** * Builds a `WasSyncBasePort` bound to a single Space + Collection on the remote * WAS server, backed by the session's signed `WasClient`. * * @param options {object} * @param options.was {WasClient} the session client (holds the signer) * @param options.spaceId {string} * @param options.collectionId {string} the WAS collection id (e.g. `public-credentials`) * @param [options.capability] {IZcap} the delegated session capability for * this collection (a restored `delegated` tier session); absent in the full * tier, where requests invoke root capabilities * @returns {WasSyncBasePort} */ export declare function createWasSyncPort({ was, spaceId, collectionId, capability }: { was: WasClient; spaceId: string; collectionId: string; capability?: IZcap; }): WasSyncBasePort; //# sourceMappingURL=wasSyncPort.d.ts.map