import { IAPIModel, IAPIModelBuilder, IAPIModelRegistry, IAPIOperation, IAPIRequestModel, IAPIResponseModel, IAPIOperationInit } from './api'; import { ClientProps, IClientProps, IModelTypeConstraintFactory } from '@hn3000/metamodel'; import * as SwaggerSchema from 'swagger-schema-official'; export type FetchFun = (url: string) => Promise; export declare class Operation extends ClientProps implements IAPIOperation { constructor(initArg: IAPIOperationInit); init(initArg: IAPIOperationInit): void; get id(): string; get name(): string; get pathPattern(): string; get method(): string; get requestModel(): IAPIRequestModel; get responseModel(): IAPIResponseModel; path(req: Req): string; query(req: Req): string; body(req: any): undefined | string; headers(req: any): { [key: string]: string; }; private _buildParamRenderer; private _id; private _name; private _method; private _pathPattern; private _pathTemplate; private _paramRenderers; private _requestModel; private _responseModel; } export declare class APIModelInternal extends ClientProps implements IAPIModel { constructor(id: string, operations: ReadonlyArray>, base: string, props?: IClientProps | any); subModel(keys: string[]): APIModelInternal; operations(): readonly IAPIOperation[]; operationById(id: string): IAPIOperation; setBase(base: string): void; get base(): string; get id(): string; private _id; private _base; protected _operations: readonly IAPIOperation[] | undefined; protected _operationsById: { [id: string]: IAPIOperation; }; } export declare class APIModel extends APIModelInternal implements IAPIModel, IAPIModelBuilder { constructor(id: string, operations: ReadonlyArray>, base: string, props?: IClientProps | any); subModel(keys: string[]): APIModel; operations(): readonly IAPIOperation[]; freeze(): IAPIModel; add(op: IAPIOperation): this; remove(it: string | IAPIOperation): this; } export declare class APIModelRegistry implements IAPIModelRegistry { constructor(fetchFun?: FetchFun, constraintFactory?: IModelTypeConstraintFactory); private parseParameterType; private parseApiKeyType; private parseSecurityTypes; parseAPIDefinition(specWithRefs: SwaggerSchema.Spec, id: string): IAPIModel; fetchModel(url: string, id: string): Promise; model(id: string): IAPIModel; private _modelById; private _schemas; private _jsonRefProcessor; private _fetchFun; }