API reference@effx/compilerlift
types
API reference for @effx/compiler/lift/types
types.ts overview
Exports Grouped by Category
utils
AccessUse (type alias)
Access exactly as the existing IR schema defines it, validated by that schema.
Signature
type AccessUse = AccessContractDataContractMetadata (interface)
What Http.Contract.metadata records for an endpoint: its operation id is always <group>.<endpoint key>.
Signature
export interface ContractMetadata {
readonly annotator: SymbolRef | undefined
readonly operationId: string
readonly summary: string | undefined
readonly description: string | undefined
readonly tags: ReadonlyArray<string> | undefined
}MetadataUse (interface)
Signature
export interface MetadataUse {
readonly annotator: SymbolRef | undefined
readonly operationId: string | undefined
readonly summary: string | undefined
readonly description: string | undefined
readonly tags: ReadonlyArray<string> | undefined
}Method (type alias)
Signature
type Method = "GET" | "POST" | "PUT" | "PATCH" | "DELETE"MiddlewareUse (interface)
Signature
export interface MiddlewareUse {
readonly ref: SymbolRef
readonly security: boolean
}Outcome (interface)
Signature
export interface Outcome {
/** `<group>.<key>`, as users write it. */
readonly subject: string
/** Present exactly when `causes` is empty. */
readonly recognized: Recognized | undefined
readonly causes: ReadonlyArray<Cause>
readonly refactors: ReadonlyArray<Refactor>
readonly codeReferences: ReadonlyArray<CodeReference>
}ProblemsUse (interface)
Signature
export interface ProblemsUse {
readonly registry: SymbolRef
readonly identifier: string
readonly codes: ReadonlyArray<string>
}Recognized (interface)
An endpoint the core understood completely: everything the Collected annotations need.
Signature
export interface Recognized {
readonly subject: string
readonly key: string
readonly method: Method
readonly path: string
readonly params: SchemaUse | undefined
readonly query: SchemaUse | undefined
readonly headers: SchemaUse | undefined
readonly payload: SchemaUse | undefined
readonly mediaType: string | undefined
readonly success: SchemaUse
readonly status: number | undefined
readonly responseHeaders: SchemaRef | undefined
readonly conditional: boolean
/** The registered success wrapper the endpoint is written through (its header refactor is planned once). */
readonly wrapper: SymbolRef | undefined
readonly middleware: ReadonlyArray<MiddlewareUse>
readonly metadata: ContractMetadata
readonly problems: ProblemsUse | undefined
readonly access: AccessUse | undefined
/**
* The definition annotations the `.annotate` steps produced, in step order (spec 0019 §5, S1). Atomicity
* is the engine's: a recognized endpoint carries them only when every cause was cleared.
*/
readonly annotations: ReadonlyArray<Annotation>
}SchemaUse (interface)
A schema a channel names, with the type-derived facts the IR records about it.
Signature
export interface SchemaUse {
readonly ref: SchemaRef
/** Every static field key (params, operation input). */
readonly allKeys: ReadonlyArray<string> | undefined
/** The required static field keys (headers). */
readonly requiredKeys: ReadonlyArray<string> | undefined
/** Wrapped by `Http.headers`. */
readonly headers: boolean
}