import type { Type } from 'ts-gems'; import { ResponsiveMap } from '../helpers/index.js'; import { OpraSchema } from '../schema/index.js'; import { DataTypeMap } from './common/data-type-map.js'; import { DocumentElement } from './common/document-element.js'; import { kTypeNSMap } from './constants.js'; import { DataType } from './data-type/data-type.js'; import type { EnumType } from './data-type/enum-type.js'; import { HttpApi } from './http/http-api.js'; import { MQApi } from './mq/mq-api.js'; import { WSApi } from './ws/ws-api.js'; /** * * @class ApiDocument */ export declare class ApiDocument extends DocumentElement { protected [kTypeNSMap]: WeakMap; readonly id: string; url?: string; info: OpraSchema.DocumentInfo; references: ResponsiveMap; types: DataTypeMap; api?: HttpApi | MQApi | WSApi; constructor(); /** * Returns NS of datatype. Returns undefined if not found * @param nameOrCtor */ getDataTypeNs(nameOrCtor: string | Type | Function | EnumType.EnumArray | EnumType.EnumObject | DataType): string | undefined; findDocument(id: string): ApiDocument | undefined; get httpApi(): HttpApi | undefined; get mqApi(): MQApi | undefined; get wsApi(): WSApi | undefined; getHttpApi(): HttpApi; getMqApi(): MQApi; getWsApi(): WSApi; toJSON(): OpraSchema.ApiDocument; /** * Export as Opra schema definition object */ export(options?: ApiDocument.ExportOptions): OpraSchema.ApiDocument; invalidate(): void; protected _findDataType(nameOrCtor: string | Type | Function | EnumType.EnumArray | EnumType.EnumObject, scope?: string, visitedRefs?: WeakMap): DataType | undefined; } export declare namespace ApiDocument { interface ExportOptions { scope?: string; } }