import type { ExtensionValueType, ValueType } from "@velarscript/compiler/extension"; export declare const VELAR_SERVE_APP_IDENTITY = "velar/serve#type:ServeApp"; export declare const VELAR_SERVE_REQUEST_IDENTITY = "velar/serve#type:ServeRequest"; export declare const VELAR_ROUTE_PATTERN_IDENTITY = "velar/serve#type:RoutePattern"; export declare const VELAR_HTTP_OUTCOME_IDENTITY = "velar/serve#type:HttpOutcome"; /** * D114 P6 item 12 (SV-D2/SV-C1): `HttpProblem`'s semantic problem code is * `reason`. Charter section 11 owns `code` on every checked `Error` as the * instance's class name and forbids a subclass from redeclaring it, so the * field that used to be spelled `code` was a declaration the emitter * downgraded — the constructor stored `route.not_found` and every read * answered the constant "HttpProblem". The wire problem document is unchanged: * it publishes the `reason` under its JSON field name `code`. The retired read * and its mechanical rewrite are in `serve-problem-analysis.ts`. */ export declare const VELAR_HTTP_PROBLEM_IDENTITY = "velar/serve#class:HttpProblem"; export declare const VELAR_WEBSOCKET_CONNECTION_IDENTITY = "velar/websocket#type:WebSocketConnection"; export declare const VELAR_NODE_TYPE_EXTENSION_ID = "@velarscript/node"; export type NodeRouteInputSource = "header" | "cookie" | "form" | "upload" | "dependency" | "security" | "request"; export type NodeRouteInputType = ExtensionValueType & { readonly extensionId: typeof VELAR_NODE_TYPE_EXTENSION_ID; readonly family: "serve-input"; readonly role: NodeRouteInputSource; }; export type NodeProviderType = ExtensionValueType & { readonly extensionId: typeof VELAR_NODE_TYPE_EXTENSION_ID; readonly family: "serve-provider"; readonly role: "provider"; }; export type NodeBoundRoutePathType = ExtensionValueType & { readonly extensionId: typeof VELAR_NODE_TYPE_EXTENSION_ID; readonly family: "serve-route-path"; readonly role: "bound"; }; export declare const serveAppType: ValueType; export declare const serveRequestType: ValueType; export declare const routePatternType: ValueType; export declare const httpOutcomeType: ValueType; export declare function isServeRequestType(type: ValueType): boolean; export declare function isWebSocketConnectionType(type: ValueType): boolean; export declare function nodeRouteInputType(source: NodeRouteInputSource, value: ValueType, metadata?: Readonly>): NodeRouteInputType; export declare function nodeProviderType(inputs: ValueType, result: ValueType): NodeProviderType; export declare function nodeBoundRoutePathType(params: ValueType, query: ValueType): NodeBoundRoutePathType; export declare function isNodeRouteInputType(type: ValueType): type is NodeRouteInputType; export declare function isNodeProviderType(type: ValueType): type is NodeProviderType; export declare function nodeRouteInputValue(type: NodeRouteInputType): ValueType; export declare function nodeProviderResult(type: NodeProviderType): ValueType; //# sourceMappingURL=server-types.d.ts.map