{
entries: Hyperlink.Marked<
Hyperlink.Method<
undefined,
Schema.$Array<
Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>
readonly startAt: Schema.DateTimeUtc
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
>,
Schema.Never,
true,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>,
{ readonly _tag: "ref" }
>
get: Hyperlink.Method<
{ readonly id: Schema.String },
Schema.Option<
Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>
readonly startAt: Schema.DateTimeUtc
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
>,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
has: Hyperlink.Method<
{ readonly id: Schema.String },
Schema.Boolean,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
set: Hyperlink.Method<
Schema.$Array<
Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>
readonly startAt: Schema.DateTimeUtc
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
>,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
add: Hyperlink.Method<
Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>
readonly startAt: Schema.DateTimeUtc
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>
}>,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
upsert: Hyperlink.Method<
Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>
readonly startAt: Schema.DateTimeUtc
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>
}>,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
remove: Hyperlink.Method<
{ readonly id: Schema.String },
Schema.Boolean,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
destructive: true
},
Hyperlink.Derive
>
removeMany: Hyperlink.Method<
Schema.$Array<Schema.String>,
Schema.Number,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
destructive: true
},
Hyperlink.Derive
>
clear: Hyperlink.Method<
undefined,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
destructive: true
},
Hyperlink.Derive
>
}The full CRUD contract of a standalone Schedule resource — the reusable window manager one or more processes can be gated by. Mirrors the engine's ProcessScheduleService.
export const const scheduleHyperlinkSpec: {
entries: any
get: any
has: any
set: any
add: any
upsert: any
remove: any
removeMany: any
clear: any
}
The full CRUD contract of a standalone
Schedule
resource — the reusable window manager
one or more processes can be gated by. Mirrors the engine's
ProcessScheduleService
.
scheduleHyperlinkSpec = {
entries: anyentries: import HyperlinkHyperlink.ref(import SchemaSchema.Array<Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>;
readonly startAt: Schema.DateTimeUtc;
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>;
}>>(self: Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>;
readonly startAt: Schema.DateTimeUtc;
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>;
}>): Schema.$Array<Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>;
readonly startAt: Schema.DateTimeUtc;
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>;
}>>
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 processScheduleEntry: Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>
readonly startAt: Schema.DateTimeUtc
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
const processScheduleEntry: {
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 id: Schema.optionalKey<Schema.String>; readonly startAt: Schema.DateTimeUtc; readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc> }) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | unde…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined; }, readonly []>) => Schema.Struct<{ readonly id: Schema.optionalKey<Schema.String>; rea…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }>) => Schema.Struct<{ readonly id: Schema.optionalKey<Schema.String>; readonly startAt: Sc…;
check: (checks_0: Check<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }>, ...checks: Array<Check<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?…;
rebuild: (ast: Objects) => Schema.Struct<{ readonly id: Schema.optionalKey<Schema.String>; readonly startAt: Schema.DateTimeUtc; readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc> }>;
make: (input: { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }, options?: Schema.MakeOptions) => { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?…;
makeOption: (input: { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }, options?: Schema.MakeOptions) => Option.Option<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; re…;
makeEffect: (input: { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }, options?: Schema.MakeOptions) => Effect.Effect<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; re…;
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; <…;
}
One scheduled run window on the wire — the wire form of the engine's
ProcessScheduleEntry
.
The engine models id / stopAt as Option and the times as Date; the toolkit standard is
DateTime.Utc and optionalKey, so the runtime maps between them. startAt is when the run
instance triggers; stopAt (absent = open-ended) is when it stops.
processScheduleEntry)).annotate({
description: stringdescription: "All schedule entries (run windows), reactive.",
}),
get: anyget: import HyperlinkHyperlink.effectFn({ id: Schema.String(property) id: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<string, readonly []>) => Schema.String;
annotateKey: (annotations: Schema.Annotations.Key<string>) => Schema.String;
check: (checks_0: Check<string>, ...checks: Array<Check<string>>) => Schema.String;
rebuild: (ast: String) => Schema.String;
make: (input: string, options?: Schema.MakeOptions) => string;
makeOption: (input: string, options?: Schema.MakeOptions) => Option.Option<string>;
makeEffect: (input: string, options?: Schema.MakeOptions) => Effect.Effect<string, Schema.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; <…;
}
id: import SchemaSchema.const String: Schema.Stringconst String: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<string, readonly []>) => Schema.String;
annotateKey: (annotations: Schema.Annotations.Key<string>) => Schema.String;
check: (checks_0: Check<string>, ...checks: Array<Check<string>>) => Schema.String;
rebuild: (ast: String) => Schema.String;
make: (input: string, options?: Schema.MakeOptions) => string;
makeOption: (input: string, options?: Schema.MakeOptions) => Option.Option<string>;
makeEffect: (input: string, options?: Schema.MakeOptions) => Effect.Effect<string, Schema.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
String
.
Schema for string values. Validates that the input is typeof "string".
String }, import SchemaSchema.function Option<Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>;
readonly startAt: Schema.DateTimeUtc;
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>;
}>>(value: Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>;
readonly startAt: Schema.DateTimeUtc;
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>;
}>): Schema.Option<Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>;
readonly startAt: Schema.DateTimeUtc;
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>;
}>>
Schema for Option<A> values.
Option(const processScheduleEntry: Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>
readonly startAt: Schema.DateTimeUtc
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
const processScheduleEntry: {
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 id: Schema.optionalKey<Schema.String>; readonly startAt: Schema.DateTimeUtc; readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc> }) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | unde…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined; }, readonly []>) => Schema.Struct<{ readonly id: Schema.optionalKey<Schema.String>; rea…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }>) => Schema.Struct<{ readonly id: Schema.optionalKey<Schema.String>; readonly startAt: Sc…;
check: (checks_0: Check<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }>, ...checks: Array<Check<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?…;
rebuild: (ast: Objects) => Schema.Struct<{ readonly id: Schema.optionalKey<Schema.String>; readonly startAt: Schema.DateTimeUtc; readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc> }>;
make: (input: { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }, options?: Schema.MakeOptions) => { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?…;
makeOption: (input: { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }, options?: Schema.MakeOptions) => Option.Option<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; re…;
makeEffect: (input: { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }, options?: Schema.MakeOptions) => Effect.Effect<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; re…;
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; <…;
}
One scheduled run window on the wire — the wire form of the engine's
ProcessScheduleEntry
.
The engine models id / stopAt as Option and the times as Date; the toolkit standard is
DateTime.Utc and optionalKey, so the runtime maps between them. startAt is when the run
instance triggers; stopAt (absent = open-ended) is when it stops.
processScheduleEntry)).annotate({
description: stringdescription: "Look up a single entry by id (absent if none matches).",
}),
has: anyhas: import HyperlinkHyperlink.effectFn({ id: Schema.String(property) id: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<string, readonly []>) => Schema.String;
annotateKey: (annotations: Schema.Annotations.Key<string>) => Schema.String;
check: (checks_0: Check<string>, ...checks: Array<Check<string>>) => Schema.String;
rebuild: (ast: String) => Schema.String;
make: (input: string, options?: Schema.MakeOptions) => string;
makeOption: (input: string, options?: Schema.MakeOptions) => Option.Option<string>;
makeEffect: (input: string, options?: Schema.MakeOptions) => Effect.Effect<string, Schema.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; <…;
}
id: import SchemaSchema.const String: Schema.Stringconst String: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<string, readonly []>) => Schema.String;
annotateKey: (annotations: Schema.Annotations.Key<string>) => Schema.String;
check: (checks_0: Check<string>, ...checks: Array<Check<string>>) => Schema.String;
rebuild: (ast: String) => Schema.String;
make: (input: string, options?: Schema.MakeOptions) => string;
makeOption: (input: string, options?: Schema.MakeOptions) => Option.Option<string>;
makeEffect: (input: string, options?: Schema.MakeOptions) => Effect.Effect<string, Schema.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
String
.
Schema for string values. Validates that the input is typeof "string".
String }, import SchemaSchema.const Boolean: Schema.Booleanconst Boolean: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<boolean, readonly []>) => Schema.Boolean;
annotateKey: (annotations: Schema.Annotations.Key<boolean>) => Schema.Boolean;
check: (checks_0: Check<boolean>, ...checks: Array<Check<boolean>>) => Schema.Boolean;
rebuild: (ast: Boolean) => Schema.Boolean;
make: (input: boolean, options?: Schema.MakeOptions) => boolean;
makeOption: (input: boolean, options?: Schema.MakeOptions) => Option.Option<boolean>;
makeEffect: (input: boolean, options?: Schema.MakeOptions) => Effect.Effect<boolean, Schema.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
Boolean
.
Schema for boolean values. Validates that the input is typeof "boolean".
When to use
Use to validate values that are already JavaScript booleans.
Boolean).annotate({
description: stringdescription: "Whether an entry with the given id exists.",
}),
set: anyset: import HyperlinkHyperlink.effectFn(import SchemaSchema.Array<Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>;
readonly startAt: Schema.DateTimeUtc;
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>;
}>>(self: Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>;
readonly startAt: Schema.DateTimeUtc;
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>;
}>): Schema.$Array<Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>;
readonly startAt: Schema.DateTimeUtc;
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>;
}>>
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 processScheduleEntry: Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>
readonly startAt: Schema.DateTimeUtc
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
const processScheduleEntry: {
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 id: Schema.optionalKey<Schema.String>; readonly startAt: Schema.DateTimeUtc; readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc> }) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | unde…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined; }, readonly []>) => Schema.Struct<{ readonly id: Schema.optionalKey<Schema.String>; rea…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }>) => Schema.Struct<{ readonly id: Schema.optionalKey<Schema.String>; readonly startAt: Sc…;
check: (checks_0: Check<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }>, ...checks: Array<Check<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?…;
rebuild: (ast: Objects) => Schema.Struct<{ readonly id: Schema.optionalKey<Schema.String>; readonly startAt: Schema.DateTimeUtc; readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc> }>;
make: (input: { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }, options?: Schema.MakeOptions) => { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?…;
makeOption: (input: { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }, options?: Schema.MakeOptions) => Option.Option<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; re…;
makeEffect: (input: { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }, options?: Schema.MakeOptions) => Effect.Effect<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; re…;
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; <…;
}
One scheduled run window on the wire — the wire form of the engine's
ProcessScheduleEntry
.
The engine models id / stopAt as Option and the times as Date; the toolkit standard is
DateTime.Utc and optionalKey, so the runtime maps between them. startAt is when the run
instance triggers; stopAt (absent = open-ended) is when it stops.
processScheduleEntry)).annotate({
description: stringdescription: "Replace all schedule entries.",
}),
add: anyadd: import HyperlinkHyperlink.effectFn(const processScheduleEntry: Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>
readonly startAt: Schema.DateTimeUtc
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
const processScheduleEntry: {
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 id: Schema.optionalKey<Schema.String>; readonly startAt: Schema.DateTimeUtc; readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc> }) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | unde…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined; }, readonly []>) => Schema.Struct<{ readonly id: Schema.optionalKey<Schema.String>; rea…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }>) => Schema.Struct<{ readonly id: Schema.optionalKey<Schema.String>; readonly startAt: Sc…;
check: (checks_0: Check<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }>, ...checks: Array<Check<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?…;
rebuild: (ast: Objects) => Schema.Struct<{ readonly id: Schema.optionalKey<Schema.String>; readonly startAt: Schema.DateTimeUtc; readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc> }>;
make: (input: { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }, options?: Schema.MakeOptions) => { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?…;
makeOption: (input: { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }, options?: Schema.MakeOptions) => Option.Option<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; re…;
makeEffect: (input: { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }, options?: Schema.MakeOptions) => Effect.Effect<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; re…;
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; <…;
}
One scheduled run window on the wire — the wire form of the engine's
ProcessScheduleEntry
.
The engine models id / stopAt as Option and the times as Date; the toolkit standard is
DateTime.Utc and optionalKey, so the runtime maps between them. startAt is when the run
instance triggers; stopAt (absent = open-ended) is when it stops.
processScheduleEntry).annotate({
description: stringdescription: "Append one schedule entry.",
}),
upsert: anyupsert: import HyperlinkHyperlink.effectFn(const processScheduleEntry: Schema.Struct<{
readonly id: Schema.optionalKey<Schema.String>
readonly startAt: Schema.DateTimeUtc
readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc>
}>
const processScheduleEntry: {
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 id: Schema.optionalKey<Schema.String>; readonly startAt: Schema.DateTimeUtc; readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc> }) => To, options?: { readonly unsafePreserveChecks?: boolean | undefined } | unde…;
Rebuild: Rebuild;
ast: Ast;
annotate: (annotations: Schema.Annotations.Bottom<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined; }, readonly []>) => Schema.Struct<{ readonly id: Schema.optionalKey<Schema.String>; rea…;
annotateKey: (annotations: Schema.Annotations.Key<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }>) => Schema.Struct<{ readonly id: Schema.optionalKey<Schema.String>; readonly startAt: Sc…;
check: (checks_0: Check<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }>, ...checks: Array<Check<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?…;
rebuild: (ast: Objects) => Schema.Struct<{ readonly id: Schema.optionalKey<Schema.String>; readonly startAt: Schema.DateTimeUtc; readonly stopAt: Schema.optionalKey<Schema.DateTimeUtc> }>;
make: (input: { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }, options?: Schema.MakeOptions) => { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?…;
makeOption: (input: { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }, options?: Schema.MakeOptions) => Option.Option<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; re…;
makeEffect: (input: { readonly startAt: DateTime.Utc; readonly id?: string | undefined; readonly stopAt?: DateTime.Utc | undefined }, options?: Schema.MakeOptions) => Effect.Effect<{ readonly startAt: DateTime.Utc; readonly id?: string | undefined; re…;
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; <…;
}
One scheduled run window on the wire — the wire form of the engine's
ProcessScheduleEntry
.
The engine models id / stopAt as Option and the times as Date; the toolkit standard is
DateTime.Utc and optionalKey, so the runtime maps between them. startAt is when the run
instance triggers; stopAt (absent = open-ended) is when it stops.
processScheduleEntry).annotate({
description: stringdescription: "Insert or replace an entry, keyed by its id.",
}),
remove: anyremove: import HyperlinkHyperlink.effectFn({ id: Schema.String(property) id: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<string, readonly []>) => Schema.String;
annotateKey: (annotations: Schema.Annotations.Key<string>) => Schema.String;
check: (checks_0: Check<string>, ...checks: Array<Check<string>>) => Schema.String;
rebuild: (ast: String) => Schema.String;
make: (input: string, options?: Schema.MakeOptions) => string;
makeOption: (input: string, options?: Schema.MakeOptions) => Option.Option<string>;
makeEffect: (input: string, options?: Schema.MakeOptions) => Effect.Effect<string, Schema.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; <…;
}
id: import SchemaSchema.const String: Schema.Stringconst String: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<string, readonly []>) => Schema.String;
annotateKey: (annotations: Schema.Annotations.Key<string>) => Schema.String;
check: (checks_0: Check<string>, ...checks: Array<Check<string>>) => Schema.String;
rebuild: (ast: String) => Schema.String;
make: (input: string, options?: Schema.MakeOptions) => string;
makeOption: (input: string, options?: Schema.MakeOptions) => Option.Option<string>;
makeEffect: (input: string, options?: Schema.MakeOptions) => Effect.Effect<string, Schema.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
String
.
Schema for string values. Validates that the input is typeof "string".
String }, import SchemaSchema.const Boolean: Schema.Booleanconst Boolean: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<boolean, readonly []>) => Schema.Boolean;
annotateKey: (annotations: Schema.Annotations.Key<boolean>) => Schema.Boolean;
check: (checks_0: Check<boolean>, ...checks: Array<Check<boolean>>) => Schema.Boolean;
rebuild: (ast: Boolean) => Schema.Boolean;
make: (input: boolean, options?: Schema.MakeOptions) => boolean;
makeOption: (input: boolean, options?: Schema.MakeOptions) => Option.Option<boolean>;
makeEffect: (input: boolean, options?: Schema.MakeOptions) => Effect.Effect<boolean, Schema.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
Boolean
.
Schema for boolean values. Validates that the input is typeof "boolean".
When to use
Use to validate values that are already JavaScript booleans.
Boolean).annotate({
description: stringdescription: "Remove the entry with the given id; returns whether one was removed.",
destructive: booleandestructive: true,
}),
removeMany: anyremoveMany: import HyperlinkHyperlink.effectFn(import SchemaSchema.Array<Schema.String>(self: Schema.String): Schema.$Array<Schema.String>
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(import SchemaSchema.const String: Schema.Stringconst String: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<string, readonly []>) => Schema.String;
annotateKey: (annotations: Schema.Annotations.Key<string>) => Schema.String;
check: (checks_0: Check<string>, ...checks: Array<Check<string>>) => Schema.String;
rebuild: (ast: String) => Schema.String;
make: (input: string, options?: Schema.MakeOptions) => string;
makeOption: (input: string, options?: Schema.MakeOptions) => Option.Option<string>;
makeEffect: (input: string, options?: Schema.MakeOptions) => Effect.Effect<string, Schema.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
String
.
Schema for string values. Validates that the input is typeof "string".
String), import SchemaSchema.const Number: Schema.Numberconst Number: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<number, readonly []>) => Schema.Number;
annotateKey: (annotations: Schema.Annotations.Key<number>) => Schema.Number;
check: (checks_0: Check<number>, ...checks: Array<Check<number>>) => Schema.Number;
rebuild: (ast: Number) => Schema.Number;
make: (input: number, options?: Schema.MakeOptions) => number;
makeOption: (input: number, options?: Schema.MakeOptions) => Option.Option<number>;
makeEffect: (input: number, options?: Schema.MakeOptions) => Effect.Effect<number, Schema.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
Number
.
Schema for number values, including NaN, Infinity, and -Infinity.
Details
Default JSON serializer:
- Finite numbers are serialized as numbers.
- Non-finite values are serialized as strings (
"NaN", "Infinity", "-Infinity").
Number).annotate({
description: stringdescription: "Remove every entry whose id is listed; returns the count removed.",
destructive: booleandestructive: true,
}),
clear: anyclear: import HyperlinkHyperlink.effect(import SchemaSchema.const Void: Schema.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?: Schema.MakeOptions) => void;
makeOption: (input: void, options?: Schema.MakeOptions) => Option.Option<void>;
makeEffect: (input: void, options?: Schema.MakeOptions) => Effect.Effect<void, Schema.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).annotate({
description: stringdescription: "Remove all schedule entries.",
destructive: booleandestructive: true,
}),
};