/** * @since 1.0.0 */ import * as Rpc from "@effect/rpc/Rpc"; import type { Context } from "effect/Context"; import * as Effect from "effect/Effect"; import * as Option from "effect/Option"; import type { PersistenceError } from "./ClusterError.js"; import { MalformedMessage } from "./ClusterError.js"; import type { EntityAddress } from "./EntityAddress.js"; import * as Envelope from "./Envelope.js"; import type * as Reply from "./Reply.js"; import type { Snowflake } from "./Snowflake.js"; /** * @since 1.0.0 * @category incoming */ export type Incoming = IncomingRequest | IncomingEnvelope; /** * @since 1.0.0 * @category incoming */ export type IncomingLocal = IncomingRequestLocal | IncomingEnvelope; /** * @since 1.0.0 * @category incoming */ export declare const incomingLocalFromOutgoing: (self: Outgoing) => IncomingLocal; declare const IncomingRequest_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Readonly & { readonly _tag: "IncomingRequest"; }; /** * @since 1.0.0 * @category incoming */ export declare class IncomingRequest extends IncomingRequest_base<{ readonly envelope: Envelope.Request.PartialEncoded; readonly lastSentReply: Option.Option>; readonly respond: (reply: Reply.ReplyWithContext) => Effect.Effect; }> { } declare const IncomingRequestLocal_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Readonly & { readonly _tag: "IncomingRequestLocal"; }; /** * @since 1.0.0 * @category outgoing */ export declare class IncomingRequestLocal extends IncomingRequestLocal_base<{ readonly envelope: Envelope.Request; readonly lastSentReply: Option.Option>; readonly respond: (reply: Reply.Reply) => Effect.Effect; }> { } declare const IncomingEnvelope_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Readonly & { readonly _tag: "IncomingEnvelope"; }; /** * @since 1.0.0 * @category incoming */ export declare class IncomingEnvelope extends IncomingEnvelope_base<{ readonly _tag: "IncomingEnvelope"; readonly envelope: Envelope.AckChunk | Envelope.Interrupt; }> { } /** * @since 1.0.0 * @category outgoing */ export type Outgoing = OutgoingRequest | OutgoingEnvelope; declare const OutgoingRequest_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Readonly & { readonly _tag: "OutgoingRequest"; }; /** * @since 1.0.0 * @category outgoing */ export declare class OutgoingRequest extends OutgoingRequest_base<{ readonly envelope: Envelope.Request; readonly context: Context>; readonly lastReceivedReply: Option.Option>; readonly rpc: R; readonly respond: (reply: Reply.Reply) => Effect.Effect; }> { /** * @since 1.0.0 */ encodedCache?: Envelope.Request.PartialEncoded; } declare const OutgoingEnvelope_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Readonly & { readonly _tag: "OutgoingEnvelope"; }; /** * @since 1.0.0 * @category outgoing */ export declare class OutgoingEnvelope extends OutgoingEnvelope_base<{ readonly envelope: Envelope.AckChunk | Envelope.Interrupt; readonly rpc: Rpc.AnyWithProps; }> { /** * @since 1.0.0 */ static interrupt(options: { readonly address: EntityAddress; readonly id: Snowflake; readonly requestId: Snowflake; }): OutgoingEnvelope; } /** * @since 1.0.0 * @category serialization / deserialization */ export declare const serialize: (message: Outgoing) => Effect.Effect; /** * @since 1.0.0 * @category serialization / deserialization */ export declare const serializeEnvelope: (message: Outgoing) => Effect.Effect; /** * @since 1.0.0 * @category serialization / deserialization */ export declare const serializeRequest: (self: OutgoingRequest) => Effect.Effect; /** * @since 1.0.0 * @category serialization / deserialization */ export declare const deserializeLocal: (self: Outgoing, encoded: Envelope.Envelope.PartialEncoded) => Effect.Effect, MalformedMessage>; export {}; //# sourceMappingURL=Message.d.ts.map