// Generated from the element sources by scripts/rapidoc-metadata.js. Do not edit. /** The attributes of ``, as written in HTML: every value is a string. */ export interface RapiDocAttributes { /** URL of the OpenAPI specification file (JSON or YAML) to load and render. */ "spec-url"?: string; /** Sorts tags in alphabetical order. When set to "false", preserves the tag order defined in the OpenAPI specification. */ "sort-tags"?: "true" | "false"; /** Sorts component schemas alphabetically. When set to "false", preserves the order defined in the spec. Note: Only has an effect if render-style="focused" and show-components="true". */ "sort-schemas"?: "true" | "false"; /** Sorts endpoints within each tag group by path, HTTP method, or summary. 'none' leaves the sort order unmodified. ⓘ This is a static initialization attribute. It will not have any effect if modified using JavaScript after the spec is rendered. */ "sort-endpoints-by"?: "path" | "method" | "summary" | "none"; /** Shows tags that no operation uses, as long as they have a description, so a tag can hold a guide or concepts section (written in markdown) next to the operations. Each such tag gets a section and a sidebar link. When "false", tags without operations are left out, except those the spec lists in x-tagGroups, which show either way. Either way, an OpenAPI 3.2 tag that is the parent of other tags is drawn as their group's heading, not as a section, and a tag whose kind is not nav never gets one. ⓘ This is a static initialization attribute. It will not have any effect if modified using JavaScript after the spec is rendered. */ "show-unused-tags"?: "true" | "false"; /** Groups operations that have no tag under a tag made from the first segment of their path. */ "generate-missing-tags"?: "true" | "false"; /** Which operations to show: a space- or comma-separated list of terms. An operation is shown when it matches any include term (every one is, without one) and no ! term. A term is an operationId (getPetById), a method and path (GET /pet/{petId}), a path for all its methods, a path glob (/pet/**; * is one segment, ** any number), tag:store, badge:Beta (an x-badges label, or an OpenAPI 3.2 tag of kind: badge) or deprecated; ! before a term leaves out what it matches (!badge:Internal). Shown operations keep the order of the first term they match, so a list of operationIds shows them in that order (unless sort-endpoints-by is set). */ "filter-operations"?: string; /** Controls the overall documentation presentation layout. Three distinct modes are supported: view: Optimized for interactive exploration with collapsible operations | Example read: Continuous narrative page layout, ideal for reading through API specifications from top to bottom | Example focused: Displays a single endpoint at a time with a dedicated sidebar, ideal for large enterprise schemas | Example */ "render-style"?: "read" | "view" | "focused"; /** Controls the multi-column orientation of request parameters and response panels on desktop screens (>768px). In 'row' layout, request and response sections sit side-by-side; in 'column' layout, they stack vertically. Defaults to 'column' when render-style is 'read' or 'focused', and 'row' when render-style is 'view'. */ "layout"?: "row" | "column"; /** Allowed: Any valid CSS height value (e.g. 400px, 50%, 60vh). Controls the vertical height of the interactive response payload viewer. */ "response-area-height"?: string; /** Text direction of the page. */ "page-direction"?: "ltr" | "rtl"; /** Allowed: A number of pixels (e.g. 96). With auto-height="true", where the page scrolls instead of RapiDoc, this is the height of a sticky or fixed page header. Navigation scrolls a section to just below it, and the active navigation item ignores sections hidden under it. When not set, RapiDoc uses the scroll root's scroll-padding-top, so a page that already sets it needs no extra configuration. */ "scroll-offset"?: string; /** How the page scrolls when a navigation item is clicked. */ "scroll-behavior"?: "smooth" | "auto"; /** CSS selector of the ancestor element that scrolls, when it cannot be detected. */ "scroll-container"?: string; /** Lets the element grow to the height of its content, so the host page scrolls instead of the element. */ "auto-height"?: "true" | "false"; /** Brand color preset, or a custom brand color as a hex code. Each preset defines a dark and a light palette. */ "theme"?: "ember" | "carbon" | "cobalt" | "jade" | "indigo" | "amber" | (string & {}); /** Base color scheme mode. 'system' automatically matches the user's OS preference. 'auto' follows the host page: it reads the page's CSS color-scheme (for example :root[data-theme='light'] { color-scheme: light }, as Starlight sets it) and updates when the page switches theme; when the page declares none, it falls back to the OS preference. */ "color-scheme"?: "dark" | "light" | "system" | "auto"; /** Corner radius scale applied across cards, buttons, badges, inputs, and dialogs. */ "radius"?: "none" | "sm" | "md" | "lg" | "full"; /** Relative scale factor for typography and UI elements across the documentation portal. */ "scale"?: "sm" | "default" | "lg"; /** A custom brand color as a hex code. Same as passing the hex code to theme. */ "primary-color"?: string; /** File name of a stylesheet the page already loads with a tag. Its rules are copied into the shadow DOM. */ "css-file"?: string; /** Space-separated CSS class names, defined in css-file, to add to the element's root. */ "css-classes"?: string; /** The navigation sidebar (read and focused modes). true docks it beside the content on wide layouts and turns it into a menu button with a slide-over menu when the element is narrower than 768px; floating uses the menu button and slide-over menu at every width, so the content takes the whole width; false shows no sidebar. */ "show-side-nav"?: "true" | "false" | "floating"; /** Shows each operation's HTTP method (GET, POST, etc.) at the start of its sidebar item, in a column of its own: as plain text, colored text, or a colored block with a three-letter method. false shows the summary alone. */ "show-method-in-nav-bar"?: "false" | "as-plain-text" | "as-colored-text" | "as-colored-block"; /** Marks sidebar items whose operation shows a badge (x-badges, or an OpenAPI 3.2 tag of kind: badge) with a small dot in the first badge's color; its tooltip and accessible label list the badges. Badges with color: none are left out. The dot's shape and size can be styled with the nav-badge-dot CSS part. */ "show-badges-in-nav-bar"?: "dot" | "false"; /** Displays raw API URL paths in the navigation bar instead of operation summaries. NOTE: Setting this to true displays the path only. To display the HTTP method alongside the path, also configure show-method-in-nav-bar. */ "use-path-in-nav-bar"?: "true" | "false"; /** Controls text truncation behavior for long endpoint paths and operation summaries in the navigation sidebar. When set to ellipsis (default), long paths truncate with a clean ellipsis. When set to wrap, long items wrap across multiple lines without clipping. */ "nav-item-overflow"?: "ellipsis" | "wrap"; /** Extracts Markdown headings (H1 and H2) from the specification's info description and adds them to the sidebar navigation menu (read mode only). */ "info-description-headings-in-navbar"?: "true" | "false"; /** When set to "true", automatically updates the browser's URL address hash as the user scrolls through or clicks on different sections. */ "update-route"?: "true" | "false"; /** Target endpoint location to navigate to automatically after the specification finishes loading. Must be provided in the format of {method}-{path} (e.g., to focus on GET /user/login, provide get-/user/login). */ "goto-path"?: string; /** Toggles the top navigation header bar. Set to false to prevent users from loading alternative spec URLs or to seamlessly embed inside existing layouts. */ "show-header"?: "true" | "false"; /** Custom title text displayed on the top-left corner of the header. */ "heading-text"?: string; /** Toggles visibility of the OpenAPI document info section (title, description, version, terms of service). Useful when embedding `` into an existing developer portal or knowledge base that already contains its own header. */ "show-info"?: "true" | "false"; /** Toggles the components section (schemas, responses, examples, request bodies, headers, security schemes) in both the document body and sidebar menu (available in focused render-style). */ "show-components"?: "true" | "false"; /** Enables the instant search and filtering input in the navigation sidebar. */ "allow-search"?: "true" | "false"; /** Enables deep multi-property search modal, indexing paths, descriptions, parameter names, and response schemas. */ "allow-advanced-search"?: "true" | "false"; /** When set to false, disables the input field allowing users to load arbitrary external OpenAPI specification URLs. */ "allow-spec-url-load"?: "true" | "false"; /** When set to false, hides the file picker allowing users to upload and preview local OpenAPI spec files (desktop viewports >768px). */ "allow-spec-file-load"?: "true" | "false"; /** When set to true, displays convenient buttons in the overview section to download the raw OpenAPI specification file or view it in a new tab. */ "allow-spec-file-download"?: "true" | "false"; /** Controls the visual representation of complex JSON schemas in request and response panels. 'tree' provides an interactive collapsible tree view; 'table' renders structured tabular rows. */ "schema-style"?: "tree" | "table"; /** Initial depth level for auto-expanding complex nested schema properties and sub-objects (the default expands all levels). */ "schema-expand-level"?: number | string; /** Controls whether schema field constraints, validation rules, and descriptions are fully expanded by default or collapsed to a single line. */ "schema-description-expanded"?: "true" | "false"; /** Shows or hides the button allowing users to toggle between single-line summary and multi-line detailed schema property descriptions. */ "allow-schema-description-expand-toggle"?: "true" | "false"; /** 'default' hides read-only properties in request bodies while displaying them in response models and webhook callbacks. Set to 'never' to always display read-only fields across all payloads. Note: This does not affect example generation. */ "schema-hide-read-only"?: "default" | "never"; /** 'default' hides write-only properties in response bodies while displaying them in request payloads. Set to 'never' to always display write-only fields across all payloads. Note: This does not affect example generation. */ "schema-hide-write-only"?: "default" | "never"; /** Selects which tab is active by default, and listed first, for request bodies, responses and object parameters: 'schema' (data contract model) or 'example' (sample JSON payload). */ "default-schema-tab"?: "schema" | "example"; /** Enables the interactive "TRY" console allowing users to test live API calls directly from their browser. Besides true and false, it takes the terms of filter-operations to turn Try on only for the operations they select: !deprecated !tag:pending-implementation keeps it off for deprecated operations and those tagged pending-implementation. The others keep their request documentation and show a disabled TRY DISABLED button. The Authentication section stays usable unless it is false. */ "allow-try"?: "true" | "false"; /** When set to true, generates and displays copyable cURL commands directly within the endpoint documentation prior to clicking "TRY". */ "show-curl-before-try"?: "true" | "false"; /** Pre-populates interactive request parameter inputs and request body fields using example values defined in the OpenAPI spec. */ "fill-request-fields-with-example"?: "true" | "false"; /** Enables the dropdown allowing users to switch between target servers declared in the OpenAPI spec. */ "allow-server-selection"?: "true" | "false"; /** Custom API server base URL. Overrides the servers array defined in the OpenAPI specification. Particularly useful when sharing a single spec across development, staging, and production environments. */ "server-url"?: string; /** Selects which server URL from the spec's servers list should be selected by default. */ "default-api-server"?: string; /** Configures credentials mode for cross-origin browser Fetch requests as defined in the Fetch Standard, enabling transmission of cookies and Authorization headers in CORS requests. */ "fetch-credentials"?: "omit" | "same-origin" | "include"; /** Controls the display of interactive authentication controls (HTTP Basic, Bearer Token, API Key, OAuth2). Disable to hide authentication dialogs when using hardcoded or pre-authenticated API keys. */ "allow-authentication"?: "true" | "false"; /** Keeps API keys, bearer tokens and OAuth access tokens in localStorage across page reloads; an OAuth token is dropped once it expires. Basic credentials and OAuth client secrets are never stored. */ "persist-auth"?: "true" | "false"; /** Name of the header or query parameter used when transmitting the API key in interactive console requests. */ "api-key-name"?: string; /** Specifies whether the API key is passed as an HTTP request header or query parameter. */ "api-key-location"?: "header" | "query"; /** Pre-configured API key value sent during interactive console requests. Can also be set or overwritten directly in the UI. */ "api-key-value"?: string; /** Relative or absolute path to the OAuth receiver HTML file for handling authorization redirection callbacks. */ "oauth-receiver"?: string; /** Custom query parameters appended to the OAuth2 authorization URL query string (e.g. proxy launch tokens, prompt, audience). Supported Formats: JSON String (recommended for HTML attributes):additional-authorize-params='{"launch": "xyz123", "prompt": "consent"}' URL Query String:additional-authorize-params="launch=xyz123&prompt=consent" JavaScript Object (via property):rapidocEl.additionalAuthorizeParams = { launch: 'xyz123', prompt: 'consent' }; */ "additional-authorize-params"?: string; /** Custom parameters included in the POST request body sent to the OAuth2 token endpoint (e.g. custom proxy parameters, resource, audience). Supported Formats: JSON String (recommended for HTML attributes):additional-token-params='{"audience": "https://api.example.com", "resource": "urn:my:api"}' URL-Encoded String:additional-token-params="audience=https%3A%2F%2Fapi.example.com" JavaScript Object (via property):rapidocEl.additionalTokenParams = { audience: 'https://api.example.com' }; */ "additional-token-params"?: string; /** Enables the built-in, zero-dependency in-browser mock server. Transparently intercepts outgoing network requests (both RapiDoc's Try console and host application fetch/XHR calls) and serves mock responses based on OpenAPI examples or generated from schemas. */ "mock-server"?: "true" | "false"; /** HTTP status code to answer with, or several separated by commas, used in turn per operation (503, 503, 200: two failures, then a success); a random: prefix picks one at random for each call (random:200, 500), cycle: says in turn explicitly. Or a JSON map by operation, each with its own codes and prefix ({ "POST /orders": "cycle:503, 200", "*": "200" }). Set it to an empty string to use the first 2xx response in the spec. */ "mock-server-status-code"?: string; /** Simulated network latency in milliseconds before resolving mock responses. Useful for testing client loading spinners and optimistic UI updates. For a streamed response (OpenAPI 3.2 itemSchema: Server-Sent Events, JSON Lines), the response starts at once and this is the gap between its items (300 ms when 0). */ "mock-server-delay"?: number | string; /** Logs one line per answered request (method, path and status code) to the browser console. */ "mock-server-log"?: "true" | "false"; /** Enables Model Context Protocol (MCP) server export for AI agents. true renders an Export MCP Server button in the overview section that downloads a zip with the MCP manifest (manifest.json), a fixed runtime (runtime.js) and a stdio TypeScript server (server.ts). false or an empty value hides the button. */ "mcp"?: "true" | "false"; /** Custom name for the generated MCP server. Defaults to the API specification title. */ "mcp-server-name"?: string; } /** The events `` dispatches. */ export interface RapiDocEventMap extends HTMLElementEventMap { /** Dispatched before rendering starts. Provides the parsed OpenAPI specification object via e.detail.spec, allowing programmatic modifications before the UI tree is built. */ "before-render": CustomEvent; /** Dispatched after the OpenAPI specification has been fully fetched, parsed, resolved, and rendered into the DOM. Provides the resolved spec object in e.detail. */ "spec-loaded": CustomEvent; /** Dispatched when the active section changes: a click in the sidebar, scrollToPath, a hash change, or scrolling that brings a different section into view. Bubbles and is composed, so a page-level listener outside the shadow DOM receives it. The detail is the same from every source: e.detail.elementId is the section's element id, e.detail.type is operation, tag or section (the overview, servers, authentication, a description heading, a component), and e.detail.operationId is the operation's operationId from the spec, present only for an operation that has one. Static sidebars rendered with @rapidoc/prerender and bindNavBar use it to highlight the current item. */ "nav-active-change": CustomEvent; /** Dispatched when a user clicks "TRY" before the network request is initiated. Provides a mutable Request-like object via e.detail.request to append headers, rewrite parameters, or modify payloads, along with an AbortController via e.detail.controller to abort requests conditionally. Example: Append custom authorization headers before sending: rapidocEl.addEventListener('before-try', (e) => { if (e.detail.request.method === 'POST') { e.detail.request.headers.append('X-Tenant-ID', 'corp-acme-123'); } }); Example: Append query parameters to all GET requests: rapidocEl.addEventListener('before-try', (e) => { if (e.detail.request.method === 'GET') { const url = new URL(e.detail.request.url); url.searchParams.append('client_version', '2.4.0'); e.detail.request.url = url.toString(); } }); Example: Abort specific requests conditionally: rapidocEl.addEventListener('before-try', (e) => { if (e.detail.request.method === 'DELETE') { alert('DELETE operations are disabled in this sandbox environment.'); e.detail.controller.abort(); } }); */ "before-try": CustomEvent; /** Dispatched after a try request completes. Provides e.detail.request and e.detail.response. In the event of a network or protocol error, provides request and error objects. */ "after-try": CustomEvent; /** Dispatched when an in-flight API try request is aborted by the user or programmatically via AbortController. */ "request-aborted": CustomEvent; /** Dispatched when the active target API server is modified in the dropdown. */ "api-server-change": CustomEvent; /** Dispatched immediately before opening the OAuth authorization popup window. Provides e.detail.securitySchemeId, e.detail.flowType, e.detail.authUrl, and mutable e.detail.authParams (URLSearchParams). Calling e.preventDefault() cancels opening the authorization window. Example: Dynamically inject a launch token or proxy parameter: rapidocEl.addEventListener('before-authorize', (e) => { e.detail.authParams.set('launch', 'xyz123'); }); */ "before-authorize": CustomEvent; /** Dispatched immediately before sending the POST request to the OAuth2 token endpoint. Provides e.detail.securitySchemeId, e.detail.grantType, e.detail.tokenUrl, mutable e.detail.params (URLSearchParams), e.detail.headers (Headers), and mutable e.detail.request. Calling e.preventDefault() cancels the token request. Example: Add a custom token audience or header: rapidocEl.addEventListener('before-token-request', (e) => { e.detail.params.set('audience', 'https://api.mycompany.com'); e.detail.headers.set('X-Client-Version', '1.0.0'); }); */ "before-token-request": CustomEvent; } /** The `` element. Method arguments and results are not typed yet. */ export declare class RapiDocElement extends HTMLElement { /** Programmatically loads a new OpenAPI specification. Accepts either a string URL or a valid in-memory JSON/JavaScript spec object. The download and view buttons and the header's spec URL box follow the spec loaded: its URL, or none for a spec object (the spec download buttons are then hidden). */ loadSpec(spec?: any): any; /** Connects a sidebar rendered outside the component (for example the static HTML from getNavBarHtml in @rapidoc/prerender) to this element: clicks navigate with scrollToPath, the active item follows nav-active-change, and the filter box filters the sidebar. sidebar is an element or a CSS selector; options accepts activeClass (default active) and updateHistory (default true). Returns a function that removes the bindings. */ bindNavBar(sidebar?: any, options?: any): any; /** Programmatically scrolls the viewport to focus on a specific endpoint section. The path argument is the operation's element ID (e.g., login-user) or its method + path anchor (e.g., get-user-login; the older get-/user/login format also works). */ scrollToPath(path?: any): any; /** Programmatically supplies username and password credentials for an HTTP Basic security scheme declared in the spec. */ setHttpUserNameAndPassword(securitySchemeId?: any, username?: any, password?: any): any; /** Programmatically provides the token or key for a declared API Key, Bearer Token or OAuth security scheme. Optional options.note says where the key came from (for example the reader's sign-in); the Authentication section shows it in place of that scheme's form, with a link to open the form. Changing or removing the key drops the note. */ setApiKey(securitySchemeId?: any, token?: any, options?: any): any; /** Programmatically switches the active target API server URL. */ setApiServer(apiServerUrl?: any): any; /** Builds the MCP manifest and the exported project in memory. Returns { manifest, files, budget, hostConfig }: manifest is the plain JSON description of the server (one tool per operation with a JSON Schema inputSchema, MCP annotations and the operation the runtime executes), files maps every file of the zip to its text (manifest.json, server.ts, runtime.js, package.json, README.md, mcp.json), budget is the token diagnostics and hostConfig the text of mcp.json, the entry for an AI app's MCP configuration. options: serverName, includeInternal, includeDeprecated, includeOperations (false: only the workflow tools of a paired ). */ generateMcpServer(options?: any): any; /** Downloads the exported project as -mcp.zip (-workflows-mcp.zip with includeOperations: false). Same options as generateMcpServer. */ downloadMcpServer(options?: any): any; /** Returns prompt token overhead diagnostics for the current OpenAPI specification: { totalTools, totalResources, estimatedTokens, consequentialCount, warnings }, where consequentialCount is the number of tools that are not read-only and warnings lists context footprint warnings (over 30 tools or 5,000 tokens). */ getMcpBudget(options?: any): any; addEventListener( type: K, listener: (this: RapiDocElement, ev: RapiDocEventMap[K]) => any, options?: boolean | AddEventListenerOptions, ): void; addEventListener( type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions, ): void; removeEventListener( type: K, listener: (this: RapiDocElement, ev: RapiDocEventMap[K]) => any, options?: boolean | EventListenerOptions, ): void; removeEventListener( type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions, ): void; } /** The attributes of ``, as written in HTML: every value is a string. */ export interface RapiDocMiniAttributes { /** URL of the OpenAPI specification file (JSON or YAML) to load and render. */ "spec-url"?: string; /** Sorts endpoints within each tag group by path, HTTP method, or summary. 'none' leaves the sort order unmodified. ⓘ This is a static initialization attribute. It will not have any effect if modified using JavaScript after the spec is rendered. */ "sort-endpoints-by"?: "path" | "method" | "summary" | "none"; /** Which operations to show: a space- or comma-separated list of terms. An operation is shown when it matches any include term (every one is, without one) and no ! term. A term is an operationId (getPetById), a method and path (GET /pet/{petId}), a path for all its methods, a path glob (/pet/**; * is one segment, ** any number), tag:store, badge:Beta (an x-badges label, or an OpenAPI 3.2 tag of kind: badge) or deprecated; ! before a term leaves out what it matches (!badge:Internal). Shown operations keep the order of the first term they match, so a list of operationIds shows them in that order (unless sort-endpoints-by is set). */ "filter-operations"?: string; /** true shows each tag's name and description above its operations. Off by default: a mini usually shows a few of a tag's operations, which its description would not match. always shows tags. */ "show-tags"?: "true" | "false"; /** Request and response side by side (row), or one above the other (column). */ "layout"?: "row" | "column"; /** Shows operations open instead of collapsed. */ "paths-expanded"?: "true" | "false"; /** Height of the response panel, as a CSS length. */ "response-area-height"?: string; /** Shows the summary on a collapsed operation. */ "show-summary-when-collapsed"?: "true" | "false"; /** Selects which tab is active by default, and listed first, for request bodies, responses and object parameters: 'schema' (data contract model) or 'example' (sample JSON payload). */ "default-schema-tab"?: "schema" | "example"; /** Controls the visual representation of complex JSON schemas in request and response panels. 'tree' provides an interactive collapsible tree view; 'table' renders structured tabular rows. */ "schema-style"?: "tree" | "table"; /** Initial depth level for auto-expanding complex nested schema properties and sub-objects (the default expands all levels). */ "schema-expand-level"?: number | string; /** Controls whether schema field constraints, validation rules, and descriptions are fully expanded by default or collapsed to a single line. */ "schema-description-expanded"?: "true" | "false"; /** Pre-populates interactive request parameter inputs and request body fields using example values defined in the OpenAPI spec. */ "fill-request-fields-with-example"?: "true" | "false"; /** Selects which server URL from the spec's servers list should be selected by default. */ "default-api-server"?: string; /** Custom API server base URL. Overrides the servers array defined in the OpenAPI specification. Particularly useful when sharing a single spec across development, staging, and production environments. */ "server-url"?: string; /** Enables the interactive "TRY" console allowing users to test live API calls directly from their browser. Besides true and false, it takes the terms of filter-operations to turn Try on only for the operations they select: !deprecated !tag:pending-implementation keeps it off for deprecated operations and those tagged pending-implementation. The others keep their request documentation and show a disabled TRY DISABLED button. The Authentication section stays usable unless it is false. */ "allow-try"?: "true" | "false"; /** When set to true, generates and displays copyable cURL commands directly within the endpoint documentation prior to clicking "TRY". */ "show-curl-before-try"?: "true" | "false"; /** Configures credentials mode for cross-origin browser Fetch requests as defined in the Fetch Standard, enabling transmission of cookies and Authorization headers in CORS requests. */ "fetch-credentials"?: "omit" | "same-origin" | "include"; /** Keeps API keys, bearer tokens and OAuth access tokens in localStorage across page reloads; an OAuth token is dropped once it expires. Basic credentials and OAuth client secrets are never stored. */ "persist-auth"?: "true" | "false"; /** Name of the header or query parameter used when transmitting the API key in interactive console requests. */ "api-key-name"?: string; /** Specifies whether the API key is passed as an HTTP request header or query parameter. */ "api-key-location"?: "header" | "query"; /** Pre-configured API key value sent during interactive console requests. Can also be set or overwritten directly in the UI. */ "api-key-value"?: string; /** Relative or absolute path to the OAuth receiver HTML file for handling authorization redirection callbacks. */ "oauth-receiver"?: string; /** Custom query parameters appended to the OAuth2 authorization URL query string (e.g. proxy launch tokens, prompt, audience). Supported Formats: JSON String (recommended for HTML attributes):additional-authorize-params='{"launch": "xyz123", "prompt": "consent"}' URL Query String:additional-authorize-params="launch=xyz123&prompt=consent" JavaScript Object (via property):rapidocEl.additionalAuthorizeParams = { launch: 'xyz123', prompt: 'consent' }; */ "additional-authorize-params"?: string; /** Custom parameters included in the POST request body sent to the OAuth2 token endpoint (e.g. custom proxy parameters, resource, audience). Supported Formats: JSON String (recommended for HTML attributes):additional-token-params='{"audience": "https://api.example.com", "resource": "urn:my:api"}' URL-Encoded String:additional-token-params="audience=https%3A%2F%2Fapi.example.com" JavaScript Object (via property):rapidocEl.additionalTokenParams = { audience: 'https://api.example.com' }; */ "additional-token-params"?: string; /** Enables the built-in, zero-dependency in-browser mock server. Transparently intercepts outgoing network requests (both RapiDoc's Try console and host application fetch/XHR calls) and serves mock responses based on OpenAPI examples or generated from schemas. */ "mock-server"?: "true" | "false"; /** HTTP status code to answer with, or several separated by commas, used in turn per operation (503, 503, 200: two failures, then a success); a random: prefix picks one at random for each call (random:200, 500), cycle: says in turn explicitly. Or a JSON map by operation, each with its own codes and prefix ({ "POST /orders": "cycle:503, 200", "*": "200" }). Set it to an empty string to use the first 2xx response in the spec. */ "mock-server-status-code"?: string; /** Simulated network latency in milliseconds before resolving mock responses. Useful for testing client loading spinners and optimistic UI updates. */ "mock-server-delay"?: number | string; /** Logs one line per answered request (method, path and status code) to the browser console. */ "mock-server-log"?: "true" | "false"; /** Brand color preset, or a custom brand color as a hex code. Each preset defines a dark and a light palette. */ "theme"?: "ember" | "carbon" | "cobalt" | "jade" | "indigo" | "amber" | (string & {}); /** A custom brand color as a hex code. Same as passing the hex code to theme. */ "primary-color"?: string; /** Base color scheme mode. 'system' automatically matches the user's OS preference. 'auto' follows the host page: it reads the page's CSS color-scheme (for example :root[data-theme='light'] { color-scheme: light }, as Starlight sets it) and updates when the page switches theme; when the page declares none, it falls back to the OS preference. */ "color-scheme"?: "dark" | "light" | "system" | "auto"; /** Corner radius scale applied across cards, buttons, badges, inputs, and dialogs. */ "radius"?: "none" | "sm" | "md" | "lg" | "full"; /** Relative scale factor for typography and UI elements across the documentation portal. */ "scale"?: "sm" | "default" | "lg"; } /** The events `` dispatches. */ export interface RapiDocMiniEventMap extends HTMLElementEventMap { /** Dispatched after the OpenAPI specification has been fully fetched, parsed, resolved, and rendered into the DOM. Provides the resolved spec object in e.detail. */ "spec-loaded": CustomEvent; } /** The `` element. Method arguments and results are not typed yet. */ export declare class RapiDocMiniElement extends HTMLElement { /** Programmatically loads a new OpenAPI specification. Accepts either a string URL or a valid in-memory JSON/JavaScript spec object. The download and view buttons and the header's spec URL box follow the spec loaded: its URL, or none for a spec object (the spec download buttons are then hidden). */ loadSpec(spec?: any): any; /** Programmatically supplies username and password credentials for an HTTP Basic security scheme declared in the spec. */ setHttpUserNameAndPassword(securitySchemeId?: any, username?: any, password?: any): any; /** Programmatically provides the token or key for a declared API Key, Bearer Token or OAuth security scheme. Optional options.note says where the key came from (for example the reader's sign-in); the Authentication section shows it in place of that scheme's form, with a link to open the form. Changing or removing the key drops the note. */ setApiKey(securitySchemeId?: any, token?: any, options?: any): any; /** Removes every API key, token and credential set on the element. */ removeAllSecurityKeys(): any; /** Expands one operation and scrolls it into view. operation is its operationId (getPetById) or its method and path (GET /pet/{petId}). Resolves to false when the element shows no such operation (not loaded yet, or left out by filter-operations). */ showOperation(operation?: any): any; /** Programmatically switches the active target API server URL. */ setApiServer(apiServerUrl?: any): any; addEventListener( type: K, listener: (this: RapiDocMiniElement, ev: RapiDocMiniEventMap[K]) => any, options?: boolean | AddEventListenerOptions, ): void; addEventListener( type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions, ): void; removeEventListener( type: K, listener: (this: RapiDocMiniElement, ev: RapiDocMiniEventMap[K]) => any, options?: boolean | EventListenerOptions, ): void; removeEventListener( type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions, ): void; } /** Importing `rapidoc` registers ``, `` and ``. */ declare const _default: { RapiDoc: typeof RapiDocElement }; export default _default; export declare const RapiDocMini: typeof RapiDocMiniElement; export declare const OAuthReceiver: CustomElementConstructor; declare global { interface HTMLElementTagNameMap { "rapi-doc": RapiDocElement; "rapi-doc-mini": RapiDocMiniElement; "oauth-receiver": HTMLElement; } }