@opra/common
Version:
Opra common package
28 lines (27 loc) • 1.17 kB
TypeScript
import type { StrictOmit, Type } from 'ts-gems';
import { ResponsiveMap } from '../../helpers/index.js';
import { OpraSchema } from '../../schema/index.js';
import type { ApiDocument } from '../api-document';
import { ApiBase } from '../common/api-base.js';
import { RpcController } from './rpc-controller.js';
import { RpcOperation } from './rpc-operation.js';
export declare namespace RpcApi {
interface InitArguments extends ApiBase.InitArguments, StrictOmit<OpraSchema.RpcApi, 'controllers'> {
}
}
/**
* @class RpcApi
*/
export declare class RpcApi extends ApiBase {
protected _controllerReverseMap: WeakMap<Type, RpcController | null>;
readonly owner: ApiDocument;
readonly transport = "rpc";
platform: string;
controllers: ResponsiveMap<RpcController>;
constructor(init: RpcApi.InitArguments);
findController(controller: Type): RpcController | undefined;
findController(name: string): RpcController | undefined;
findOperation(controller: Type, operationName: string): RpcOperation | undefined;
findOperation(controllerName: string, operationName: string): RpcOperation | undefined;
toJSON(): OpraSchema.RpcApi;
}