import { type RequestedServices, type ServicesRequest } from '@conduit-client/service-provisioner/v1'; import type { Command } from '@conduit-client/command-base/v1'; import type { Result, SyncOrAsync, SubscribableResult, Callback, IInternalError, IUserVisibleError, ServiceDescriptor } from '@conduit-client/utils'; export type ResultOrSubscribableResult = Result | SubscribableResult; export type MaybeSubscribableResultCommand = Command>>; export type SubscribableResultCommand = []> = Command>, Params>; export type ResultCommand = Command>>; export declare function isInternalError(error: unknown): error is IInternalError; export declare function isUserVisibleError(error: unknown): error is IUserVisibleError; export declare function throwUserlandError(error: unknown): never; export declare function emitError(callback: Callback<{ data: undefined; error: Error; }>, error: unknown): void; export declare function buildUserlandError(error: unknown): Error; /** * Unwraps a UserVisibleError to its underlying `.data` payload (e.g. a * FetchResponse carrying status/body), while passing every other error through * unchanged via {@link toError}. * * This is the imperative-bindings counterpart to {@link buildUserlandError}. * Wire adapters mask unexpected errors behind a generic message (see * `buildUserlandError`); the imperative surface instead preserves the original * error so HTTP consumers keep the raw `Error(statusText)` / network-failure * message that the transport-error-shape-parity ADR documents as the default * contract. The only behavior change from the historical `toError(...)` path is * that a UserVisibleError is now unwrapped to its actionable `.data` instead of * leaking the empty-message wrapper. */ export declare function unwrapUserlandError(error: unknown): Error; export declare function throwUnwrappedUserlandError(error: unknown): never; export declare function logError(error: unknown): void; export type InitBindingsExportsArgs>> = { serviceRequirements: Req; init: (services: RequestedServices) => void; timeout?: number; }; /** * Bootstraps adapter bindings by requesting services from the service provisioner and * invoking the initializer once all services are available. */ export declare function initBindingsExports>>(args: InitBindingsExportsArgs): void;