@itwin/ecschema-rpcinterface-impl
Version:
Schema RPC Interface backend implementation
36 lines • 1.81 kB
TypeScript
import { IModelRpcProps, RpcInterface } from "@itwin/core-common";
import { SchemaKeyProps, SchemaProps } from "@itwin/ecschema-metadata";
import { ECSchemaRpcInterface } from "@itwin/ecschema-rpcinterface-common";
/**
* Implementation of the SchemaRpcInterface.
* @internal
*/
export declare class ECSchemaRpcImpl extends RpcInterface implements ECSchemaRpcInterface {
/**
* Registers the RPC interface with its corresponding implementation class.
*/
static register(): void;
/**
* Gets an iModelDb instance. It is important that the database has been opened before
* otherwise it can't be found.
* @param tokenProps The iModelToken props that hold the information which iModel is used.
* @returns Instance of IModelDb.
*/
private getIModelDatabase;
/**
* Returns an array of SchemaKeyProps that exists in the current iModel context. The client can call
* SchemaKey.fromJson() to parse the props to a SchemaKey.
* @param tokenProps The iModelToken props that hold the information which iModel is used.
* @returns An array of SchemaKeyProps.
*/
getSchemaKeys(tokenProps: IModelRpcProps): Promise<SchemaKeyProps[]>;
/**
* Gets the schema JSON for the current iModel context and returns the schema as a SchemaProps which
* the client can call Schema.fromJson() to return a Schema.
* @param tokenProps The iModelToken props that hold the information which iModel is used.
* @param schemaName The name of the schema that shall be returned.
* @returns The SchemaProps.
*/
getSchemaJSON(tokenProps: IModelRpcProps, schemaName: string): Promise<SchemaProps | undefined>;
}
//# sourceMappingURL=ECSchemaRpcImpl.d.ts.map