<
F extends Schema.Struct.Fields,
Success extends Schema.Top = Schema.Void,
Error extends Schema.Top = Schema.Never
>(
itemSchema: Schema.Struct<F>,
wire?: { readonly success?: Success; readonly error?: Error }
): {
add: Hyperlink.Method<
Schema.Union<
readonly [Schema.Struct<F>, Schema.$Array<Schema.Struct<F>>]
>,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
{
(item: Hyperlink.Decoded<typeof itemSchema>): Effect.Effect<void>
(
items: readonly Hyperlink.Decoded<typeof itemSchema>[]
): Effect.Effect<void>
(
itemOrItems:
| Hyperlink.Decoded<typeof itemSchema>
| readonly Hyperlink.Decoded<typeof itemSchema>[]
): Effect.Effect<void>
}
>
prioritize: Hyperlink.Method<
Schema.Union<
readonly [Schema.Struct<F>, Schema.$Array<Schema.Struct<F>>]
>,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
{
(item: Hyperlink.Decoded<typeof itemSchema>): Effect.Effect<void>
(
items: readonly Hyperlink.Decoded<typeof itemSchema>[]
): Effect.Effect<void>
(
itemOrItems:
| Hyperlink.Decoded<typeof itemSchema>
| readonly Hyperlink.Decoded<typeof itemSchema>[]
): Effect.Effect<void>
}
>
defer: Hyperlink.Method<
Schema.Union<
readonly [Schema.Struct<F>, Schema.$Array<Schema.Struct<F>>]
>,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
{
(item: Hyperlink.Decoded<typeof itemSchema>): Effect.Effect<void>
(
items: readonly Hyperlink.Decoded<typeof itemSchema>[]
): Effect.Effect<void>
(
itemOrItems:
| Hyperlink.Decoded<typeof itemSchema>
| readonly Hyperlink.Decoded<typeof itemSchema>[]
): Effect.Effect<void>
}
>
enqueue: Hyperlink.Method<
Schema.$Array<
Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
>,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
release: Hyperlink.Method<
{
readonly options: Schema.optionalKey<
Schema.Struct<{
readonly scope: Schema.optionalKey<
Schema.Literal<"pendingOnly">
>
readonly releaseId: Schema.optionalKey<Schema.String>
readonly attributes: Schema.optionalKey<
Schema.$Record<
Schema.String,
Schema.Codec<JsonValue, JsonValue, never, never>
>
>
}>
>
},
Schema.$Array<
Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
>,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
destructive: true
},
Hyperlink.Derive
>
releaseEncoded: Hyperlink.Method<
{
readonly options: Schema.optionalKey<
Schema.Struct<{
readonly scope: Schema.optionalKey<
Schema.Literal<"pendingOnly">
>
readonly releaseId: Schema.optionalKey<Schema.String>
readonly attributes: Schema.optionalKey<
Schema.$Record<
Schema.String,
Schema.Codec<JsonValue, JsonValue, never, never>
>
>
}>
>
},
Schema.$Array<
Schema.Struct<{
readonly payload: Schema.Codec<JsonValue, JsonValue, never, never>
readonly item: Schema.Struct<{
readonly id: Schema.String
readonly version: Schema.String
readonly encoding: Schema.Literal<"json">
readonly jsonSchema: Schema.Unknown
}>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
>,
Schema.Union<
readonly [
typeof QueueMissingItemSchemaError,
typeof QueueItemEncodingError
]
>,
false,
Hyperlink.MethodAnnotations & {
description: string
destructive: true
},
Hyperlink.Derive
>
deadLetter: Hyperlink.Method<
{
readonly selector: Schema.Struct<{
readonly entryId: Schema.optionalKey<Schema.String>
readonly key: Schema.optional<Schema.String>
readonly item: Schema.optionalKey<Schema.Struct<F>>
}>
readonly options: Schema.Struct<{
readonly reason: Schema.String
readonly attributes: Schema.optionalKey<
Schema.$Record<
Schema.String,
Schema.Codec<JsonValue, JsonValue, never, never>
>
>
}>
},
Schema.$Array<
Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
>,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
destructive: true
},
Hyperlink.Derive
>
drop: Hyperlink.Method<
{
readonly selector: Schema.Struct<{
readonly entryId: Schema.optionalKey<Schema.String>
readonly key: Schema.optional<Schema.String>
readonly item: Schema.optionalKey<Schema.Struct<F>>
}>
readonly options: Schema.Struct<{
readonly reason: Schema.String
readonly attributes: Schema.optionalKey<
Schema.$Record<
Schema.String,
Schema.Codec<JsonValue, JsonValue, never, never>
>
>
}>
},
Schema.$Array<
Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
>,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
destructive: true
},
Hyperlink.Derive
>
events: Hyperlink.Method<
undefined,
Schema.Union<
readonly [
Schema.TaggedStruct<"Start", { readonly key: Schema.String }>,
Schema.TaggedStruct<
"Enqueued",
{
readonly entries: Schema.$Array<
Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly batchId: Schema.optionalKey<Schema.String>
}
>,
Schema.TaggedStruct<
"Started",
{
readonly entry: Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
}
>,
Schema.TaggedStruct<
"Completed",
{
readonly entry: Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
readonly success: Schema.Union<readonly [Success]>
readonly elapsed: Schema.Duration
}
>,
Schema.TaggedStruct<
"Failed",
{
readonly entry: Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
readonly cause: Schema.Cause<Error, Schema.Unknown>
readonly elapsed: Schema.Duration
}
>,
Schema.TaggedStruct<
"RetryScheduled",
{
readonly entry: Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
readonly cause: Schema.Cause<Error, Schema.Unknown>
readonly nextAttempt: Schema.Number
}
>,
Schema.TaggedStruct<
"RetryExhausted",
{
readonly entry: Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
readonly cause: Schema.Cause<Error, Schema.Unknown>
}
>,
Schema.TaggedStruct<
"Drained",
{
readonly key: Schema.String
readonly completed: Schema.Number
}
>,
Schema.TaggedStruct<
"Cleared",
{ readonly key: Schema.String; readonly count: Schema.Number }
>,
Schema.TaggedStruct<
"ShutdownRequested",
{
readonly key: Schema.String
readonly mode: Schema.Literals<
readonly ["drain", "finishActive"]
>
readonly pending: Schema.Number
}
>,
Schema.TaggedStruct<
"ShutdownComplete",
{
readonly key: Schema.String
readonly completed: Schema.Number
}
>,
Schema.TaggedStruct<
"Released",
{
readonly key: Schema.String
readonly releaseId: Schema.String
readonly entries: Schema.$Array<
Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
>
}
>,
Schema.TaggedStruct<
"DeadLettered",
{
readonly key: Schema.String
readonly entries: Schema.$Array<
Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
>
readonly reason: Schema.String
}
>,
Schema.TaggedStruct<
"Dropped",
{
readonly key: Schema.String
readonly entries: Schema.$Array<
Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
>
readonly reason: Schema.String
}
>,
Schema.TaggedStruct<
"RateLimitExceeded",
{
readonly key: Schema.String
readonly entry: Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
readonly limitKey: Schema.String
readonly algorithm: Schema.Literals<
readonly ["fixed-window", "token-bucket"]
>
readonly outcome: Schema.Literals<
readonly ["delayed", "rejected"]
>
}
>
]
>,
Schema.Never,
true,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
status: Hyperlink.Marked<
Hyperlink.Method<
undefined,
Schema.Struct<{
readonly sizes: Schema.Struct<{
readonly high: Schema.Number
readonly normal: Schema.Number
readonly low: Schema.Number
}>
readonly paused: Schema.Boolean
readonly inFlight: Schema.Number
readonly completed: Schema.Number
readonly phase: Schema.Literals<
readonly ["running", "draining", "off"]
>
}>,
Schema.Never,
true,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>,
{ readonly _tag: "ref" }
>
size: Hyperlink.Marked<
Hyperlink.Method<
undefined,
Schema.Number,
Schema.Never,
true,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>,
{ readonly _tag: "ref" }
>
isEmpty: Hyperlink.Marked<
Hyperlink.Method<
undefined,
Schema.Boolean,
Schema.Never,
true,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>,
{ readonly _tag: "ref" }
>
start: Hyperlink.Method<
undefined,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
pause: Hyperlink.Method<
undefined,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
resume: Hyperlink.Method<
undefined,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
shutdown: Hyperlink.Method<
undefined,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
destructive: true
},
Hyperlink.Derive
>
clear: Hyperlink.Method<
undefined,
Schema.Number,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
destructive: true
},
Hyperlink.Derive
>
metrics: {
stream: Hyperlink.Method<
undefined,
Schema.Struct<{
readonly windowStart: Schema.DateTimeUtc
readonly windowEnd: Schema.DateTimeUtc
readonly windowMillis: Schema.Number
readonly enqueued: Schema.Number
readonly started: Schema.Number
readonly completed: Schema.Number
readonly failed: Schema.Number
readonly retried: Schema.Number
readonly deadLettered: Schema.Number
readonly dropped: Schema.Number
readonly rateLimitExceeded: Schema.Number
readonly inFlight: Schema.Number
readonly throughputPerSec: Schema.Number
readonly avgWaitMillis: Schema.Struct<{
readonly high: Schema.optionalKey<Schema.Number>
readonly normal: Schema.optionalKey<Schema.Number>
readonly low: Schema.optionalKey<Schema.Number>
}>
readonly avgExecutionMillis: Schema.optionalKey<Schema.Number>
readonly avgTotalMillis: Schema.optionalKey<Schema.Number>
}>,
Schema.Never,
true,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
query: Hyperlink.Method<
{
limit: Schema.optionalKey<Schema.Number>
since: Schema.optionalKey<Schema.DateTimeUtc>
until: Schema.optionalKey<Schema.DateTimeUtc>
},
Schema.$Array<
Schema.Struct<{
readonly windowStart: Schema.DateTimeUtc
readonly windowEnd: Schema.DateTimeUtc
readonly windowMillis: Schema.Number
readonly enqueued: Schema.Number
readonly started: Schema.Number
readonly completed: Schema.Number
readonly failed: Schema.Number
readonly retried: Schema.Number
readonly deadLettered: Schema.Number
readonly dropped: Schema.Number
readonly rateLimitExceeded: Schema.Number
readonly inFlight: Schema.Number
readonly throughputPerSec: Schema.Number
readonly avgWaitMillis: Schema.Struct<{
readonly high: Schema.optionalKey<Schema.Number>
readonly normal: Schema.optionalKey<Schema.Number>
readonly low: Schema.optionalKey<Schema.Number>
}>
readonly avgExecutionMillis: Schema.optionalKey<Schema.Number>
readonly avgTotalMillis: Schema.optionalKey<Schema.Number>
}>
>,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
}
}Build a queue instance spec (model B): the shared queueControlSpec plus
per-instance data-plane procedures typed by itemSchema — the enqueue verbs (add,
prioritize, defer, enqueue) and the events stream. Pass the result to
Hyperlink.Tag — each instance is its own resource (its own RPC group):
class Jobs extends Hyperlink.Tag<Jobs>()("@app/Jobs", queueSpec(JobSchema)) {}
const q = yield* Jobs;
yield* q.add(aJob); // the item itself is the payload — validated against JobSchema on both sidesitemSchema becomes the rpc payload schema, so RPC validates items on the wire — the
client rejects bad items before the round trip and the server re-validates on decode.
export const const queueSpec: <F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(itemSchema: Schema.Struct<F>, wire?: {
readonly success?: Success;
readonly error?: Error;
}) => {
add: Hyperlink.Method<Schema.Union<readonly [Schema.Struct<F>, Schema.$Array<Schema.Struct<F>>]>, Schema.Void, Schema.Never, false, Hyperlink.MethodAnnotations & {
description: string;
}, {
(item: Hyperlink.Decoded<typeof itemSchema>): Effect.Effect<void>;
(items: readonly Hyperlink.Decoded<typeof itemSchema>[]): Effect.Effect<void>;
(itemOrItems: Hyperlink.Decoded<typeof itemSchema> | readonly Hyperlink.Decoded<typeof itemSchema>[]): Effect.Effect<void>;
}>;
... 16 more ...;
metrics: {
...;
};
}
Build a queue instance spec (model B): the shared
queueControlSpec
plus
per-instance data-plane procedures typed by itemSchema — the enqueue verbs (add,
prioritize, defer, enqueue) and the events stream. Pass the result to
Hyperlink.Tag
— each instance is its own resource (its own RPC group):
class Jobs extends Hyperlink.Tag<Jobs>()("@app/Jobs", queueSpec(JobSchema)) {}
const q = yield* Jobs;
yield* q.add(aJob); // the item itself is the payload — validated against JobSchema on both sides
itemSchema becomes the rpc payload schema, so RPC validates items on the wire — the
client rejects bad items before the round trip and the server re-validates on decode.
queueSpec = <
function (type parameter) F in <F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(itemSchema: Schema.Struct<F>, wire?: {
readonly success?: Success;
readonly error?: Error;
}): {
...;
}
F extends import SchemaSchema.Struct.type Struct<Fields extends Struct.Fields>.Fields = {
readonly [x: string]: Schema.Constraint;
readonly [x: number]: Schema.Constraint;
readonly [x: symbol]: Schema.Constraint;
}
Constraint for a struct field map: an object whose values are schemas.
Fields,
function (type parameter) Success in <F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(itemSchema: Schema.Struct<F>, wire?: {
readonly success?: Success;
readonly error?: Error;
}): {
...;
}
Success extends import SchemaSchema.Top = typeof import SchemaSchema.const Void: Voidconst Void: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<void, readonly []>) => Schema.Void;
annotateKey: (annotations: Schema.Annotations.Key<void>) => Schema.Void;
check: (checks_0: Check<void>, ...checks: Array<Check<void>>) => Schema.Void;
rebuild: (ast: Void) => Schema.Void;
make: (input: void, options?: MakeOptions) => void;
makeOption: (input: void, options?: MakeOptions) => Option_.Option<void>;
makeEffect: (input: void, options?: MakeOptions) => Effect.Effect<void, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Type-level representation of
Void
.
Schema for a TypeScript void return value.
When to use
Use when you need to model the return value of a function, RPC, or endpoint
whose result is intentionally ignored.
Details
Runtime parsing accepts any present value and discards it, producing
undefined. The public decoded and encoded TypeScript representation remains
void, so typed construction, decoding, and encoding APIs are still modeled
as void.
Void,
function (type parameter) Error in <F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(itemSchema: Schema.Struct<F>, wire?: {
readonly success?: Success;
readonly error?: Error;
}): {
...;
}
Error extends import SchemaSchema.Top = typeof import SchemaSchema.const Never: Neverconst Never: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<never, readonly []>) => Schema.Never;
annotateKey: (annotations: Schema.Annotations.Key<never>) => Schema.Never;
check: (checks_0: Check<never>, ...checks: Array<Check<never>>) => Schema.Never;
rebuild: (ast: Never) => Schema.Never;
make: (input: never, options?: MakeOptions) => never;
makeOption: (input: never, options?: MakeOptions) => Option_.Option<never>;
makeEffect: (input: never, options?: MakeOptions) => Effect.Effect<never, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Type-level representation of
Never
.
Schema for the never type. Always fails validation — no value satisfies it.
Never,
>(
itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema: import SchemaSchema.interface Struct<Fields extends Schema.Struct.Fields>Defines a struct schema from a map of field schemas.
Details
Each field value is a schema. Use
optionalKey
or
optional
to
mark fields as optional, and
mutableKey
to mark them as mutable.
The resulting schema's Type is a readonly object type with the fields'
decoded types. The Encoded form mirrors the field schemas' encoded types.
Example (Defining a basic struct)
import { Schema } from "effect"
const Person = Schema.Struct({
name: Schema.String,
age: Schema.Number,
email: Schema.optionalKey(Schema.String)
})
// { readonly name: string; readonly age: number; readonly email?: string }
type Person = typeof Person.Type
const alice = Schema.decodeUnknownSync(Person)({ name: "Alice", age: 30 })
console.log(alice)
// { name: 'Alice', age: 30 }
Namespace for struct field type utilities.
Details
These types compute the decoded Type, encoded Encoded, and constructor
input MakeIn of a
Struct
from its field map, handling optional,
mutable, and other field modifiers automatically.
Struct.Fields — constraint for the field map object
Struct.Type<F> — decoded type of the struct
Struct.Encoded<F> — encoded type of the struct
Struct.MakeIn<F> — constructor input (optional/defaulted fields may be omitted)
Struct.DecodingServices<F> / Struct.EncodingServices<F> — required services
Type-level representation returned by
Struct
.
Struct<function (type parameter) F in <F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(itemSchema: Schema.Struct<F>, wire?: {
readonly success?: Success;
readonly error?: Error;
}): {
...;
}
F>,
wire: | {
readonly success?: Success
readonly error?: Error
}
| undefined
wire?: { readonly success?: Success | undefinedsuccess?: function (type parameter) Success in <F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(itemSchema: Schema.Struct<F>, wire?: {
readonly success?: Success;
readonly error?: Error;
}): {
...;
}
Success; readonly error?: Error | undefinederror?: function (type parameter) Error in <F extends Schema.Struct.Fields, Success extends Schema.Top = Schema.Void, Error extends Schema.Top = Schema.Never>(itemSchema: Schema.Struct<F>, wire?: {
readonly success?: Success;
readonly error?: Error;
}): {
...;
}
Error },
) => {
// `add`/`prioritize`/`defer` take the item **directly**, and also accept a **batch** (the
// engine's `QueueEnqueue<T>` is `(item) | (items)`), so one call enqueues many — no N round
// trips over RPC. The payload is `item | item[]` (a single-schema union payload); the layer
// recovers the bare `itemSchema` from `add.payload.members[0]`.
const const itemOrItems: Schema.Union<
readonly [
Schema.Struct<F>,
Schema.$Array<Schema.Struct<F>>
]
>
const itemOrItems: {
Type: { [K in keyof Members]: Members[K]["Type"]; }[number];
Encoded: { [K in keyof Members]: Members[K]["Encoded"]; }[number];
DecodingServices: { [K in keyof Members]: Members[K]["DecodingServices"]; }[number];
EncodingServices: { [K in keyof Members]: Members[K]["EncodingServices"]; }[number];
Iso: { [K in keyof Members]: Members[K]["Iso"]; }[number];
members: Members;
mapMembers: (f: (members: readonly [Schema.Struct<F>, Schema.$Array<Schema.Struct<F>>]) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Union<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | ReadonlyArray<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeM…;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | ReadonlyArray<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMuta…;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | ReadonlyArray<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>>, ...ch…;
rebuild: (ast: Union<Arrays | Objects>) => Schema.Union<readonly [Schema.Struct<F>, Schema.$Array<Schema.Struct<F>>]>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | ReadonlyArray<Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>>, options?: MakeOptions) => Struct.…;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | ReadonlyArray<Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>>, options?: MakeOptions) => Option_…;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | ReadonlyArray<Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>>, options?: MakeOptions) => Effect.…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemOrItems = import SchemaSchema.function Union<
Members extends ReadonlyArray<Constraint>
>(
members: Members,
options?: { mode?: "anyOf" | "oneOf" }
): Union<Members>
Creates a union schema from an array of member schemas. Members are tested in
order; the first match is returned.
Details
Optionally, specify mode:
"anyOf" (default) — matches if any member matches.
"oneOf" — matches if exactly one member matches.
Example (Defining a string or number union)
import { Schema } from "effect"
const schema = Schema.Union([Schema.String, Schema.Number])
Schema.decodeUnknownSync(schema)("hello") // "hello"
Schema.decodeUnknownSync(schema)(42) // 42
Union([itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema, import SchemaSchema.Array<Schema.Struct<F>>(self: Schema.Struct<F>): Schema.$Array<Schema.Struct<F>>
export Array
Defines a ReadonlyArray schema for a given element schema.
Example (Defining an array of strings)
import { Schema } from "effect"
const schema = Schema.Array(Schema.String)
const result = Schema.decodeUnknownSync(schema)(["a", "b", "c"])
console.log(result)
// [ 'a', 'b', 'c' ]
Array(itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema)]);
const const eventSchema: Schema.Union<readonly [Schema.TaggedStruct<"Start", {
readonly key: Schema.String;
}>, Schema.TaggedStruct<"Enqueued", {
readonly entries: Schema.$Array<Schema.Struct<{
readonly item: Schema.Struct<F>;
readonly entryId: Schema.String;
readonly key: Schema.optional<Schema.String>;
readonly priority: Schema.Literals<readonly ["high", "normal", "low"]>;
readonly attempts: Schema.Number;
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc;
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly interruptedAt: Schema.optionalKey<...>;
}>;
readonly batchId: Schema.optional<...>;
readonly releaseId: Schema.optional<...>;
readonly sourceHyperlinkId: Schema.optional<...>;
readonly attributes: Schema.optional<...>;
}>>;
readonly priority: Schema.Literals<...>;
readonly batchId: Schema.optionalKey<...>;
}>, ... 12 more ..., Schema.TaggedStruct<...>]>
const eventSchema: {
Type: { [K in keyof Members]: Members[K]["Type"]; }[number];
Encoded: { [K in keyof Members]: Members[K]["Encoded"]; }[number];
DecodingServices: { [K in keyof Members]: Members[K]["DecodingServices"]; }[number];
EncodingServices: { [K in keyof Members]: Members[K]["EncodingServices"]; }[number];
Iso: { [K in keyof Members]: Members[K]["Iso"]; }[number];
members: Members;
mapMembers: (f: (members: readonly [Schema.TaggedStruct<'Start', { readonly key: Schema.String }>, Schema.TaggedStruct<'Enqueued', { readonly entries: Schema.$Array<Schema.Struct<{ readonly item: Schema.Struct<F>; readonly entryId: Schema.String; read…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'Start'>; readonly key: Schema.String; }, 'Type'> | { readonly entries: ReadonlyArray<{ readonly item: Schema.Struct.View<F, 'Type', Schema.Stru…;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'Start'>; readonly key: Schema.String }, 'Type'> | { readonly entries: ReadonlyArray<{ readonly item: Schema.Struct.View<F, 'Type', Schema.Struct.T…;
check: (checks_0: Check<Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'Start'>; readonly key: Schema.String }, 'Type'> | { readonly entries: ReadonlyArray<{ readonly item: Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, …;
rebuild: (ast: Union<Objects>) => Schema.Union<readonly [Schema.TaggedStruct<'Start', { readonly key: Schema.String }>, Schema.TaggedStruct<'Enqueued', { readonly entries: Schema.$Array<Schema.Struct<{ readonly item: Schema.Struct<F>; readonly entr…;
make: (input: { readonly key: string; readonly _tag?: 'Start' | undefined } | { readonly entries: ReadonlyArray<{ readonly item: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>; readonly entryId: string;…;
makeOption: (input: { readonly key: string; readonly _tag?: 'Start' | undefined } | { readonly entries: ReadonlyArray<{ readonly item: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>; readonly entryId: string;…;
makeEffect: (input: { readonly key: string; readonly _tag?: 'Start' | undefined } | { readonly entries: ReadonlyArray<{ readonly item: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>; readonly entryId: string;…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
eventSchema = const buildQueueEvent: <Schema.Struct<F>, Success, Error>(itemSchema: Schema.Struct<F>, successSchema: Success, errorSchema: Error) => Schema.Union<readonly [Schema.TaggedStruct<"Start", {
readonly key: Schema.String;
}>, Schema.TaggedStruct<"Enqueued", {
readonly entries: Schema.$Array<Schema.Struct<{
readonly item: Schema.Struct<F>;
readonly entryId: Schema.String;
readonly key: Schema.optional<Schema.String>;
readonly priority: Schema.Literals<readonly ["high", "normal", "low"]>;
readonly attempts: Schema.Number;
... 4 more ...;
readonly attributes: Schema.optional<...>;
}>>;
readonly priority: Schema.Literals<...>;
readonly batchId: Schema.optionalKey<...>;
}>, ... 12 more ..., Schema.TaggedStruct<...>]>
Build the events union schema with concrete success / error wire schemas (no defaulting
??, so Completed.success is exactly Success, no | void widening). This is the concrete
builder the spec / store / engine consume so their decoded .Type reduces; the defaulting
queueEvent
overloads wrap it.
buildQueueEvent(
itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema,
function withVoidDefault<
Success extends Schema.Top
>(schema: Success | undefined): Success
Resolve an optional wire success schema to its
Schema.Void
default while keeping the
decoded type clean: the public overload returns the caller's Success (not the
Success | typeof Schema.Void union a bare ?? Schema.Void yields, whose ["Type"] is a deferred
indexed access that stops buildQueueEvent's Completed.success from reducing under a generic
Success). Sound: a caller whose Success is not typeof Schema.Void always supplies the schema
(the type param is inferred from it), so the ?? Schema.Void branch only runs when Success really
is typeof Schema.Void. A function-overload narrowing — no cast.
withVoidDefault(wire: | {
readonly success?: Success
readonly error?: Error
}
| undefined
wire?.success?: Success | undefinedsuccess),
function withNeverDefault<
Error extends Schema.Top
>(schema: Error | undefined): Error
Mirror of
withVoidDefault
for the wire error schema (default
Schema.Never
). The
Error | typeof Schema.Never union's ["Type"] would fold never away, but the schema-value
union still defers, so the same clean-narrowing keeps Failed.cause a concrete Cause<Error>.
withNeverDefault(wire: | {
readonly success?: Success
readonly error?: Error
}
| undefined
wire?.error?: Error | undefinederror),
);
return {
...const queueControlSpec: {
status: Hyperlink.Marked<Hyperlink.Method<undefined, Schema.Struct<{
readonly sizes: Schema.Struct<{
readonly high: Schema.Number;
readonly normal: Schema.Number;
readonly low: Schema.Number;
}>;
readonly paused: Schema.Boolean;
readonly inFlight: Schema.Number;
readonly completed: Schema.Number;
readonly phase: Schema.Literals<readonly ["running", "draining", "off"]>;
}>, Schema.Never, true, Hyperlink.MethodAnnotations & {
description: string;
}, Hyperlink.Derive>, {
...;
}>;
... 7 more ...;
metrics: {
...;
};
}
The queue control + observation contract: the fixed-schema verbs of a queue handle,
shared by every queue instance. The data-plane (item-typed) verbs are added in a later
slice. Mirrors the matching members of the engine handle API (QueueHandleApi).
queueControlSpec,
add: Hyperlink.Method<
Schema.Union<
readonly [
Schema.Struct<F>,
Schema.$Array<Schema.Struct<F>>
]
>,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
},
{
(
item: Hyperlink.Decoded<typeof itemSchema>
): Effect.Effect<void>
(
items: readonly Hyperlink.Decoded<
typeof itemSchema
>[]
): Effect.Effect<void>
(
itemOrItems:
| Hyperlink.Decoded<typeof itemSchema>
| readonly Hyperlink.Decoded<
typeof itemSchema
>[]
): Effect.Effect<void>
}
>
(property) add: {
kind: MethodKind;
payload: P;
success: Su;
error: E;
stream: Str;
annotations: Ann;
annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
add: import HyperlinkHyperlink.function unsafeEffectFn<
Client = Hyperlink.Derive
>(): <P extends Schema.Top>(
payload: RequiredPayloadSchema<P>
) => Method<
P,
typeof Schema.Void,
typeof Schema.Never,
false,
MethodAnnotations,
Client
>
Two-stage effectFn that lets you override the client-facing type with an unconstrained Client:
unsafeEffectFn<Client>()(payload). The wire/impl still come from the schema; only what yield* Tag
reads is replaced by Client. Unsafe: unlike the narrowing effectFn<Client>() form, Client is
not checked against the schema — you assert it matches. Reach for it only when the derivation can't be
expressed (e.g. a generic library like the queue, whose correct overloads are unprovable under <F>).
add: Hyperlink.unsafeEffectFn<{
(item: Hyperlink.Decoded<typeof itemSchema>): Effect.Effect<void>
(items: readonly Hyperlink.Decoded<typeof itemSchema>[]): Effect.Effect<void>
}>()(itemOrItems)
unsafeEffectFn<{
(item: Hyperlink.Decoded<typeof itemSchema>item: import HyperlinkHyperlink.type Decoded<S extends Schema.Top> =
S["Type"] extends readonly unknown[]
? number extends S["Type"]["length"]
? S["Type"] extends readonly (infer E)[]
? readonly PrettyObject<E>[]
: S["Type"]
: S["Type"]
: PrettyObject<S["Type"]>
A schema's decoded value type (.Type), prettified — { to: string }, not the
Schema.Struct.ReadonlySide<…> alias, and with the schema's readonly dropped. Use it to spell out a
client-type override for the effect/effectFn two-stage forms without re-deriving the alias by hand.
Decoded<typeof itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema>): import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<void>;
(items: readonly Hyperlink.Decoded<
typeof itemSchema
>[]
items: readonly import HyperlinkHyperlink.type Decoded<S extends Schema.Top> =
S["Type"] extends readonly unknown[]
? number extends S["Type"]["length"]
? S["Type"] extends readonly (infer E)[]
? readonly PrettyObject<E>[]
: S["Type"]
: S["Type"]
: PrettyObject<S["Type"]>
A schema's decoded value type (.Type), prettified — { to: string }, not the
Schema.Struct.ReadonlySide<…> alias, and with the schema's readonly dropped. Use it to spell out a
client-type override for the effect/effectFn two-stage forms without re-deriving the alias by hand.
Decoded<typeof itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema>[]): import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<void>;
(itemOrItems: | Hyperlink.Decoded<typeof itemSchema>
| readonly Hyperlink.Decoded<
typeof itemSchema
>[]
itemOrItems: import HyperlinkHyperlink.type Decoded<S extends Schema.Top> =
S["Type"] extends readonly unknown[]
? number extends S["Type"]["length"]
? S["Type"] extends readonly (infer E)[]
? readonly PrettyObject<E>[]
: S["Type"]
: S["Type"]
: PrettyObject<S["Type"]>
A schema's decoded value type (.Type), prettified — { to: string }, not the
Schema.Struct.ReadonlySide<…> alias, and with the schema's readonly dropped. Use it to spell out a
client-type override for the effect/effectFn two-stage forms without re-deriving the alias by hand.
Decoded<typeof itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema> | readonly import HyperlinkHyperlink.type Decoded<S extends Schema.Top> =
S["Type"] extends readonly unknown[]
? number extends S["Type"]["length"]
? S["Type"] extends readonly (infer E)[]
? readonly PrettyObject<E>[]
: S["Type"]
: S["Type"]
: PrettyObject<S["Type"]>
A schema's decoded value type (.Type), prettified — { to: string }, not the
Schema.Struct.ReadonlySide<…> alias, and with the schema's readonly dropped. Use it to spell out a
client-type override for the effect/effectFn two-stage forms without re-deriving the alias by hand.
Decoded<typeof itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema>[]): import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<void>;
}>()(const itemOrItems: Schema.Union<
readonly [
Schema.Struct<F>,
Schema.$Array<Schema.Struct<F>>
]
>
const itemOrItems: {
Type: { [K in keyof Members]: Members[K]["Type"]; }[number];
Encoded: { [K in keyof Members]: Members[K]["Encoded"]; }[number];
DecodingServices: { [K in keyof Members]: Members[K]["DecodingServices"]; }[number];
EncodingServices: { [K in keyof Members]: Members[K]["EncodingServices"]; }[number];
Iso: { [K in keyof Members]: Members[K]["Iso"]; }[number];
members: Members;
mapMembers: (f: (members: readonly [Schema.Struct<F>, Schema.$Array<Schema.Struct<F>>]) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Union<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | ReadonlyArray<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeM…;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | ReadonlyArray<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMuta…;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | ReadonlyArray<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>>, ...ch…;
rebuild: (ast: Union<Arrays | Objects>) => Schema.Union<readonly [Schema.Struct<F>, Schema.$Array<Schema.Struct<F>>]>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | ReadonlyArray<Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>>, options?: MakeOptions) => Struct.…;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | ReadonlyArray<Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>>, options?: MakeOptions) => Option_…;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | ReadonlyArray<Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>>, options?: MakeOptions) => Effect.…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemOrItems).Method<Union<readonly [Struct<F>, $Array<Struct<F>>]>, Void, Never, false, MethodAnnotations, { (item: Hyperlink.Decoded<Struct<...>>): Effect.Effect<void>; (items: readonly Hyperlink.Decoded<Struct<...>>[]): Effect.Effect<void>; (itemOrItems: Hyperlink.Decoded<Struct<...>> | readonly Hyperlink.Decoded<Struct<...>>[]): Effect.Effect<void>; }>.annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>annotate({
description: stringdescription: "Enqueue an item (or a batch) at normal priority.",
}),
prioritize: Hyperlink.Method<
Schema.Union<
readonly [
Schema.Struct<F>,
Schema.$Array<Schema.Struct<F>>
]
>,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
},
{
(
item: Hyperlink.Decoded<typeof itemSchema>
): Effect.Effect<void>
(
items: readonly Hyperlink.Decoded<
typeof itemSchema
>[]
): Effect.Effect<void>
(
itemOrItems:
| Hyperlink.Decoded<typeof itemSchema>
| readonly Hyperlink.Decoded<
typeof itemSchema
>[]
): Effect.Effect<void>
}
>
(property) prioritize: {
kind: MethodKind;
payload: P;
success: Su;
error: E;
stream: Str;
annotations: Ann;
annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
prioritize: import HyperlinkHyperlink.function unsafeEffectFn<
Client = Hyperlink.Derive
>(): <P extends Schema.Top>(
payload: RequiredPayloadSchema<P>
) => Method<
P,
typeof Schema.Void,
typeof Schema.Never,
false,
MethodAnnotations,
Client
>
Two-stage effectFn that lets you override the client-facing type with an unconstrained Client:
unsafeEffectFn<Client>()(payload). The wire/impl still come from the schema; only what yield* Tag
reads is replaced by Client. Unsafe: unlike the narrowing effectFn<Client>() form, Client is
not checked against the schema — you assert it matches. Reach for it only when the derivation can't be
expressed (e.g. a generic library like the queue, whose correct overloads are unprovable under <F>).
add: Hyperlink.unsafeEffectFn<{
(item: Hyperlink.Decoded<typeof itemSchema>): Effect.Effect<void>
(items: readonly Hyperlink.Decoded<typeof itemSchema>[]): Effect.Effect<void>
}>()(itemOrItems)
unsafeEffectFn<{
(item: Hyperlink.Decoded<typeof itemSchema>item: import HyperlinkHyperlink.type Decoded<S extends Schema.Top> =
S["Type"] extends readonly unknown[]
? number extends S["Type"]["length"]
? S["Type"] extends readonly (infer E)[]
? readonly PrettyObject<E>[]
: S["Type"]
: S["Type"]
: PrettyObject<S["Type"]>
A schema's decoded value type (.Type), prettified — { to: string }, not the
Schema.Struct.ReadonlySide<…> alias, and with the schema's readonly dropped. Use it to spell out a
client-type override for the effect/effectFn two-stage forms without re-deriving the alias by hand.
Decoded<typeof itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema>): import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<void>;
(items: readonly Hyperlink.Decoded<
typeof itemSchema
>[]
items: readonly import HyperlinkHyperlink.type Decoded<S extends Schema.Top> =
S["Type"] extends readonly unknown[]
? number extends S["Type"]["length"]
? S["Type"] extends readonly (infer E)[]
? readonly PrettyObject<E>[]
: S["Type"]
: S["Type"]
: PrettyObject<S["Type"]>
A schema's decoded value type (.Type), prettified — { to: string }, not the
Schema.Struct.ReadonlySide<…> alias, and with the schema's readonly dropped. Use it to spell out a
client-type override for the effect/effectFn two-stage forms without re-deriving the alias by hand.
Decoded<typeof itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema>[]): import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<void>;
(itemOrItems: | Hyperlink.Decoded<typeof itemSchema>
| readonly Hyperlink.Decoded<
typeof itemSchema
>[]
itemOrItems: import HyperlinkHyperlink.type Decoded<S extends Schema.Top> =
S["Type"] extends readonly unknown[]
? number extends S["Type"]["length"]
? S["Type"] extends readonly (infer E)[]
? readonly PrettyObject<E>[]
: S["Type"]
: S["Type"]
: PrettyObject<S["Type"]>
A schema's decoded value type (.Type), prettified — { to: string }, not the
Schema.Struct.ReadonlySide<…> alias, and with the schema's readonly dropped. Use it to spell out a
client-type override for the effect/effectFn two-stage forms without re-deriving the alias by hand.
Decoded<typeof itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema> | readonly import HyperlinkHyperlink.type Decoded<S extends Schema.Top> =
S["Type"] extends readonly unknown[]
? number extends S["Type"]["length"]
? S["Type"] extends readonly (infer E)[]
? readonly PrettyObject<E>[]
: S["Type"]
: S["Type"]
: PrettyObject<S["Type"]>
A schema's decoded value type (.Type), prettified — { to: string }, not the
Schema.Struct.ReadonlySide<…> alias, and with the schema's readonly dropped. Use it to spell out a
client-type override for the effect/effectFn two-stage forms without re-deriving the alias by hand.
Decoded<typeof itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema>[]): import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<void>;
}>()(const itemOrItems: Schema.Union<
readonly [
Schema.Struct<F>,
Schema.$Array<Schema.Struct<F>>
]
>
const itemOrItems: {
Type: { [K in keyof Members]: Members[K]["Type"]; }[number];
Encoded: { [K in keyof Members]: Members[K]["Encoded"]; }[number];
DecodingServices: { [K in keyof Members]: Members[K]["DecodingServices"]; }[number];
EncodingServices: { [K in keyof Members]: Members[K]["EncodingServices"]; }[number];
Iso: { [K in keyof Members]: Members[K]["Iso"]; }[number];
members: Members;
mapMembers: (f: (members: readonly [Schema.Struct<F>, Schema.$Array<Schema.Struct<F>>]) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Union<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | ReadonlyArray<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeM…;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | ReadonlyArray<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMuta…;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | ReadonlyArray<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>>, ...ch…;
rebuild: (ast: Union<Arrays | Objects>) => Schema.Union<readonly [Schema.Struct<F>, Schema.$Array<Schema.Struct<F>>]>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | ReadonlyArray<Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>>, options?: MakeOptions) => Struct.…;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | ReadonlyArray<Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>>, options?: MakeOptions) => Option_…;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | ReadonlyArray<Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>>, options?: MakeOptions) => Effect.…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemOrItems).Method<Union<readonly [Struct<F>, $Array<Struct<F>>]>, Void, Never, false, MethodAnnotations, { (item: Hyperlink.Decoded<Struct<...>>): Effect.Effect<void>; (items: readonly Hyperlink.Decoded<Struct<...>>[]): Effect.Effect<void>; (itemOrItems: Hyperlink.Decoded<Struct<...>> | readonly Hyperlink.Decoded<Struct<...>>[]): Effect.Effect<void>; }>.annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>annotate({
description: stringdescription:
"Enqueue an item (or a batch) at high priority (processed before normal and low).",
}),
defer: Hyperlink.Method<
Schema.Union<
readonly [
Schema.Struct<F>,
Schema.$Array<Schema.Struct<F>>
]
>,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
},
{
(
item: Hyperlink.Decoded<typeof itemSchema>
): Effect.Effect<void>
(
items: readonly Hyperlink.Decoded<
typeof itemSchema
>[]
): Effect.Effect<void>
(
itemOrItems:
| Hyperlink.Decoded<typeof itemSchema>
| readonly Hyperlink.Decoded<
typeof itemSchema
>[]
): Effect.Effect<void>
}
>
(property) defer: {
kind: MethodKind;
payload: P;
success: Su;
error: E;
stream: Str;
annotations: Ann;
annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
defer: import HyperlinkHyperlink.function unsafeEffectFn<
Client = Hyperlink.Derive
>(): <P extends Schema.Top>(
payload: RequiredPayloadSchema<P>
) => Method<
P,
typeof Schema.Void,
typeof Schema.Never,
false,
MethodAnnotations,
Client
>
Two-stage effectFn that lets you override the client-facing type with an unconstrained Client:
unsafeEffectFn<Client>()(payload). The wire/impl still come from the schema; only what yield* Tag
reads is replaced by Client. Unsafe: unlike the narrowing effectFn<Client>() form, Client is
not checked against the schema — you assert it matches. Reach for it only when the derivation can't be
expressed (e.g. a generic library like the queue, whose correct overloads are unprovable under <F>).
add: Hyperlink.unsafeEffectFn<{
(item: Hyperlink.Decoded<typeof itemSchema>): Effect.Effect<void>
(items: readonly Hyperlink.Decoded<typeof itemSchema>[]): Effect.Effect<void>
}>()(itemOrItems)
unsafeEffectFn<{
(item: Hyperlink.Decoded<typeof itemSchema>item: import HyperlinkHyperlink.type Decoded<S extends Schema.Top> =
S["Type"] extends readonly unknown[]
? number extends S["Type"]["length"]
? S["Type"] extends readonly (infer E)[]
? readonly PrettyObject<E>[]
: S["Type"]
: S["Type"]
: PrettyObject<S["Type"]>
A schema's decoded value type (.Type), prettified — { to: string }, not the
Schema.Struct.ReadonlySide<…> alias, and with the schema's readonly dropped. Use it to spell out a
client-type override for the effect/effectFn two-stage forms without re-deriving the alias by hand.
Decoded<typeof itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema>): import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<void>;
(items: readonly Hyperlink.Decoded<
typeof itemSchema
>[]
items: readonly import HyperlinkHyperlink.type Decoded<S extends Schema.Top> =
S["Type"] extends readonly unknown[]
? number extends S["Type"]["length"]
? S["Type"] extends readonly (infer E)[]
? readonly PrettyObject<E>[]
: S["Type"]
: S["Type"]
: PrettyObject<S["Type"]>
A schema's decoded value type (.Type), prettified — { to: string }, not the
Schema.Struct.ReadonlySide<…> alias, and with the schema's readonly dropped. Use it to spell out a
client-type override for the effect/effectFn two-stage forms without re-deriving the alias by hand.
Decoded<typeof itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema>[]): import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<void>;
(itemOrItems: | Hyperlink.Decoded<typeof itemSchema>
| readonly Hyperlink.Decoded<
typeof itemSchema
>[]
itemOrItems: import HyperlinkHyperlink.type Decoded<S extends Schema.Top> =
S["Type"] extends readonly unknown[]
? number extends S["Type"]["length"]
? S["Type"] extends readonly (infer E)[]
? readonly PrettyObject<E>[]
: S["Type"]
: S["Type"]
: PrettyObject<S["Type"]>
A schema's decoded value type (.Type), prettified — { to: string }, not the
Schema.Struct.ReadonlySide<…> alias, and with the schema's readonly dropped. Use it to spell out a
client-type override for the effect/effectFn two-stage forms without re-deriving the alias by hand.
Decoded<typeof itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema> | readonly import HyperlinkHyperlink.type Decoded<S extends Schema.Top> =
S["Type"] extends readonly unknown[]
? number extends S["Type"]["length"]
? S["Type"] extends readonly (infer E)[]
? readonly PrettyObject<E>[]
: S["Type"]
: S["Type"]
: PrettyObject<S["Type"]>
A schema's decoded value type (.Type), prettified — { to: string }, not the
Schema.Struct.ReadonlySide<…> alias, and with the schema's readonly dropped. Use it to spell out a
client-type override for the effect/effectFn two-stage forms without re-deriving the alias by hand.
Decoded<typeof itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema>[]): import EffectEffect.interface Effect<out A, out E = never, out R = never>The Effect interface defines a value that lazily describes a workflow or
job. The workflow requires some context R, and may fail with an error of
type E, or succeed with a value of type A.
When to use
Use when you need to represent a lazy, composable workflow that can require
services, fail with a typed error, or succeed with a typed value.
Details
Effect values model resourceful interaction with the outside world,
including synchronous, asynchronous, concurrent, and parallel interaction.
They use a fiber-based concurrency model, with built-in support for
scheduling, fine-grained interruption, structured concurrency, and high
scalability.
To run an Effect value, you need a Runtime, which is a type that is
capable of executing Effect values.
Effect<void>;
}>()(const itemOrItems: Schema.Union<
readonly [
Schema.Struct<F>,
Schema.$Array<Schema.Struct<F>>
]
>
const itemOrItems: {
Type: { [K in keyof Members]: Members[K]["Type"]; }[number];
Encoded: { [K in keyof Members]: Members[K]["Encoded"]; }[number];
DecodingServices: { [K in keyof Members]: Members[K]["DecodingServices"]; }[number];
EncodingServices: { [K in keyof Members]: Members[K]["EncodingServices"]; }[number];
Iso: { [K in keyof Members]: Members[K]["Iso"]; }[number];
members: Members;
mapMembers: (f: (members: readonly [Schema.Struct<F>, Schema.$Array<Schema.Struct<F>>]) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Union<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | ReadonlyArray<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeM…;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | ReadonlyArray<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMuta…;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | ReadonlyArray<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>>, ...ch…;
rebuild: (ast: Union<Arrays | Objects>) => Schema.Union<readonly [Schema.Struct<F>, Schema.$Array<Schema.Struct<F>>]>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | ReadonlyArray<Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>>, options?: MakeOptions) => Struct.…;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | ReadonlyArray<Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>>, options?: MakeOptions) => Option_…;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | ReadonlyArray<Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>>, options?: MakeOptions) => Effect.…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemOrItems).Method<Union<readonly [Struct<F>, $Array<Struct<F>>]>, Void, Never, false, MethodAnnotations, { (item: Hyperlink.Decoded<Struct<...>>): Effect.Effect<void>; (items: readonly Hyperlink.Decoded<Struct<...>>[]): Effect.Effect<void>; (itemOrItems: Hyperlink.Decoded<Struct<...>> | readonly Hyperlink.Decoded<Struct<...>>[]): Effect.Effect<void>; }>.annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>annotate({
description: stringdescription: "Enqueue an item (or a batch) at low priority (processed after high and normal).",
}),
// `enqueue` takes the entry array directly (same shape `events`/`release` produce).
enqueue: Hyperlink.Method<
Schema.$Array<
Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<
Schema.String,
Schema.Unknown
>
>
}>
>,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
},
Hyperlink.Derive
>
(property) enqueue: {
kind: MethodKind;
payload: P;
success: Su;
error: E;
stream: Str;
annotations: Ann;
annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
enqueue: import HyperlinkHyperlink.function effectFn<Schema.$Array<Schema.Struct<{
readonly item: Schema.Struct<F>;
readonly entryId: Schema.String;
readonly key: Schema.optional<Schema.String>;
readonly priority: Schema.Literals<readonly ["high", "normal", "low"]>;
readonly attempts: Schema.Number;
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc;
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>;
}>;
readonly batchId: Schema.optional<...>;
readonly releaseId: Schema.optional<...>;
readonly sourceHyperlinkId: Schema.optional<...>;
readonly attributes: Schema.optional<...>;
}>>>(payload: Schema.$Array<...>): Hyperlink.Method<...> (+7 overloads)
Two-stage
effectFn
— override the client-facing type with a Client that must narrow
the schema-derived shape: effectFn<Client>()(payload). Reshape freely (e.g. add overloads), but a
Client that would accept payloads the wire rejects fails to compile (payload resolves to never).
For an override that can't be a narrowing (a generic library), use
unsafeEffectFn
.
effectFn(import SchemaSchema.Array<Schema.Struct<{
readonly item: Schema.Struct<F>;
readonly entryId: Schema.String;
readonly key: Schema.optional<Schema.String>;
readonly priority: Schema.Literals<readonly ["high", "normal", "low"]>;
readonly attempts: Schema.Number;
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc;
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>;
}>;
readonly batchId: Schema.optional<...>;
readonly releaseId: Schema.optional<...>;
readonly sourceHyperlinkId: Schema.optional<...>;
readonly attributes: Schema.optional<...>;
}>>(self: Schema.Struct<...>): Schema.$Array<...>
export Array
Defines a ReadonlyArray schema for a given element schema.
Example (Defining an array of strings)
import { Schema } from "effect"
const schema = Schema.Array(Schema.String)
const result = Schema.decodeUnknownSync(schema)(["a", "b", "c"])
console.log(result)
// [ 'a', 'b', 'c' ]
Array(const queueEntry: <
Sch extends Schema.Top
>(
itemSchema: Sch
) => Schema.Struct<{
readonly item: Sch
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
A queue entry on the wire, parameterized by the per-instance itemSchema. Mirrors the
engine's QueueEntry<T>; used inside
queueEvent
.
queueEntry(itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema))).Method<$Array<Struct<{ readonly item: Struct<F>; readonly entryId: String; readonly key: optional<String>; readonly priority: Literals<readonly ["high", "normal", "low"]>; ... 5 more ...; readonly attributes: optional<...>; }>>, ... 4 more ..., Derive>.annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>annotate({
description: stringdescription:
"Re-inject existing entries (e.g. off the events stream / a release) — each re-enters " +
"at its own priority with its attempts preserved. The handoff / round-trip primitive.",
}),
release: Hyperlink.Method<
{
readonly options: Schema.optionalKey<
Schema.Struct<{
readonly scope: Schema.optionalKey<
Schema.Literal<"pendingOnly">
>
readonly releaseId: Schema.optionalKey<Schema.String>
readonly attributes: Schema.optionalKey<
Schema.$Record<
Schema.String,
Schema.Codec<
JsonValue,
JsonValue,
never,
never
>
>
>
}>
>
},
Schema.$Array<
Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<
Schema.String,
Schema.Unknown
>
>
}>
>,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
destructive: true
},
Hyperlink.Derive
>
(property) release: {
kind: MethodKind;
payload: P;
success: Su;
error: E;
stream: Str;
annotations: Ann;
annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
release: import HyperlinkHyperlink.function effectFn<{
readonly options: Schema.optionalKey<Schema.Struct<{
readonly scope: Schema.optionalKey<Schema.Literal<"pendingOnly">>;
readonly releaseId: Schema.optionalKey<Schema.String>;
readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>>;
}>>;
}, Schema.$Array<Schema.Struct<{
readonly item: Schema.Struct<F>;
readonly entryId: Schema.String;
readonly key: Schema.optional<Schema.String>;
... 6 more ...;
readonly attributes: Schema.optional<...>;
}>>>(payload: {
readonly options: Schema.optionalKey<Schema.Struct<{
readonly scope: Schema.optionalKey<Schema.Literal<"pendingOnly">>;
readonly releaseId: Schema.optionalKey<Schema.String>;
readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>>;
}>>;
}, success: Schema.$Array<...>): Hyperlink.Method<...> (+7 overloads)
Two-stage
effectFn
— override the client-facing type with a Client that must narrow
the schema-derived shape: effectFn<Client>()(payload). Reshape freely (e.g. add overloads), but a
Client that would accept payloads the wire rejects fails to compile (payload resolves to never).
For an override that can't be a narrowing (a generic library), use
unsafeEffectFn
.
effectFn(
{ options: Schema.optionalKey<
Schema.Struct<{
readonly scope: Schema.optionalKey<
Schema.Literal<"pendingOnly">
>
readonly releaseId: Schema.optionalKey<Schema.String>
readonly attributes: Schema.optionalKey<
Schema.$Record<
Schema.String,
Schema.Codec<
JsonValue,
JsonValue,
never,
never
>
>
>
}>
>
(property) options: {
Type: S["Type"];
Encoded: S["Encoded"];
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: S["Iso"];
schema: S;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: JsonValue; } | undefined; readonly scope?: 'pendingOnly' | undefined; }, readonly []>) => Schema.optionalKey<S…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: JsonValue } | undefined; readonly scope?: 'pendingOnly' | undefined }>) => Schema.optionalKey<Schema.Struct<{ rea…;
check: (checks_0: Check<{ readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: JsonValue } | undefined; readonly scope?: 'pendingOnly' | undefined }>, ...checks: Array<Check<{ readonly releaseId?: string | undefi…;
rebuild: (ast: Objects) => Schema.optionalKey<Schema.Struct<{ readonly scope: Schema.optionalKey<Schema.Literal<'pendingOnly'>>; readonly releaseId: Schema.optionalKey<Schema.String>; readonly attributes: Schema.optionalKey<Schema.$Record<Schema.St…;
make: (input: { readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: unknown } | undefined; readonly scope?: 'pendingOnly' | undefined }, options?: MakeOptions) => { readonly releaseId?: string | undefined; read…;
makeOption: (input: { readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: unknown } | undefined; readonly scope?: 'pendingOnly' | undefined }, options?: MakeOptions) => Option_.Option<{ readonly releaseId?: string | …;
makeEffect: (input: { readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: unknown } | undefined; readonly scope?: 'pendingOnly' | undefined }, options?: MakeOptions) => Effect.Effect<{ readonly releaseId?: string | u…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
options: import SchemaSchema.const optionalKey: optionalKeyLambda
<Schema.Struct<{
readonly scope: Schema.optionalKey<Schema.Literal<"pendingOnly">>;
readonly releaseId: Schema.optionalKey<Schema.String>;
readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>>;
}>>(self: Schema.Struct<{
readonly scope: Schema.optionalKey<Schema.Literal<"pendingOnly">>;
readonly releaseId: Schema.optionalKey<Schema.String>;
readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>>;
}>) => Schema.optionalKey<...>
Type-level representation returned by
optionalKey
.
Creates an exact optional key schema for struct fields. Unlike optional,
this creates exact optional properties (not | undefined) that can be
completely omitted from the object.
Example (Creating a struct with optional key)
import { Schema } from "effect"
const schema = Schema.Struct({
name: Schema.String,
age: Schema.optionalKey(Schema.Number)
})
// Type: { readonly name: string; readonly age?: number }
type Person = typeof schema["Type"]
optionalKey(const queueReleaseOptions: Schema.Struct<{
readonly scope: Schema.optionalKey<
Schema.Literal<"pendingOnly">
>
readonly releaseId: Schema.optionalKey<Schema.String>
readonly attributes: Schema.optionalKey<
Schema.$Record<
Schema.String,
Schema.Codec<
JsonValue,
JsonValue,
never,
never
>
>
>
}>
const queueReleaseOptions: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: { readonly scope: Schema.optionalKey<Schema.Literal<'pendingOnly'>>; readonly releaseId: Schema.optionalKey<Schema.String>; readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValu…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: JsonValue; } | undefined; readonly scope?: 'pendingOnly' | undefined; }, readonly []>) => Schema.Struct<{ read…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: JsonValue } | undefined; readonly scope?: 'pendingOnly' | undefined }>) => Schema.Struct<{ readonly scope: Schema…;
check: (checks_0: Check<{ readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: JsonValue } | undefined; readonly scope?: 'pendingOnly' | undefined }>, ...checks: Array<Check<{ readonly releaseId?: string | undefi…;
rebuild: (ast: Objects) => Schema.Struct<{ readonly scope: Schema.optionalKey<Schema.Literal<'pendingOnly'>>; readonly releaseId: Schema.optionalKey<Schema.String>; readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<…;
make: (input: { readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: unknown } | undefined; readonly scope?: 'pendingOnly' | undefined }, options?: MakeOptions) => { readonly releaseId?: string | undefined; read…;
makeOption: (input: { readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: unknown } | undefined; readonly scope?: 'pendingOnly' | undefined }, options?: MakeOptions) => Option_.Option<{ readonly releaseId?: string | …;
makeEffect: (input: { readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: unknown } | undefined; readonly scope?: 'pendingOnly' | undefined }, options?: MakeOptions) => Effect.Effect<{ readonly releaseId?: string | u…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Options for release / releaseEncoded (wire form of QueueReleaseOptions).
queueReleaseOptions) },
import SchemaSchema.Array<Schema.Struct<{
readonly item: Schema.Struct<F>;
readonly entryId: Schema.String;
readonly key: Schema.optional<Schema.String>;
readonly priority: Schema.Literals<readonly ["high", "normal", "low"]>;
readonly attempts: Schema.Number;
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc;
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>;
}>;
readonly batchId: Schema.optional<...>;
readonly releaseId: Schema.optional<...>;
readonly sourceHyperlinkId: Schema.optional<...>;
readonly attributes: Schema.optional<...>;
}>>(self: Schema.Struct<...>): Schema.$Array<...>
export Array
Defines a ReadonlyArray schema for a given element schema.
Example (Defining an array of strings)
import { Schema } from "effect"
const schema = Schema.Array(Schema.String)
const result = Schema.decodeUnknownSync(schema)(["a", "b", "c"])
console.log(result)
// [ 'a', 'b', 'c' ]
Array(const queueEntry: <
Sch extends Schema.Top
>(
itemSchema: Sch
) => Schema.Struct<{
readonly item: Sch
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
A queue entry on the wire, parameterized by the per-instance itemSchema. Mirrors the
engine's QueueEntry<T>; used inside
queueEvent
.
queueEntry(itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema)),
).Method<{ readonly options: optionalKey<Struct<{ readonly scope: optionalKey<Literal<"pendingOnly">>; readonly releaseId: optionalKey<String>; readonly attributes: optionalKey<...>; }>>; }, ... 4 more ..., Derive>.annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>annotate({
description: stringdescription:
"Export pending entries for handoff and remove them from this queue; returns them decoded.",
destructive: truedestructive: true,
}),
releaseEncoded: Hyperlink.Method<
{
readonly options: Schema.optionalKey<
Schema.Struct<{
readonly scope: Schema.optionalKey<
Schema.Literal<"pendingOnly">
>
readonly releaseId: Schema.optionalKey<Schema.String>
readonly attributes: Schema.optionalKey<
Schema.$Record<
Schema.String,
Schema.Codec<
JsonValue,
JsonValue,
never,
never
>
>
>
}>
>
},
Schema.$Array<
Schema.Struct<{
readonly payload: Schema.Codec<
JsonValue,
JsonValue,
never,
never
>
readonly item: Schema.Struct<{
readonly id: Schema.String
readonly version: Schema.String
readonly encoding: Schema.Literal<"json">
readonly jsonSchema: Schema.Unknown
}>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<
Schema.String,
Schema.Unknown
>
>
}>
>,
Schema.Union<
readonly [
typeof QueueMissingItemSchemaError,
typeof QueueItemEncodingError
]
>,
false,
Hyperlink.MethodAnnotations & {
description: string
destructive: true
},
Hyperlink.Derive
>
(property) releaseEncoded: {
kind: MethodKind;
payload: P;
success: Su;
error: E;
stream: Str;
annotations: Ann;
annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
releaseEncoded: import HyperlinkHyperlink.function effectFn<{
readonly options: Schema.optionalKey<Schema.Struct<{
readonly scope: Schema.optionalKey<Schema.Literal<"pendingOnly">>;
readonly releaseId: Schema.optionalKey<Schema.String>;
readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>>;
}>>;
}, Schema.$Array<Schema.Struct<{
readonly payload: Schema.Codec<JsonValue, JsonValue, never, never>;
readonly item: Schema.Struct<{
...;
}>;
... 8 more ...;
readonly attributes: Schema.optional<...>;
}>>, Schema.Union<...>>(payload: {
readonly options: Schema.optionalKey<Schema.Struct<{
readonly scope: Schema.optionalKey<Schema.Literal<"pendingOnly">>;
readonly releaseId: Schema.optionalKey<Schema.String>;
readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>>;
}>>;
}, success: Schema.$Array<...>, error: Schema.Union<...>): Hyperlink.Method<...> (+7 overloads)
Two-stage
effectFn
— override the client-facing type with a Client that must narrow
the schema-derived shape: effectFn<Client>()(payload). Reshape freely (e.g. add overloads), but a
Client that would accept payloads the wire rejects fails to compile (payload resolves to never).
For an override that can't be a narrowing (a generic library), use
unsafeEffectFn
.
effectFn(
{ options: Schema.optionalKey<
Schema.Struct<{
readonly scope: Schema.optionalKey<
Schema.Literal<"pendingOnly">
>
readonly releaseId: Schema.optionalKey<Schema.String>
readonly attributes: Schema.optionalKey<
Schema.$Record<
Schema.String,
Schema.Codec<
JsonValue,
JsonValue,
never,
never
>
>
>
}>
>
(property) options: {
Type: S["Type"];
Encoded: S["Encoded"];
DecodingServices: S["DecodingServices"];
EncodingServices: S["EncodingServices"];
Iso: S["Iso"];
schema: S;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: JsonValue; } | undefined; readonly scope?: 'pendingOnly' | undefined; }, readonly []>) => Schema.optionalKey<S…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: JsonValue } | undefined; readonly scope?: 'pendingOnly' | undefined }>) => Schema.optionalKey<Schema.Struct<{ rea…;
check: (checks_0: Check<{ readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: JsonValue } | undefined; readonly scope?: 'pendingOnly' | undefined }>, ...checks: Array<Check<{ readonly releaseId?: string | undefi…;
rebuild: (ast: Objects) => Schema.optionalKey<Schema.Struct<{ readonly scope: Schema.optionalKey<Schema.Literal<'pendingOnly'>>; readonly releaseId: Schema.optionalKey<Schema.String>; readonly attributes: Schema.optionalKey<Schema.$Record<Schema.St…;
make: (input: { readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: unknown } | undefined; readonly scope?: 'pendingOnly' | undefined }, options?: MakeOptions) => { readonly releaseId?: string | undefined; read…;
makeOption: (input: { readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: unknown } | undefined; readonly scope?: 'pendingOnly' | undefined }, options?: MakeOptions) => Option_.Option<{ readonly releaseId?: string | …;
makeEffect: (input: { readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: unknown } | undefined; readonly scope?: 'pendingOnly' | undefined }, options?: MakeOptions) => Effect.Effect<{ readonly releaseId?: string | u…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
options: import SchemaSchema.const optionalKey: optionalKeyLambda
<Schema.Struct<{
readonly scope: Schema.optionalKey<Schema.Literal<"pendingOnly">>;
readonly releaseId: Schema.optionalKey<Schema.String>;
readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>>;
}>>(self: Schema.Struct<{
readonly scope: Schema.optionalKey<Schema.Literal<"pendingOnly">>;
readonly releaseId: Schema.optionalKey<Schema.String>;
readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>>;
}>) => Schema.optionalKey<...>
Type-level representation returned by
optionalKey
.
Creates an exact optional key schema for struct fields. Unlike optional,
this creates exact optional properties (not | undefined) that can be
completely omitted from the object.
Example (Creating a struct with optional key)
import { Schema } from "effect"
const schema = Schema.Struct({
name: Schema.String,
age: Schema.optionalKey(Schema.Number)
})
// Type: { readonly name: string; readonly age?: number }
type Person = typeof schema["Type"]
optionalKey(const queueReleaseOptions: Schema.Struct<{
readonly scope: Schema.optionalKey<
Schema.Literal<"pendingOnly">
>
readonly releaseId: Schema.optionalKey<Schema.String>
readonly attributes: Schema.optionalKey<
Schema.$Record<
Schema.String,
Schema.Codec<
JsonValue,
JsonValue,
never,
never
>
>
>
}>
const queueReleaseOptions: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: { readonly scope: Schema.optionalKey<Schema.Literal<'pendingOnly'>>; readonly releaseId: Schema.optionalKey<Schema.String>; readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValu…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: JsonValue; } | undefined; readonly scope?: 'pendingOnly' | undefined; }, readonly []>) => Schema.Struct<{ read…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: JsonValue } | undefined; readonly scope?: 'pendingOnly' | undefined }>) => Schema.Struct<{ readonly scope: Schema…;
check: (checks_0: Check<{ readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: JsonValue } | undefined; readonly scope?: 'pendingOnly' | undefined }>, ...checks: Array<Check<{ readonly releaseId?: string | undefi…;
rebuild: (ast: Objects) => Schema.Struct<{ readonly scope: Schema.optionalKey<Schema.Literal<'pendingOnly'>>; readonly releaseId: Schema.optionalKey<Schema.String>; readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<…;
make: (input: { readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: unknown } | undefined; readonly scope?: 'pendingOnly' | undefined }, options?: MakeOptions) => { readonly releaseId?: string | undefined; read…;
makeOption: (input: { readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: unknown } | undefined; readonly scope?: 'pendingOnly' | undefined }, options?: MakeOptions) => Option_.Option<{ readonly releaseId?: string | …;
makeEffect: (input: { readonly releaseId?: string | undefined; readonly attributes?: { readonly [x: string]: unknown } | undefined; readonly scope?: 'pendingOnly' | undefined }, options?: MakeOptions) => Effect.Effect<{ readonly releaseId?: string | u…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Options for release / releaseEncoded (wire form of QueueReleaseOptions).
queueReleaseOptions) },
import SchemaSchema.Array<Schema.Struct<{
readonly payload: Schema.Codec<JsonValue, JsonValue, never, never>;
readonly item: Schema.Struct<{
readonly id: Schema.String;
readonly version: Schema.String;
readonly encoding: Schema.Literal<"json">;
readonly jsonSchema: Schema.Unknown;
}>;
readonly entryId: Schema.String;
readonly key: Schema.optional<Schema.String>;
readonly priority: Schema.Literals<readonly ["high", "normal", "low"]>;
readonly attempts: Schema.Number;
... 4 more ...;
readonly attributes: Schema.optional<...>;
}>>(self: Schema.Struct<...>): Schema.$Array<...>
export Array
Defines a ReadonlyArray schema for a given element schema.
Example (Defining an array of strings)
import { Schema } from "effect"
const schema = Schema.Array(Schema.String)
const result = Schema.decodeUnknownSync(schema)(["a", "b", "c"])
console.log(result)
// [ 'a', 'b', 'c' ]
Array(const queueEncodedEntry: Schema.Struct<{
readonly payload: Schema.Codec<
JsonValue,
JsonValue,
never,
never
>
readonly item: Schema.Struct<{
readonly id: Schema.String
readonly version: Schema.String
readonly encoding: Schema.Literal<"json">
readonly jsonSchema: Schema.Unknown
}>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
const queueEncodedEntry: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: { readonly payload: Schema.Codec<JsonValue, JsonValue, never, never>; readonly item: Schema.Struct<{ readonly id: Schema.String; readonly version: Schema.String; readonly encoding: Schema.Literal<'json'>; readonly jsonSchema: …;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly payload: JsonValue; readonly item: Schema.Struct.ReadonlySide<{ readonly id: Schema.String; readonly version: Schema.String; readonly encoding: Schema.Literal<'json'>; readonly jsonSchema:…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly payload: JsonValue; readonly item: Schema.Struct.ReadonlySide<{ readonly id: Schema.String; readonly version: Schema.String; readonly encoding: Schema.Literal<'json'>; readonly jsonSchema: Sc…;
check: (checks_0: Check<{ readonly payload: JsonValue; readonly item: Schema.Struct.ReadonlySide<{ readonly id: Schema.String; readonly version: Schema.String; readonly encoding: Schema.Literal<'json'>; readonly jsonSchema: Schema.Unknown }, 'Typ…;
rebuild: (ast: Objects) => Schema.Struct<{ readonly payload: Schema.Codec<JsonValue, JsonValue, never, never>; readonly item: Schema.Struct<{ readonly id: Schema.String; readonly version: Schema.String; readonly encoding: Schema.Literal<'json'>; re…;
make: (input: { readonly payload: unknown; readonly item: Struct.ReadonlyMakeIn<{ readonly id: String; readonly version: String; readonly encoding: Literal<'json'>; readonly jsonSchema: Unknown }>; readonly entryId: string; readonly priority: 'h…;
makeOption: (input: { readonly payload: unknown; readonly item: Struct.ReadonlyMakeIn<{ readonly id: String; readonly version: String; readonly encoding: Literal<'json'>; readonly jsonSchema: Unknown }>; readonly entryId: string; readonly priority: 'h…;
makeEffect: (input: { readonly payload: unknown; readonly item: Struct.ReadonlyMakeIn<{ readonly id: String; readonly version: String; readonly encoding: Literal<'json'>; readonly jsonSchema: Unknown }>; readonly entryId: string; readonly priority: 'h…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
A queue entry in encoded / wire form — the element returned by releaseEncoded. The
item is replaced by its codec descriptor and the value lives in payload (already
JSON-encoded), so an encoded entry crosses RPC without the receiver knowing the item schema.
Mirrors the engine's QueueEncodedEntry.
queueEncodedEntry),
const queueReleaseEncodingError: Schema.Union<
readonly [
typeof QueueMissingItemSchemaError,
typeof QueueItemEncodingError
]
>
const queueReleaseEncodingError: {
Type: { [K in keyof Members]: Members[K]["Type"]; }[number];
Encoded: { [K in keyof Members]: Members[K]["Encoded"]; }[number];
DecodingServices: { [K in keyof Members]: Members[K]["DecodingServices"]; }[number];
EncodingServices: { [K in keyof Members]: Members[K]["EncodingServices"]; }[number];
Iso: { [K in keyof Members]: Members[K]["Iso"]; }[number];
members: Members;
mapMembers: (f: (members: readonly [typeof QueueMissingItemSchemaError, typeof QueueItemEncodingError]) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Union<{ [K in keyof Readonly<To>]: Readonly<To>[K];…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<QueueMissingItemSchemaError | QueueItemEncodingError, readonly []>) => Schema.Union<readonly [typeof QueueMissingItemSchemaError, typeof QueueItemEncodingError]>;
annotateKey: (annotations: Schema.Annotations.Key<QueueMissingItemSchemaError | QueueItemEncodingError>) => Schema.Union<readonly [typeof QueueMissingItemSchemaError, typeof QueueItemEncodingError]>;
check: (checks_0: Check<QueueMissingItemSchemaError | QueueItemEncodingError>, ...checks: Array<Check<QueueMissingItemSchemaError | QueueItemEncodingError>>) => Schema.Union<readonly [typeof QueueMissingItemSchemaError, typeof QueueItemEncodingEr…;
rebuild: (ast: Union<Declaration>) => Schema.Union<readonly [typeof QueueMissingItemSchemaError, typeof QueueItemEncodingError]>;
make: (input: QueueMissingItemSchemaError | QueueItemEncodingError, options?: MakeOptions) => QueueMissingItemSchemaError | QueueItemEncodingError;
makeOption: (input: QueueMissingItemSchemaError | QueueItemEncodingError, options?: MakeOptions) => Option_.Option<QueueMissingItemSchemaError | QueueItemEncodingError>;
makeEffect: (input: QueueMissingItemSchemaError | QueueItemEncodingError, options?: MakeOptions) => Effect.Effect<QueueMissingItemSchemaError | QueueItemEncodingError, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
The releaseEncoded failure channel — the wire-encodable union of the engine's encode
errors (now Schema.TaggedErrorClass, so they are both yieldable and RPC-encodable).
queueReleaseEncodingError,
).Method<{ readonly options: optionalKey<Struct<{ readonly scope: optionalKey<Literal<"pendingOnly">>; readonly releaseId: optionalKey<String>; readonly attributes: optionalKey<...>; }>>; }, ... 4 more ..., Derive>.annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>annotate({
description: stringdescription:
"Export pending entries in encoded/wire form for remote handoff (requires an itemSchema).",
destructive: truedestructive: true,
}),
deadLetter: Hyperlink.Method<
{
readonly selector: Schema.Struct<{
readonly entryId: Schema.optionalKey<Schema.String>
readonly key: Schema.optional<Schema.String>
readonly item: Schema.optionalKey<
Schema.Struct<F>
>
}>
readonly options: Schema.Struct<{
readonly reason: Schema.String
readonly attributes: Schema.optionalKey<
Schema.$Record<
Schema.String,
Schema.Codec<
JsonValue,
JsonValue,
never,
never
>
>
>
}>
},
Schema.$Array<
Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<
Schema.String,
Schema.Unknown
>
>
}>
>,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
destructive: true
},
Hyperlink.Derive
>
(property) deadLetter: {
kind: MethodKind;
payload: P;
success: Su;
error: E;
stream: Str;
annotations: Ann;
annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
deadLetter: import HyperlinkHyperlink.function effectFn<{
readonly selector: Schema.Struct<{
readonly entryId: Schema.optionalKey<Schema.String>;
readonly key: Schema.optional<Schema.String>;
readonly item: Schema.optionalKey<Schema.Struct<F>>;
}>;
readonly options: Schema.Struct<{
readonly reason: Schema.String;
readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>>;
}>;
}, Schema.$Array<Schema.Struct<{
readonly item: Schema.Struct<...>;
... 8 more ...;
readonly attributes: Schema.optional<...>;
}>>>(payload: {
readonly selector: Schema.Struct<{
readonly entryId: Schema.optionalKey<Schema.String>;
readonly key: Schema.optional<Schema.String>;
readonly item: Schema.optionalKey<Schema.Struct<F>>;
}>;
readonly options: Schema.Struct<{
readonly reason: Schema.String;
readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>>;
}>;
}, success: Schema.$Array<...>): Hyperlink.Method<...> (+7 overloads)
Two-stage
effectFn
— override the client-facing type with a Client that must narrow
the schema-derived shape: effectFn<Client>()(payload). Reshape freely (e.g. add overloads), but a
Client that would accept payloads the wire rejects fails to compile (payload resolves to never).
For an override that can't be a narrowing (a generic library), use
unsafeEffectFn
.
effectFn(
{
selector: Schema.Struct<{
readonly entryId: Schema.optionalKey<Schema.String>
readonly key: Schema.optional<Schema.String>
readonly item: Schema.optionalKey<
Schema.Struct<F>
>
}>
(property) selector: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: { readonly entryId: Schema.optionalKey<Schema.String>; readonly key: Schema.optional<Schema.String>; readonly item: Schema.optionalKey<Schema.Struct<F>> }) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly key?: string | undefined; readonly item?: Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | undefined; readonly entryId?: string | undefi…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly key?: string | undefined; readonly item?: Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | undefined; readonly entryId?: string | undefined…;
check: (checks_0: Check<{ readonly key?: string | undefined; readonly item?: Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | undefined; readonly entryId?: string | undefined }>, ...checks: Arra…;
rebuild: (ast: Objects) => Schema.Struct<{ readonly entryId: Schema.optionalKey<Schema.String>; readonly key: Schema.optional<Schema.String>; readonly item: Schema.optionalKey<Schema.Struct<F>> }>;
make: (input: { readonly key?: string | undefined; readonly item?: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | undefined; readonly entryId?: string | undefined }, options?: MakeOptions) => { readon…;
makeOption: (input: { readonly key?: string | undefined; readonly item?: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | undefined; readonly entryId?: string | undefined }, options?: MakeOptions) => Option_.…;
makeEffect: (input: { readonly key?: string | undefined; readonly item?: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | undefined; readonly entryId?: string | undefined }, options?: MakeOptions) => Effect.E…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
selector: const queueEntrySelector: <
Sch extends Schema.Top
>(
itemSchema: Sch
) => Schema.Struct<{
readonly entryId: Schema.optionalKey<Schema.String>
readonly key: Schema.optional<Schema.String>
readonly item: Schema.optionalKey<Sch>
}>
Selector for the entry-routing verbs (deadLetter / drop), parameterized by itemSchema
(it can match on item). Mirrors the engine's QueueEntrySelector<T>. Over the wire a
selector (typically entryId) identifies the target — routing a full QueueEntry is a local
convenience that reduces to its entryId.
queueEntrySelector(itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema),
options: Schema.Struct<{
readonly reason: Schema.String
readonly attributes: Schema.optionalKey<
Schema.$Record<
Schema.String,
Schema.Codec<
JsonValue,
JsonValue,
never,
never
>
>
>
}>
(property) options: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: { readonly reason: Schema.String; readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>> }) => To, options?: { readonly unsafePreserveChecks?: boolean | undefin…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue; } | undefined; }, readonly []>) => Schema.Struct<{ readonly reason: Schema.String; readonly attributes: Schema.opti…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefined }>) => Schema.Struct<{ readonly reason: Schema.String; readonly attributes: Schema.optionalKey<Schema.$Re…;
check: (checks_0: Check<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefined }>, ...checks: Array<Check<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefined }…;
rebuild: (ast: Objects) => Schema.Struct<{ readonly reason: Schema.String; readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>> }>;
make: (input: { readonly reason: string; readonly attributes?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => { readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefined };
makeOption: (input: { readonly reason: string; readonly attributes?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => Option_.Option<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undef…;
makeEffect: (input: { readonly reason: string; readonly attributes?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => Effect.Effect<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefi…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
options: const queueRouteOptions: Schema.Struct<{
readonly reason: Schema.String
readonly attributes: Schema.optionalKey<
Schema.$Record<
Schema.String,
Schema.Codec<
JsonValue,
JsonValue,
never,
never
>
>
>
}>
const queueRouteOptions: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: { readonly reason: Schema.String; readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>> }) => To, options?: { readonly unsafePreserveChecks?: boolean | undefin…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue; } | undefined; }, readonly []>) => Schema.Struct<{ readonly reason: Schema.String; readonly attributes: Schema.opti…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefined }>) => Schema.Struct<{ readonly reason: Schema.String; readonly attributes: Schema.optionalKey<Schema.$Re…;
check: (checks_0: Check<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefined }>, ...checks: Array<Check<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefined }…;
rebuild: (ast: Objects) => Schema.Struct<{ readonly reason: Schema.String; readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>> }>;
make: (input: { readonly reason: string; readonly attributes?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => { readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefined };
makeOption: (input: { readonly reason: string; readonly attributes?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => Option_.Option<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undef…;
makeEffect: (input: { readonly reason: string; readonly attributes?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => Effect.Effect<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefi…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Options for deadLetter / drop (wire form of QueueRouteOptions).
queueRouteOptions,
},
import SchemaSchema.Array<Schema.Struct<{
readonly item: Schema.Struct<F>;
readonly entryId: Schema.String;
readonly key: Schema.optional<Schema.String>;
readonly priority: Schema.Literals<readonly ["high", "normal", "low"]>;
readonly attempts: Schema.Number;
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc;
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>;
}>;
readonly batchId: Schema.optional<...>;
readonly releaseId: Schema.optional<...>;
readonly sourceHyperlinkId: Schema.optional<...>;
readonly attributes: Schema.optional<...>;
}>>(self: Schema.Struct<...>): Schema.$Array<...>
export Array
Defines a ReadonlyArray schema for a given element schema.
Example (Defining an array of strings)
import { Schema } from "effect"
const schema = Schema.Array(Schema.String)
const result = Schema.decodeUnknownSync(schema)(["a", "b", "c"])
console.log(result)
// [ 'a', 'b', 'c' ]
Array(const queueEntry: <
Sch extends Schema.Top
>(
itemSchema: Sch
) => Schema.Struct<{
readonly item: Sch
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
A queue entry on the wire, parameterized by the per-instance itemSchema. Mirrors the
engine's QueueEntry<T>; used inside
queueEvent
.
queueEntry(itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema)),
).Method<{ readonly selector: Struct<{ readonly entryId: optionalKey<String>; readonly key: optional<String>; readonly item: optionalKey<Struct<F>>; }>; readonly options: Struct<...>; }, ... 4 more ..., Derive>.annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>annotate({
description: stringdescription: "Remove pending entries matching the selector and route them to a dead letter.",
destructive: truedestructive: true,
}),
drop: Hyperlink.Method<
{
readonly selector: Schema.Struct<{
readonly entryId: Schema.optionalKey<Schema.String>
readonly key: Schema.optional<Schema.String>
readonly item: Schema.optionalKey<
Schema.Struct<F>
>
}>
readonly options: Schema.Struct<{
readonly reason: Schema.String
readonly attributes: Schema.optionalKey<
Schema.$Record<
Schema.String,
Schema.Codec<
JsonValue,
JsonValue,
never,
never
>
>
>
}>
},
Schema.$Array<
Schema.Struct<{
readonly item: Schema.Struct<F>
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<
Schema.String,
Schema.Unknown
>
>
}>
>,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
destructive: true
},
Hyperlink.Derive
>
(property) drop: {
kind: MethodKind;
payload: P;
success: Su;
error: E;
stream: Str;
annotations: Ann;
annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
drop: import HyperlinkHyperlink.function effectFn<{
readonly selector: Schema.Struct<{
readonly entryId: Schema.optionalKey<Schema.String>;
readonly key: Schema.optional<Schema.String>;
readonly item: Schema.optionalKey<Schema.Struct<F>>;
}>;
readonly options: Schema.Struct<{
readonly reason: Schema.String;
readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>>;
}>;
}, Schema.$Array<Schema.Struct<{
readonly item: Schema.Struct<...>;
... 8 more ...;
readonly attributes: Schema.optional<...>;
}>>>(payload: {
readonly selector: Schema.Struct<{
readonly entryId: Schema.optionalKey<Schema.String>;
readonly key: Schema.optional<Schema.String>;
readonly item: Schema.optionalKey<Schema.Struct<F>>;
}>;
readonly options: Schema.Struct<{
readonly reason: Schema.String;
readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>>;
}>;
}, success: Schema.$Array<...>): Hyperlink.Method<...> (+7 overloads)
Two-stage
effectFn
— override the client-facing type with a Client that must narrow
the schema-derived shape: effectFn<Client>()(payload). Reshape freely (e.g. add overloads), but a
Client that would accept payloads the wire rejects fails to compile (payload resolves to never).
For an override that can't be a narrowing (a generic library), use
unsafeEffectFn
.
effectFn(
{
selector: Schema.Struct<{
readonly entryId: Schema.optionalKey<Schema.String>
readonly key: Schema.optional<Schema.String>
readonly item: Schema.optionalKey<
Schema.Struct<F>
>
}>
(property) selector: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: { readonly entryId: Schema.optionalKey<Schema.String>; readonly key: Schema.optional<Schema.String>; readonly item: Schema.optionalKey<Schema.Struct<F>> }) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly key?: string | undefined; readonly item?: Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | undefined; readonly entryId?: string | undefi…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly key?: string | undefined; readonly item?: Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | undefined; readonly entryId?: string | undefined…;
check: (checks_0: Check<{ readonly key?: string | undefined; readonly item?: Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>> | undefined; readonly entryId?: string | undefined }>, ...checks: Arra…;
rebuild: (ast: Objects) => Schema.Struct<{ readonly entryId: Schema.optionalKey<Schema.String>; readonly key: Schema.optional<Schema.String>; readonly item: Schema.optionalKey<Schema.Struct<F>> }>;
make: (input: { readonly key?: string | undefined; readonly item?: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | undefined; readonly entryId?: string | undefined }, options?: MakeOptions) => { readon…;
makeOption: (input: { readonly key?: string | undefined; readonly item?: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | undefined; readonly entryId?: string | undefined }, options?: MakeOptions) => Option_.…;
makeEffect: (input: { readonly key?: string | undefined; readonly item?: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>> | undefined; readonly entryId?: string | undefined }, options?: MakeOptions) => Effect.E…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
selector: const queueEntrySelector: <
Sch extends Schema.Top
>(
itemSchema: Sch
) => Schema.Struct<{
readonly entryId: Schema.optionalKey<Schema.String>
readonly key: Schema.optional<Schema.String>
readonly item: Schema.optionalKey<Sch>
}>
Selector for the entry-routing verbs (deadLetter / drop), parameterized by itemSchema
(it can match on item). Mirrors the engine's QueueEntrySelector<T>. Over the wire a
selector (typically entryId) identifies the target — routing a full QueueEntry is a local
convenience that reduces to its entryId.
queueEntrySelector(itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema),
options: Schema.Struct<{
readonly reason: Schema.String
readonly attributes: Schema.optionalKey<
Schema.$Record<
Schema.String,
Schema.Codec<
JsonValue,
JsonValue,
never,
never
>
>
>
}>
(property) options: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: { readonly reason: Schema.String; readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>> }) => To, options?: { readonly unsafePreserveChecks?: boolean | undefin…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue; } | undefined; }, readonly []>) => Schema.Struct<{ readonly reason: Schema.String; readonly attributes: Schema.opti…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefined }>) => Schema.Struct<{ readonly reason: Schema.String; readonly attributes: Schema.optionalKey<Schema.$Re…;
check: (checks_0: Check<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefined }>, ...checks: Array<Check<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefined }…;
rebuild: (ast: Objects) => Schema.Struct<{ readonly reason: Schema.String; readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>> }>;
make: (input: { readonly reason: string; readonly attributes?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => { readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefined };
makeOption: (input: { readonly reason: string; readonly attributes?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => Option_.Option<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undef…;
makeEffect: (input: { readonly reason: string; readonly attributes?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => Effect.Effect<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefi…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
options: const queueRouteOptions: Schema.Struct<{
readonly reason: Schema.String
readonly attributes: Schema.optionalKey<
Schema.$Record<
Schema.String,
Schema.Codec<
JsonValue,
JsonValue,
never,
never
>
>
>
}>
const queueRouteOptions: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: { readonly reason: Schema.String; readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>> }) => To, options?: { readonly unsafePreserveChecks?: boolean | undefin…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue; } | undefined; }, readonly []>) => Schema.Struct<{ readonly reason: Schema.String; readonly attributes: Schema.opti…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefined }>) => Schema.Struct<{ readonly reason: Schema.String; readonly attributes: Schema.optionalKey<Schema.$Re…;
check: (checks_0: Check<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefined }>, ...checks: Array<Check<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefined }…;
rebuild: (ast: Objects) => Schema.Struct<{ readonly reason: Schema.String; readonly attributes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<JsonValue, JsonValue, never, never>>> }>;
make: (input: { readonly reason: string; readonly attributes?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => { readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefined };
makeOption: (input: { readonly reason: string; readonly attributes?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => Option_.Option<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undef…;
makeEffect: (input: { readonly reason: string; readonly attributes?: { readonly [x: string]: unknown } | undefined }, options?: MakeOptions) => Effect.Effect<{ readonly reason: string; readonly attributes?: { readonly [x: string]: JsonValue } | undefi…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Options for deadLetter / drop (wire form of QueueRouteOptions).
queueRouteOptions,
},
import SchemaSchema.Array<Schema.Struct<{
readonly item: Schema.Struct<F>;
readonly entryId: Schema.String;
readonly key: Schema.optional<Schema.String>;
readonly priority: Schema.Literals<readonly ["high", "normal", "low"]>;
readonly attempts: Schema.Number;
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc;
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>;
}>;
readonly batchId: Schema.optional<...>;
readonly releaseId: Schema.optional<...>;
readonly sourceHyperlinkId: Schema.optional<...>;
readonly attributes: Schema.optional<...>;
}>>(self: Schema.Struct<...>): Schema.$Array<...>
export Array
Defines a ReadonlyArray schema for a given element schema.
Example (Defining an array of strings)
import { Schema } from "effect"
const schema = Schema.Array(Schema.String)
const result = Schema.decodeUnknownSync(schema)(["a", "b", "c"])
console.log(result)
// [ 'a', 'b', 'c' ]
Array(const queueEntry: <
Sch extends Schema.Top
>(
itemSchema: Sch
) => Schema.Struct<{
readonly item: Sch
readonly entryId: Schema.String
readonly key: Schema.optional<Schema.String>
readonly priority: Schema.Literals<
readonly ["high", "normal", "low"]
>
readonly attempts: Schema.Number
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
readonly batchId: Schema.optional<Schema.String>
readonly releaseId: Schema.optional<Schema.String>
readonly sourceHyperlinkId: Schema.optional<Schema.String>
readonly attributes: Schema.optional<
Schema.$Record<Schema.String, Schema.Unknown>
>
}>
A queue entry on the wire, parameterized by the per-instance itemSchema. Mirrors the
engine's QueueEntry<T>; used inside
queueEvent
.
queueEntry(itemSchema: Schema.Struct<F>(parameter) itemSchema: {
Type: Struct.Type<Fields>;
Encoded: Struct.Encoded<Fields>;
DecodingServices: Struct.DecodingServices<Fields>;
EncodingServices: Struct.EncodingServices<Fields>;
Iso: Struct.Iso<Fields>;
fields: Fields;
mapFields: (f: (fields: F) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | undefined) => Schema.Struct<{ [K in keyof Readonly<To>]: Readonly<To>[K]; }>;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>, readonly []>) => Schema.Struct<F>;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>) => Schema.Struct<F>;
check: (checks_0: Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>>, ...checks: Array<Check<Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, Schema.Struct.TypeMutableKeys<F>>…;
rebuild: (ast: Objects) => Schema.Struct<F>;
make: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>;
makeOption: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Option_.Option<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>>;
makeEffect: (input: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>, options?: MakeOptions) => Effect.Effect<Struct.View<F, 'Type', Struct.TypeOptionalKeys<F>, Struct.TypeMutableKeys<F>>, SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
itemSchema)),
).Method<{ readonly selector: Struct<{ readonly entryId: optionalKey<String>; readonly key: optional<String>; readonly item: optionalKey<Struct<F>>; }>; readonly options: Struct<...>; }, ... 4 more ..., Derive>.annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>annotate({
description: stringdescription: "Remove pending entries matching the selector without preserving them.",
destructive: truedestructive: true,
}),
events: Hyperlink.Method<undefined, Schema.Union<readonly [Schema.TaggedStruct<"Start", {
readonly key: Schema.String;
}>, Schema.TaggedStruct<"Enqueued", {
readonly entries: Schema.$Array<Schema.Struct<{
readonly item: Schema.Struct<F>;
readonly entryId: Schema.String;
readonly key: Schema.optional<Schema.String>;
readonly priority: Schema.Literals<readonly ["high", "normal", "low"]>;
readonly attempts: Schema.Number;
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc;
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly interruptedAt: Schema.optionalKey<...>;
}>;
readonly batchId: Schema.optional<...>;
readonly releaseId: Schema.optional<...>;
readonly sourceHyperlinkId: Schema.optional<...>;
readonly attributes: Schema.optional<...>;
}>>;
readonly priority: Schema.Literals<...>;
readonly batchId: Schema.optionalKey<...>;
}>, ... 12 more ..., Schema.TaggedStruct<...>]>, Schema.Never, true, Hyperlink.MethodAnnotations & {
...;
}, Hyperlink.Derive>
(property) events: {
kind: MethodKind;
payload: P;
success: Su;
error: E;
stream: Str;
annotations: Ann;
annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
events: import HyperlinkHyperlink.function stream<Schema.Union<readonly [Schema.TaggedStruct<"Start", {
readonly key: Schema.String;
}>, Schema.TaggedStruct<"Enqueued", {
readonly entries: Schema.$Array<Schema.Struct<{
readonly item: Schema.Struct<F>;
readonly entryId: Schema.String;
readonly key: Schema.optional<Schema.String>;
readonly priority: Schema.Literals<readonly ["high", "normal", "low"]>;
readonly attempts: Schema.Number;
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc;
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly interruptedAt: Schema.optionalKey<...>;
}>;
readonly batchId: Schema.optional<...>;
readonly releaseId: Schema.optional<...>;
readonly sourceHyperlinkId: Schema.optional<...>;
readonly attributes: Schema.optional<...>;
}>>;
readonly priority: Schema.Literals<...>;
readonly batchId: Schema.optionalKey<...>;
}>, ... 12 more ..., Schema.TaggedStruct<...>]>>(success: Schema.Union<...>): Hyperlink.Method<...> (+5 overloads)
Define a stream (a live, idempotent push source) whose elements are success. The
service member surfaces as a Stream<Success, Error> (a property, or (payload) => Stream
when a payload is declared) rather than an Effect — drive dashboard atoms, a CLI
--watch, or a TUI from it. Conventionally named changes when it carries a HyperService's
whole observable state (a snapshot stream); back it with a SubscriptionRef's .changes.
Counts as a query for tools (an idempotent read). success is the element schema and
error (if any) is the stream error schema; both must be encodable (they cross RPC).
payload is a single schema or struct fields — same as Effect's Rpc.make.
changes: Hyperlink.stream(QueueSnapshot).annotate({ description: "Live queue state." }),
tail: Hyperlink.stream(LogLine, { payload: Schema.Struct({ since: Schema.Number }) }),
stream(const eventSchema: Schema.Union<readonly [Schema.TaggedStruct<"Start", {
readonly key: Schema.String;
}>, Schema.TaggedStruct<"Enqueued", {
readonly entries: Schema.$Array<Schema.Struct<{
readonly item: Schema.Struct<F>;
readonly entryId: Schema.String;
readonly key: Schema.optional<Schema.String>;
readonly priority: Schema.Literals<readonly ["high", "normal", "low"]>;
readonly attempts: Schema.Number;
readonly timestamps: Schema.Struct<{
readonly enqueuedAt: Schema.DateTimeUtc;
readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>;
readonly interruptedAt: Schema.optionalKey<...>;
}>;
readonly batchId: Schema.optional<...>;
readonly releaseId: Schema.optional<...>;
readonly sourceHyperlinkId: Schema.optional<...>;
readonly attributes: Schema.optional<...>;
}>>;
readonly priority: Schema.Literals<...>;
readonly batchId: Schema.optionalKey<...>;
}>, ... 12 more ..., Schema.TaggedStruct<...>]>
const eventSchema: {
Type: { [K in keyof Members]: Members[K]["Type"]; }[number];
Encoded: { [K in keyof Members]: Members[K]["Encoded"]; }[number];
DecodingServices: { [K in keyof Members]: Members[K]["DecodingServices"]; }[number];
EncodingServices: { [K in keyof Members]: Members[K]["EncodingServices"]; }[number];
Iso: { [K in keyof Members]: Members[K]["Iso"]; }[number];
members: Members;
mapMembers: (f: (members: readonly [Schema.TaggedStruct<'Start', { readonly key: Schema.String }>, Schema.TaggedStruct<'Enqueued', { readonly entries: Schema.$Array<Schema.Struct<{ readonly item: Schema.Struct<F>; readonly entryId: Schema.String; read…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'Start'>; readonly key: Schema.String; }, 'Type'> | { readonly entries: ReadonlyArray<{ readonly item: Schema.Struct.View<F, 'Type', Schema.Stru…;
annotateKey: (annotations: Schema.Annotations.Key<Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'Start'>; readonly key: Schema.String }, 'Type'> | { readonly entries: ReadonlyArray<{ readonly item: Schema.Struct.View<F, 'Type', Schema.Struct.T…;
check: (checks_0: Check<Schema.Struct.ReadonlySide<{ readonly _tag: Schema.tag<'Start'>; readonly key: Schema.String }, 'Type'> | { readonly entries: ReadonlyArray<{ readonly item: Schema.Struct.View<F, 'Type', Schema.Struct.TypeOptionalKeys<F>, …;
rebuild: (ast: Union<Objects>) => Schema.Union<readonly [Schema.TaggedStruct<'Start', { readonly key: Schema.String }>, Schema.TaggedStruct<'Enqueued', { readonly entries: Schema.$Array<Schema.Struct<{ readonly item: Schema.Struct<F>; readonly entr…;
make: (input: { readonly key: string; readonly _tag?: 'Start' | undefined } | { readonly entries: ReadonlyArray<{ readonly item: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>; readonly entryId: string;…;
makeOption: (input: { readonly key: string; readonly _tag?: 'Start' | undefined } | { readonly entries: ReadonlyArray<{ readonly item: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>; readonly entryId: string;…;
makeEffect: (input: { readonly key: string; readonly _tag?: 'Start' | undefined } | { readonly entries: ReadonlyArray<{ readonly item: Struct.MakeInView<F, Struct.TypeOptionalKeys<F> | Struct.TypeConstructorDefaultedKeys<F>>; readonly entryId: string;…;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
eventSchema).Method<undefined, Union<readonly [TaggedStruct<"Start", { readonly key: String; }>, TaggedStruct<"Enqueued", { readonly entries: $Array<Struct<{ readonly item: Struct<F>; readonly entryId: String; ... 7 more ...; readonly attributes: optional<...>; }>>; readonly priority: Literals<...>; readonly batchId: optionalKey<...>; }>, ... 12 more ..., TaggedStruct<...>]>, Never, true, MethodAnnotations, Derive>.annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>annotate({
description: stringdescription: "Discrete entry / worker / queue lifecycle events.",
}),
};
};