reflection
API reference for @effx/compiler/lift/reflection
reflection.ts overview
Exports Grouped by Category
utils
Delta
The closed set of tolerated differences (spec 0019 §2.2). A new Δ is a spec edit, never a flag.
Signature
declare const Delta: Schema.Literals<readonly ["ref-suffix", "explicit-default-identifier", "endpoint-order"]>Delta (type alias)
Signature
type Delta = typeof Delta.TypeEndpointReflection
The wire reflection of one endpoint of one group. All list fields are plain arrays: an empty group is valid and its emptiness is the actual evidence.
Signature
declare const EndpointReflection: Schema.Struct<{
readonly group: Schema.String
readonly identifier: Schema.String
readonly method: Schema.String
readonly path: Schema.String
readonly middleware: Schema.$Array<Schema.String>
readonly successStatuses: Schema.$Array<Schema.Int>
readonly errorStatuses: Schema.$Array<Schema.Int>
readonly annotationKeys: Schema.$Array<Schema.String>
readonly identifierAnnotation: Schema.optionalKey<
Schema.Struct<{
readonly key: Schema.Literal<"effect/http-api/OpenApi/Identifier">
readonly endpoint: Schema.String
readonly value: Schema.String
}>
>
readonly projections: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>
}>EndpointReflection (type alias)
Signature
type EndpointReflection = typeof EndpointReflection.TypeIdentifierWitness
The Δ2 witness: the actual Context value behind one endpoint's OpenApi/Identifier key.
Signature
declare const IdentifierWitness: Schema.Struct<{
readonly key: Schema.Literal<"effect/http-api/OpenApi/Identifier">
readonly endpoint: Schema.String
readonly value: Schema.String
}>IdentifierWitness (type alias)
Signature
type IdentifierWitness = typeof IdentifierWitness.TypeOPEN_API_IDENTIFIER_KEY
The exact key of Effect's own OpenAPI identifier annotation.
Signature
declare const OPEN_API_IDENTIFIER_KEY: "effect/http-api/OpenApi/Identifier"Reflection
One mounted group's complete wire reflection, recorded by the --check child program.
Signature
declare const Reflection: Schema.Struct<{
readonly openapi: Schema.Codec<Schema.Json, Schema.Json, never, never>
readonly endpoints: Schema.$Array<
Schema.Struct<{
readonly group: Schema.String
readonly identifier: Schema.String
readonly method: Schema.String
readonly path: Schema.String
readonly middleware: Schema.$Array<Schema.String>
readonly successStatuses: Schema.$Array<Schema.Int>
readonly errorStatuses: Schema.$Array<Schema.Int>
readonly annotationKeys: Schema.$Array<Schema.String>
readonly identifierAnnotation: Schema.optionalKey<
Schema.Struct<{
readonly key: Schema.Literal<"effect/http-api/OpenApi/Identifier">
readonly endpoint: Schema.String
readonly value: Schema.String
}>
>
readonly projections: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>
}>
>
}>Reflection (type alias)
Signature
type Reflection = typeof Reflection.TypeReflectionPair
The two sides one comparison compares. Applied deltas never live here.
Signature
declare const ReflectionPair: Schema.Struct<{
readonly original: Schema.Struct<{
readonly openapi: Schema.Codec<Schema.Json, Schema.Json, never, never>
readonly endpoints: Schema.$Array<
Schema.Struct<{
readonly group: Schema.String
readonly identifier: Schema.String
readonly method: Schema.String
readonly path: Schema.String
readonly middleware: Schema.$Array<Schema.String>
readonly successStatuses: Schema.$Array<Schema.Int>
readonly errorStatuses: Schema.$Array<Schema.Int>
readonly annotationKeys: Schema.$Array<Schema.String>
readonly identifierAnnotation: Schema.optionalKey<
Schema.Struct<{
readonly key: Schema.Literal<"effect/http-api/OpenApi/Identifier">
readonly endpoint: Schema.String
readonly value: Schema.String
}>
>
readonly projections: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>
}>
>
}>
readonly generated: Schema.Struct<{
readonly openapi: Schema.Codec<Schema.Json, Schema.Json, never, never>
readonly endpoints: Schema.$Array<
Schema.Struct<{
readonly group: Schema.String
readonly identifier: Schema.String
readonly method: Schema.String
readonly path: Schema.String
readonly middleware: Schema.$Array<Schema.String>
readonly successStatuses: Schema.$Array<Schema.Int>
readonly errorStatuses: Schema.$Array<Schema.Int>
readonly annotationKeys: Schema.$Array<Schema.String>
readonly identifierAnnotation: Schema.optionalKey<
Schema.Struct<{
readonly key: Schema.Literal<"effect/http-api/OpenApi/Identifier">
readonly endpoint: Schema.String
readonly value: Schema.String
}>
>
readonly projections: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>
}>
>
}>
}>ReflectionPair (type alias)
Signature
type ReflectionPair = typeof ReflectionPair.TypedecodeReflection
Strict child-document decoder: excess keys are EFFX3103 data (spec 0019 §6).
Signature
declare const decodeReflection: (
input: unknown,
options?: ParseOptions
) => Effect<
{
readonly openapi: Schema.Json
readonly endpoints: ReadonlyArray<{
readonly method: string
readonly middleware: ReadonlyArray<string>
readonly path: string
readonly group: string
readonly identifier: string
readonly projections: { readonly [x: string]: Schema.Json }
readonly successStatuses: ReadonlyArray<number>
readonly errorStatuses: ReadonlyArray<number>
readonly annotationKeys: ReadonlyArray<string>
readonly identifierAnnotation?:
| { readonly key: "effect/http-api/OpenApi/Identifier"; readonly endpoint: string; readonly value: string }
| undefined
}>
},
Schema.SchemaError,
never
>