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 OasInteger}. * * @template Nullable - Whether the integer value can be null */ export type IntegerFields = { /** A short summary of the integer schema */ title?: string; /** A description of the integer schema */ description?: string; /** Whether the integer value can be null */ nullable?: Nullable; /** Integer format specification (int32 or int64) */ format?: 'int32' | 'int64'; /** Default value for the integer */ default?: Nullable extends true ? number | null | undefined : number | undefined; /** Array of allowed enum values */ enums?: Nullable extends true ? (number | null)[] | undefined : number[] | undefined; /** Custom extension fields (x-* properties) */ extensionFields?: Record; /** Example value for the integer */ example?: Nullable extends true ? number | null | undefined : number | undefined; /** Number must be a multiple of this value */ multipleOf?: number; /** Maximum value (inclusive) */ maximum?: number; /** Whether maximum is exclusive */ exclusiveMaximum?: boolean; /** Minimum value (inclusive) */ minimum?: number; /** Whether minimum is exclusive */ exclusiveMinimum?: boolean; /** Whether the integer is read-only */ readOnly?: boolean; /** Whether the integer is write-only */ writeOnly?: boolean; /** Whether the integer is deprecated */ deprecated?: boolean; }; export declare class OasInteger extends OasBase { /** * Object is part the 'schema' set which is used * to define data types in an OpenAPI document. */ oasType: "schema"; /** * Constant value 'integer' useful for type narrowing and tagged unions. */ type: "integer"; /** * A short summary of the integer. */ title: string | undefined; /** * A description of the integer. */ description: string | undefined; /** * Indicates whether value can be null. */ nullable: Nullable | undefined; /** * The format of the integer. */ format: 'int32' | 'int64' | undefined; /** * An array of allowed values for the integer. */ enums: Nullable extends true ? (number | null)[] | undefined : number[] | undefined; /** Specification Extension fields */ extensionFields: Record | undefined; /** * An example of the integer. */ example: Nullable extends true ? number | null | undefined : number | undefined; /** * The multiple of the integer. */ multipleOf: number | undefined; /** * The maximum value of the integer. */ maximum: number | undefined; /** * Whether the maximum value is exclusive. */ exclusiveMaximum: boolean | undefined; /** * The minimum value of the integer. */ minimum: number | undefined; /** * Whether the minimum value is exclusive. */ exclusiveMinimum: boolean | undefined; /** * The default value of the integer. */ default: Nullable extends true ? number | null | undefined : number | undefined; /** * Whether the integer is read-only. */ readOnly: boolean | undefined; /** * Whether the integer is write-only. */ writeOnly: boolean | undefined; /** * Whether the integer 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?: IntegerFields, 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'>): OasInteger; traverse(path: SchemaPath): OasSchema | OasRef<'schema'>; resolve(): OasInteger; resolveOnce(): OasInteger; toJsonSchema(options?: ToJsonSchemaOptions): OpenAPIV3.NonArraySchemaObject; }