/** * @since 4.0.0 */ import * as Context from "../../Context.ts"; import * as Duration from "../../Duration.ts"; import * as Effect from "../../Effect.ts"; import * as Layer from "../../Layer.ts"; import type { ReadonlyRecord } from "../../Record.ts"; import type { Scope } from "../../Scope.ts"; import type { NoInfer } from "../../Types.ts"; import * as Headers from "../http/Headers.ts"; import type * as Rpc from "../rpc/Rpc.ts"; import * as RpcClient from "../rpc/RpcClient.ts"; import { RpcClientError } from "../rpc/RpcClientError.ts"; import type * as RpcGroup from "../rpc/RpcGroup.ts"; import type { RequestId } from "../rpc/RpcMessage.ts"; import * as RpcSchema from "../rpc/RpcSchema.ts"; import * as AsyncResult from "./AsyncResult.ts"; import * as Atom from "./Atom.ts"; /** * @since 4.0.0 * @category Models */ export interface AtomRpcClient extends Context.Service> { new (_: never): Context.ServiceClass.Shape>; readonly runtime: Atom.AtomRuntime; readonly mutation: >(arg: Tag) => Rpc.ExtractTag extends Rpc.Rpc ? [_Success] extends [RpcSchema.Stream] ? never : Atom.AtomResultFn<{ readonly payload: Rpc.PayloadConstructor>; readonly reactivityKeys?: ReadonlyArray | ReadonlyRecord> | undefined; readonly headers?: Headers.Input | undefined; }, _Success["Type"], _Error["Type"] | RpcClientError | _Middleware["error"]["Type"]> : never; readonly query: >(tag: Tag, payload: Rpc.PayloadConstructor>, options?: { readonly headers?: Headers.Input | undefined; readonly reactivityKeys?: ReadonlyArray | ReadonlyRecord> | undefined; readonly timeToLive?: Duration.Input | undefined; readonly serializationKey?: string | undefined; }) => Rpc.ExtractTag extends Rpc.Rpc ? [_Success] extends [RpcSchema.Stream] ? Atom.Writable, void> : Atom.Atom> : never; } declare global { interface ErrorConstructor { stackTraceLimit: number; } } /** * @since 4.0.0 * @category Constructors */ export declare const Service: () => > | Rpc.ServicesClient>>(id: Id, options: { readonly group: RpcGroup.RpcGroup; readonly protocol: Layer.Layer, Scope>, ER> | ((get: Atom.AtomContext) => Layer.Layer, Scope>, ER>); readonly spanPrefix?: string | undefined; readonly spanAttributes?: Record | undefined; readonly generateRequestId?: (() => RequestId) | undefined; readonly disableTracing?: boolean | undefined; readonly makeEffect?: Effect.Effect, never, RM> | undefined; readonly runtime?: Atom.RuntimeFactory | undefined; }) => AtomRpcClient; //# sourceMappingURL=AtomRpc.d.ts.map