import { BasicNode } from './BasicNode'; import { Discriminator } from './Discriminator'; import { ExternalDocumentation } from './ExternalDocumentation'; import { XML } from './XML'; import type { SchemaCreateArrayOptions, CreateOrSetSchemaOptions, CreateSchemaOptions, SchemaFormat, SchemaModel, SchemaModelFactory, SchemaModelParent, CreateSchemaPropertyOptions, SchemaPropertyObject, SchemaType } from './types'; import type { CommonMarkString, JSONValue, Nullable, URLString } from '@fresha/api-tools-core'; export declare const isSchemaModel: (obj: unknown) => obj is SchemaModel; export declare const isSchemaModelType: (obj: unknown) => obj is { type: SchemaModel; }; /** * @see http://spec.openapis.org/oas/v3.0.3#schema-object */ export declare class Schema extends BasicNode implements SchemaModel { #private; static create(parent: SchemaModelParent, params?: CreateSchemaOptions): Schema; static createOrGet(parent: SchemaModel, options: CreateOrSetSchemaOptions): Schema; static createArray(parent: SchemaModelParent, options: SchemaCreateArrayOptions): Schema; static createObject(parent: SchemaModelParent, props: Record): Schema; constructor(parent: SchemaModelParent); get title(): Nullable; set title(value: Nullable); get multipleOf(): Nullable; set multipleOf(value: Nullable); get maximum(): Nullable; set maximum(value: Nullable); get exclusiveMaximum(): boolean; set exclusiveMaximum(value: boolean); get minimum(): Nullable; set minimum(value: Nullable); get exclusiveMinimum(): boolean; set exclusiveMinimum(value: boolean); get minLength(): Nullable; set minLength(value: Nullable); get maxLength(): Nullable; set maxLength(value: Nullable); get pattern(): Nullable; set pattern(value: Nullable); get maxItems(): Nullable; set maxItems(value: Nullable); get minItems(): Nullable; set minItems(value: Nullable); get uniqueItems(): boolean; set uniqueItems(value: boolean); get maxProperties(): Nullable; set maxProperties(value: Nullable); get minProperties(): Nullable; set minProperties(value: Nullable); get allowedValueCount(): number; allowedValues(): IterableIterator; allowedValueAt(index: number): JSONValue; hasAllowedValue(value: JSONValue): boolean; addAllowedValues(...values: JSONValue[]): void; deleteAllowedValueAt(index: number): void; deleteAllowedValues(...values: JSONValue[]): void; clearAllowedValues(): void; get type(): Nullable; set type(value: Nullable); get not(): Nullable; setNot(params: CreateOrSetSchemaOptions): Schema; deleteNot(): void; get additionalProperties(): Nullable; setAdditionalProperties(value: boolean): boolean; setAdditionalProperties(params: CreateOrSetSchemaOptions): Schema; deleteAdditionalProperties(): void; get description(): Nullable; set description(value: Nullable); get format(): Nullable; set format(value: Nullable); get default(): Nullable; set default(value: Nullable); get nullable(): boolean; set nullable(value: boolean); get discriminator(): Nullable; setDiscriminator(propertyName: string): Discriminator; deleteDiscriminator(): void; get readOnly(): boolean; set readOnly(value: boolean); get writeOnly(): boolean; set writeOnly(value: boolean); get example(): Nullable; set example(value: Nullable); get deprecated(): boolean; set deprecated(value: boolean); isComposite(): boolean; isNull(): boolean; isNullish(): boolean; isTuple(): boolean; get propertyCount(): number; propertyNames(): IterableIterator; properties(): IterableIterator<[string, Schema]>; hasProperty(name: string): boolean; getProperties(): IterableIterator; getProperty(name: string): Schema | undefined; getPropertyOrThrow(name: string): Schema; hasPropertiesDeep(): boolean; getPropertiesDeep(): IterableIterator; getPropertyDeep(name: string): Schema | undefined; getPropertyDeepOrThrow(name: string): Schema; setProperty(name: string, params: CreateSchemaPropertyOptions): Schema; setProperties(props: Record): Schema; deleteProperty(name: string): void; clearProperties(): void; get requiredPropertyCount(): number; requiredPropertyNames(): IterableIterator; requiredProperties(): IterableIterator<[string, Schema]>; isPropertyRequired(name: string): boolean; setPropertyRequired(name: string, value: boolean): void; get items(): Nullable; setItems(options: CreateOrSetSchemaOptions): Schema; deleteItems(): void; get allOfCount(): number; allOf(): IterableIterator; allOfAt(index: number): Schema; addAllOf(typeOrSchema: CreateOrSetSchemaOptions): Schema; deleteAllOfAt(index: number): void; clearAllOf(): void; get oneOfCount(): number; oneOf(): IterableIterator; oneOfAt(index: number): Schema; addOneOf(typeOrSchema: CreateOrSetSchemaOptions): Schema; deleteOneOfAt(index: number): void; clearOneOf(): void; get anyOfCount(): number; anyOf(): IterableIterator; anyOfAt(index: number): Schema; addAnyOf(typeOrSchema: CreateOrSetSchemaOptions): Schema; deleteAnyOfAt(index: number): void; clearAnyOf(): void; arrayOf(parent: SchemaModelParent): Schema; get xml(): Nullable; setXML(): XML; deleteXML(): void; get externalDocs(): Nullable; setExternalDocs(url: URLString): ExternalDocumentation; deleteExternalDocs(): void; } export declare const SchemaFactory: SchemaModelFactory; //# sourceMappingURL=Schema.d.ts.map