import "../../_dnt.polyfills.js"; import type { OasUnknown } from '../unknown/Unknown.js'; import type { SchemaPath } from '../../types/SchemaPath.js'; import type { OasRef } from '../ref/Ref.js'; import type { OpenAPIV3 } from 'openapi-types'; import type { OasSchema, ToJsonSchemaOptions } from '../schema/Schema.js'; import { OasBase } from '../../types/OasBase.js'; import type { ParseContextType } from '../../context/parseTypes.js'; /** * Constructor fields for {@link OasNumber}. * * @template Nullable - Whether the number can be null (affects type unions) */ export type NumberFields = { /** A short summary of the number schema */ title?: string; /** A description of the number schema */ description?: string; /** Whether the number value can be null */ nullable?: Nullable; /** Default value for the number (null allowed if Nullable is true) */ default?: Nullable extends true ? number | null | undefined : number | undefined; /** Custom extension fields (x-* properties) */ extensionFields?: Record; /** Example value for the number (null allowed if Nullable is true) */ example?: Nullable extends true ? number | null | undefined : number | undefined; /** Array of valid enum values for the number (null allowed if Nullable is true) */ enums?: Nullable extends true ? (number | null)[] | undefined : number[] | undefined; /** The format of the number (float or double precision) */ format?: 'float' | 'double'; /** Value must be a multiple of this number */ multipleOf?: number; /** Maximum value allowed (inclusive by default) */ maximum?: number; /** Whether the maximum value is exclusive */ exclusiveMaximum?: boolean; /** Minimum value allowed (inclusive by default) */ minimum?: number; /** Whether the minimum value is exclusive */ exclusiveMinimum?: boolean; /** Whether the number is read-only */ readOnly?: boolean; /** Whether the number is write-only */ writeOnly?: boolean; /** Whether the number is deprecated */ deprecated?: boolean; }; export declare class OasNumber extends OasBase { /** * Object is part the 'schema' set which is used * to define data types in an OpenAPI document. */ oasType: "schema"; /** * Constant value 'number' useful for type narrowing and tagged unions. */ type: "number"; /** * A short summary of the number. */ title: string | undefined; /** * The default value of the number. */ default: Nullable extends true ? number | null | undefined : number | undefined; /** * A description of the number. */ description: string | undefined; /** * Indicates whether value can be null. */ nullable: Nullable | undefined; /** Specification Extension fields */ extensionFields: Record | undefined; /** * An example of the number. */ example: Nullable extends true ? number | null | undefined : number | undefined; /** * An array of allowed values for the number. */ enums: Nullable extends true ? (number | null)[] | undefined : number[] | undefined; /** * The format of the number. */ format: 'float' | 'double' | undefined; /** * The multiple of the number. */ multipleOf: number | undefined; /** * The maximum value of the number. */ maximum: number | undefined; /** * Whether the maximum value is exclusive. */ exclusiveMaximum: boolean | undefined; /** * The minimum value of the number. */ minimum: number | undefined; /** * Whether the minimum value is exclusive. */ exclusiveMinimum: boolean | undefined; /** * Whether the number is read-only. */ readOnly: boolean | undefined; /** * Whether the number is write-only. */ writeOnly: boolean | undefined; /** * Whether the number is deprecated. */ deprecated: 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?: NumberFields, context?: ParseContextType); isRef(): this is OasRef<'schema'>; /** Whether the value is `readOnly`: sent by the API only, never in a request. */ isReadOnly(): boolean; /** Whether the value is `writeOnly`: sent in a request only, never by the API. */ isWriteOnly(): boolean; /** * A copy of this schema with what `ref` adds at its site applied: its * `nullable`, `readOnly`, `writeOnly` 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'>): OasNumber; traverse(path: SchemaPath): OasSchema | OasRef<'schema'>; resolve(): OasNumber; resolveOnce(): OasNumber; toJsonSchema(options?: ToJsonSchemaOptions): OpenAPIV3.NonArraySchemaObject; }