import { Schema } from 'effect'; import type { Brand, HandlerName } from '../../domain/identity/index.js'; import { outboxEntityBody, outboxEntryBody, outboxEntryStatus } from '../../domain/stored-entity/index.js'; export type QueueKey = string & Brand<'QueueKey'>; export type OutboxStatus = typeof outboxEntryStatus.Type; export type EntityBody = typeof outboxEntityBody.Type; export type EntryBody = typeof outboxEntryBody.Type; export type OutboxEntry = { readonly id: string; readonly name: HandlerName; readonly queue: QueueKey; readonly status: OutboxStatus; readonly enqueuedAt: string; readonly body: EntryBody; }; export type PendingEntry = Omit; export type OutboxOutcome = 'delivered' | 'failed'; export declare const queueKey: (name: HandlerName, key: string) => QueueKey; export declare const decodeEntryBody: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => import("effect/Effect").Effect<{ readonly kind: "entity"; readonly op: "delete" | "insert" | "update"; readonly key: string; readonly base: unknown; readonly after: unknown; readonly changed: readonly string[]; } | { readonly kind: "action"; readonly payload: unknown; }, Schema.SchemaError, never>; export type Request = { readonly op: 'insert'; readonly value: unknown; } | { readonly op: 'update'; readonly base: unknown; readonly after: unknown; readonly changed: ReadonlyArray; } | { readonly op: 'delete'; readonly base: unknown; } | { readonly op: 'nothing'; }; declare const OutboxUnreachable_base: Schema.Class; }>, import("effect/Cause").YieldableError>; export declare class OutboxUnreachable extends OutboxUnreachable_base { } export declare const isOutboxUnreachable: (error: unknown) => boolean; declare const OutboxEntryFailed_base: Schema.Class, import("effect/Cause").YieldableError>; export declare class OutboxEntryFailed extends OutboxEntryFailed_base { } export declare const outboxReplay: (entryId: string) => Record; export declare const replayEntryId: (metadata: unknown) => string | null; export {}; //# sourceMappingURL=entry.d.ts.map