import "../../_dnt.polyfills.js"; import type { SchemaPath } from '../../types/SchemaPath.js'; import type { OpenAPIV3 } from 'openapi-types'; import type { OasRef } from '../ref/Ref.js'; import type { OasSchema, ToJsonSchemaOptions } from '../schema/Schema.js'; import { OasBase } from '../../types/OasBase.js'; import type { ParseContextType } from '../../context/parseTypes.js'; export type UnknownFields = { title?: string; description?: string; extensionFields?: Record; example?: unknown; nullable?: boolean; }; /** * Object representing an unknown type in the OpenAPI Specification. * * JSON schema treats a definition without any type information as 'any'. * Since this is not useful in an API context, we use OasUnknown to * represent types that are not specified. */ export declare class OasUnknown extends OasBase { /** * Object is part the 'schema' set which is used * to define data types in an OpenAPI document. */ oasType: "schema"; /** * Constant value 'unknown' useful for type narrowing and tagged unions. */ type: "unknown"; /** * A short summary of the unknown type. */ title: string | undefined; /** * A description of the unknown type. */ description: string | undefined; /** Specification Extension fields */ extensionFields: Record | undefined; /** An example of the unknown type. */ example: unknown | undefined; /** Whether the unknown type is nullable */ nullable: boolean | undefined; /** * The schema's `not`, kept as an `OasUnknown` under `client.json` * `system.not: unknown`: the document says "not something", and core does * not read what. `undefined` otherwise. */ not: OasUnknown | undefined; constructor(fields?: UnknownFields, context?: ParseContextType); isRef(): this is OasRef<'schema'>; /** Always `false`: this schema has no `readOnly`. */ isReadOnly(): boolean; /** Always `false`: this schema has no `writeOnly`. */ isWriteOnly(): boolean; /** * A copy of this schema with what `ref` adds at its site applied: its * `nullable` and the keywords next to it (`SiblingKeywords`) that * this type takes, a sibling's value winning. A value that does not fit * this type is left out (the parser reports it). For `OasRef.resolve()`. * This schema does not change, and the copy shares its child schemas. */ clone(ref?: OasRef<'schema'>): OasUnknown; traverse(path: SchemaPath): OasSchema | OasRef<'schema'>; resolve(): OasUnknown; resolveOnce(): OasUnknown; toJsonSchema(_options?: ToJsonSchemaOptions): OpenAPIV3.NonArraySchemaObject | OpenAPIV3.ArraySchemaObject; }