/** * Zod schemas and TypeScript types for the RIS MCP Server. * * This module defines all data models used for interacting with the Austrian * Legal Information System (RIS) API, including enums for various search * parameters and document models for representing legal documents. */ import { z } from 'zod'; /** * Application types for federal law searches in RIS. */ export declare const BundesrechtApplikationSchema: z.ZodEnum<{ Erv: "Erv"; BrKons: "BrKons"; Begut: "Begut"; BgblAuth: "BgblAuth"; }>; export type BundesrechtApplikation = z.infer; /** * Court/jurisdiction types for case law searches in RIS — see * {@link JUDIKATUR_GERICHTSBARKEITEN} for the values and what they select. */ export declare const JudikaturGerichtSchema: z.ZodEnum<{ Justiz: "Justiz"; Vfgh: "Vfgh"; Vwgh: "Vwgh"; Bvwg: "Bvwg"; Lvwg: "Lvwg"; Dsk: "Dsk"; AsylGH: "AsylGH"; Normenliste: "Normenliste"; Pvak: "Pvak"; Gbk: "Gbk"; Dok: "Dok"; Verg: "Verg"; Uvs: "Uvs"; Ubas: "Ubas"; Umse: "Umse"; Bks: "Bks"; }>; export type JudikaturGericht = z.infer; /** * Document type filter for Judikatur searches — see * {@link JUDIKATUR_DOKUMENTTYPEN} for what each value searches. */ export declare const JudikaturDokumenttypSchema: z.ZodEnum<{ rechtssatz: "rechtssatz"; entscheidungstext: "entscheidungstext"; beide: "beide"; }>; export type JudikaturDokumenttyp = z.infer; /** * Broad legal area filter (Justiz only) — see {@link JUDIKATUR_RECHTSGEBIETE}. */ export declare const JudikaturRechtsgebietSchema: z.ZodEnum<{ Zivilrecht: "Zivilrecht"; Strafrecht: "Strafrecht"; }>; export type JudikaturRechtsgebiet = z.infer; /** * Sort order for Judikatur searches (by decision date). */ export declare const JudikaturSortierungSchema: z.ZodEnum<{ datum_auf: "datum_auf"; datum_ab: "datum_ab"; }>; export type JudikaturSortierung = z.infer; /** * Section type for Bundesrecht/Landesrecht Abschnitt (Von/Bis) filters. * Article-based laws (e.g. B-VG) require "Artikel"; most laws use "Paragraph". */ export declare const AbschnittTypSchema: z.ZodEnum<{ Paragraph: "Paragraph"; Artikel: "Artikel"; Anlage: "Anlage"; }>; export type AbschnittTyp = z.infer; /** * Austrian federal states (Bundesländer). * Note: Uses Umlauts (ö, ä) for display purposes. */ export declare const BundeslandSchema: z.ZodEnum<{ Wien: "Wien"; Niederösterreich: "Niederösterreich"; Oberösterreich: "Oberösterreich"; Steiermark: "Steiermark"; Tirol: "Tirol"; Kärnten: "Kärnten"; Salzburg: "Salzburg"; Vorarlberg: "Vorarlberg"; Burgenland: "Burgenland"; }>; export type Bundesland = z.infer; /** * Austrian federal states for Landesrecht API (ASCII versions without Umlauts). * The RIS API uses the SucheIn format (e.g., Bundesland.SucheInWien=true). */ export declare const LANDESRECHT_BUNDESLAENDER: readonly ["Wien", "Niederoesterreich", "Oberoesterreich", "Salzburg", "Tirol", "Vorarlberg", "Kaernten", "Steiermark", "Burgenland"]; export declare const LandesrechtBundeslandSchema: z.ZodEnum<{ Wien: "Wien"; Steiermark: "Steiermark"; Tirol: "Tirol"; Salzburg: "Salzburg"; Vorarlberg: "Vorarlberg"; Burgenland: "Burgenland"; Niederoesterreich: "Niederoesterreich"; Oberoesterreich: "Oberoesterreich"; Kaernten: "Kaernten"; }>; export type LandesrechtBundesland = z.infer; /** * Date format validation schema (YYYY-MM-DD). * Used for date parameters in RIS API requests. */ export declare const DateSchema: z.ZodString; export declare const OptionalDateSchema: z.ZodOptional; /** * Number of documents per page for paginated API responses. */ export declare const DokumenteProSeiteSchema: z.ZodEnum<{ Ten: "Ten"; Twenty: "Twenty"; Fifty: "Fifty"; OneHundred: "OneHundred"; }>; export type DokumenteProSeite = z.infer; /** * Allowed page sizes for tool `limit` parameters. * * Only 10/20/50/100 map cleanly to the RIS API's DokumenteProSeite enum; * any other value would be silently coerced to 20, so the schema rejects it * up front instead. * * The description is the model's only cost signal: `limit` is chosen by the * model, not the user, and without it a broad search reached for 100 and lost * the whole answer to the client's result limit (#106). It lives here rather * than on the eleven tools so it cannot drift between them. */ export declare const LimitSchema: z.ZodDefault, z.ZodLiteral<20>, z.ZodLiteral<50>, z.ZodLiteral<100>]>>; export type Limit = z.infer; /** * Page number for tool `seite` parameters (1-based integer). */ export declare const SeiteSchema: z.ZodDefault; /** * Output format for MCP tool responses. */ export declare const ResponseFormatSchema: z.ZodEnum<{ markdown: "markdown"; json: "json"; }>; export type ResponseFormat = z.infer; /** * URLs for accessing document content in different formats. */ export declare const ContentUrlSchema: z.ZodObject<{ xml: z.ZodOptional>; html: z.ZodOptional>; rtf: z.ZodOptional>; pdf: z.ZodOptional>; }, z.core.$strip>; export type ContentUrl = z.infer; /** * Citation information for a legal document. */ export declare const CitationSchema: z.ZodObject<{ kurztitel: z.ZodOptional>; langtitel: z.ZodOptional>; kundmachungsorgan: z.ZodOptional>; paragraph: z.ZodOptional>; eli: z.ZodOptional>; inkrafttreten: z.ZodOptional>; ausserkrafttreten: z.ZodOptional>; }, z.core.$strip>; export type Citation = z.infer; /** * A single legal document from the RIS database. * * The four court fields are present on every Judikatur document and absent on * laws and gazettes, so their presence identifies a court decision; `null` means * RIS supplied no value for that particular decision. */ export declare const DocumentSchema: z.ZodObject<{ dokumentnummer: z.ZodString; applikation: z.ZodString; titel: z.ZodString; kurztitel: z.ZodOptional>; citation: z.ZodObject<{ kurztitel: z.ZodOptional>; langtitel: z.ZodOptional>; kundmachungsorgan: z.ZodOptional>; paragraph: z.ZodOptional>; eli: z.ZodOptional>; inkrafttreten: z.ZodOptional>; ausserkrafttreten: z.ZodOptional>; }, z.core.$strip>; citation_display: z.ZodString; content_urls: z.ZodObject<{ xml: z.ZodOptional>; html: z.ZodOptional>; rtf: z.ZodOptional>; pdf: z.ZodOptional>; }, z.core.$strip>; dokument_url: z.ZodOptional>; gesamte_rechtsvorschrift_url: z.ZodOptional>; gericht: z.ZodOptional>; geschaeftszahl: z.ZodOptional>; entscheidungsdatum: z.ZodOptional>; rechtssatznummer: z.ZodOptional>; }, z.core.$strip>; export type Document = z.infer; /** * One document as it travels in a search tool's `structuredContent`. * * A projection of {@link DocumentSchema} without its redundancies: `kurztitel` * always equals `titel` (the parser derives both from the same field), * `citation.kurztitel` repeats it once more, and the xml/rtf renditions are the * html URL with another extension — together 35 % of a Judikatur page. A * decision loses nothing: its case number stays in `geschaeftszahl`. The text * block keeps the full shape (#106). */ export declare const StructuredDocumentSchema: z.ZodObject<{ dokumentnummer: z.ZodString; applikation: z.ZodString; titel: z.ZodString; citation_display: z.ZodString; dokument_url: z.ZodOptional>; gesamte_rechtsvorschrift_url: z.ZodOptional>; gericht: z.ZodOptional>; geschaeftszahl: z.ZodOptional>; entscheidungsdatum: z.ZodOptional>; rechtssatznummer: z.ZodOptional>; citation: z.ZodObject<{ langtitel: z.ZodOptional>; kundmachungsorgan: z.ZodOptional>; paragraph: z.ZodOptional>; eli: z.ZodOptional>; inkrafttreten: z.ZodOptional>; ausserkrafttreten: z.ZodOptional>; }, z.core.$strip>; content_urls: z.ZodObject<{ html: z.ZodOptional>; pdf: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strip>; export type StructuredDocument = z.infer; /** * Paginated search results from the RIS API. */ export declare const SearchResultSchema: z.ZodObject<{ total_hits: z.ZodNumber; page: z.ZodNumber; page_size: z.ZodNumber; has_more: z.ZodBoolean; documents: z.ZodArray>; citation: z.ZodObject<{ kurztitel: z.ZodOptional>; langtitel: z.ZodOptional>; kundmachungsorgan: z.ZodOptional>; paragraph: z.ZodOptional>; eli: z.ZodOptional>; inkrafttreten: z.ZodOptional>; ausserkrafttreten: z.ZodOptional>; }, z.core.$strip>; citation_display: z.ZodString; content_urls: z.ZodObject<{ xml: z.ZodOptional>; html: z.ZodOptional>; rtf: z.ZodOptional>; pdf: z.ZodOptional>; }, z.core.$strip>; dokument_url: z.ZodOptional>; gesamte_rechtsvorschrift_url: z.ZodOptional>; gericht: z.ZodOptional>; geschaeftszahl: z.ZodOptional>; entscheidungsdatum: z.ZodOptional>; rechtssatznummer: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>; export type SearchResult = z.infer; /** * Shape declared as `outputSchema` by every search tool, describing the * `structuredContent` they return. * * Mirrors {@link SearchResultSchema} but drops its numeric bounds: the pagination * values are taken verbatim from the RIS response, and a value outside the * expected range must stay inspectable data rather than become a schema * violation that fails the whole tool call. */ export declare const SearchResultOutputShape: { total_hits: z.ZodNumber; page: z.ZodNumber; page_size: z.ZodNumber; has_more: z.ZodBoolean; notice: z.ZodOptional; documents: z.ZodArray>; gesamte_rechtsvorschrift_url: z.ZodOptional>; gericht: z.ZodOptional>; geschaeftszahl: z.ZodOptional>; entscheidungsdatum: z.ZodOptional>; rechtssatznummer: z.ZodOptional>; citation: z.ZodObject<{ langtitel: z.ZodOptional>; kundmachungsorgan: z.ZodOptional>; paragraph: z.ZodOptional>; eli: z.ZodOptional>; inkrafttreten: z.ZodOptional>; ausserkrafttreten: z.ZodOptional>; }, z.core.$strip>; content_urls: z.ZodObject<{ html: z.ZodOptional>; pdf: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strip>>; query: z.ZodOptional>>; }; /** One jump target of the document viewer's outline. */ export declare const OutlineEntryShape: { level: z.ZodNumber; label: z.ZodString; offset: z.ZodNumber; span: z.ZodNumber; }; /** * Shape declared as `outputSchema` by `ris_dokument_abschnitt`. * * Safe for the same reason {@link DocumentOutputShape} is: the text a client * would lose by rendering only `structuredContent` is inside `structuredContent`. */ export declare const DocumentChunkOutputShape: { /** * Absent for a document the caller addressed by URL: it has no Dokumentnummer * to echo, and inventing one — the URL, or the "Unbekannt" placeholder the * loader uses internally — would hand the viewer a key that does not resolve. * `source_url` identifies those documents instead. */ dokumentnummer: z.ZodOptional; text: z.ZodString; total_length: z.ZodNumber; next_offset: z.ZodNullable; outline: z.ZodOptional>>; source_url: z.ZodOptional; }; /** * Shape declared as `outputSchema` by `ris_dokument`. * * The v1.3.0 live finding — clients that render `structuredContent` in place of * the text block, so the document disappeared behind a handful of metadata * fields — is answered by construction rather than by omission: `text` is the * text block, byte for byte. A client that renders only the structured payload * shows the same document. Omitting the schema instead is what left the viewer * blind in claude.ai, whose only proven channel to a widget is * `structuredContent` (Live-Befund 2026-08-02). * * Deliberately *not* here: `next_offset`. `text` is the truncated rendering with * a German notice appended, not a chunk, so its length is not an offset into the * document — `ris_dokument_abschnitt` starts the canonical series at 0. */ export declare const DocumentOutputShape: { /** Absent for a URL-addressed document, exactly as in the chunk shape above. */ dokumentnummer: z.ZodOptional; text: z.ZodString; total_length: z.ZodNumber; outline: z.ZodOptional>>; source_url: z.ZodOptional; }; /** * Raw content URL from API response. */ export interface RawContentUrl { DataType?: string; Url?: string; } /** * Raw URLs container from API response. */ export interface RawUrls { ContentUrl?: RawContentUrl | RawContentUrl[]; } /** * Raw content reference from API response. */ export interface RawContentReference { ContentType?: string; Name?: string | { '#text'?: string; }; Urls?: RawUrls; } /** * Raw hits info from API response. */ export interface RawHitsInfo { '#text'?: string | number; '@pageNumber'?: string | number; '@pageSize'?: string | number; } /** * Court-specific head-note block nested under the applikation name inside * Judikatur metadata (e.g. Judikatur.Vfgh, Judikatur.Dsk). * * Which field is populated depends on the court: Vfgh/Vwgh/Justiz/Bvwg expose * "Leitsatz", while Dsk/Pvak/Dok use "Kurzinformation" (verified against RIS * API v2.6). Most courts populate at most one; some (Lvwg, Gbk, Bks, ...) expose * neither. */ export interface RawJudikaturCourtBlock { Leitsatz?: string; Kurzinformation?: string; /** * Rechtssatz identifier. RIS spells it two ways: Justiz and Pvak nest a list * under `Rechtssatznummern.item`, Vwgh exposes a bare `Rechtssatznummer`. * Courts that publish no Rechtssätze (Vfgh, Bvwg, Lvwg, Dsk, Gbk, Dok) have * neither. Verified against the live API v2.6 on 2026-08-01. */ Rechtssatznummern?: { item?: string | string[]; }; Rechtssatznummer?: string; } /** * Judikatur (case-law) metadata from the API response. * * The head-note lives in a nested block keyed by the RIS applikation name, so * every supported court is declared here. This lets the parser read the block * via a typed lookup instead of an untyped `Record` index. */ export interface RawJudikaturMetadata { Geschaeftszahl?: { item?: string | string[]; } | string; Entscheidungsdatum?: string; Justiz?: RawJudikaturCourtBlock; Vfgh?: RawJudikaturCourtBlock; Vwgh?: RawJudikaturCourtBlock; Bvwg?: RawJudikaturCourtBlock; Lvwg?: RawJudikaturCourtBlock; Dsk?: RawJudikaturCourtBlock; Gbk?: RawJudikaturCourtBlock; Pvak?: RawJudikaturCourtBlock; Dok?: RawJudikaturCourtBlock; AsylGH?: RawJudikaturCourtBlock; Normenliste?: RawJudikaturCourtBlock; Verg?: RawJudikaturCourtBlock; Uvs?: RawJudikaturCourtBlock; Ubas?: RawJudikaturCourtBlock; Umse?: RawJudikaturCourtBlock; Bks?: RawJudikaturCourtBlock; } /** * Raw document reference from API response. */ export interface RawDocumentReference { Data?: { Metadaten?: { Technisch?: { ID?: string; Applikation?: string; /** * Issuing body. For Judikatur this is the deciding court or authority * and matches the nested `Judikatur..Gericht` wherever * that exists; for Bundesrecht it names the publisher ("BKA * (Bundeskanzleramt)"), so it is only a court in the Judikatur branch. */ Organ?: string; }; Allgemein?: { DokumentUrl?: string; }; Bundesrecht?: { Kurztitel?: string; Langtitel?: string; Titel?: string; Eli?: string; BrKons?: { Kundmachungsorgan?: string; ArtikelParagraphAnlage?: string; Inkrafttretensdatum?: string; Ausserkrafttretensdatum?: string; GesamteRechtsvorschriftUrl?: string; }; }; Landesrecht?: { Kurztitel?: string; Langtitel?: string; Titel?: string; Eli?: string; LrKons?: { Kundmachungsorgan?: string; ArtikelParagraphAnlage?: string; Inkrafttretensdatum?: string; Ausserkrafttretensdatum?: string; GesamteRechtsvorschriftUrl?: string; }; }; Judikatur?: RawJudikaturMetadata; }; Dokumentliste?: { ContentReference?: RawContentReference | RawContentReference[]; }; }; } /** * Raw API search response structure. */ export interface RawApiResponse { OgdSearchResult?: { OgdDocumentResults?: { Hits?: RawHitsInfo | string | number; OgdDocumentReference?: RawDocumentReference | RawDocumentReference[]; }; }; } /** * Normalized search results from client. */ export interface NormalizedSearchResults { hits: number; page_number: number; page_size: number; documents: RawDocumentReference[]; } /** * Map numeric limit to RIS API DokumenteProSeite value. */ export declare function limitToDokumenteProSeite(limit: number): DokumenteProSeite; //# sourceMappingURL=types.d.ts.map