UNPKG

@itwin/ecschema-rpcinterface-common

Version:

Schema RPC Interface common interface

32 lines 2.02 kB
import { ISchemaLocater, Schema, SchemaContext, SchemaInfo, SchemaKey, SchemaMatchType } from "@itwin/ecschema-metadata"; import { IModelRpcProps } from "@itwin/core-common"; /** * Defines a schema locater that retrieves schemas using an RPC interface. * @beta */ export declare class ECSchemaRpcLocater implements ISchemaLocater { readonly token: IModelRpcProps; constructor(token: IModelRpcProps); /** * Attempts to get a schema from the schema rpc locater. Yields undefined if no matching schema is found. * @param schemaKey Key to look up * @param matchType How to match key against candidate schemas * @param context The SchemaContext that will control the lifetime of the schema and holds the schema's references, if they exist. */ getSchema<T extends Schema>(schemaKey: Readonly<SchemaKey>, matchType: SchemaMatchType, context: SchemaContext): Promise<T | undefined>; /** * Gets the schema info which matches the provided SchemaKey. The schema info may be returned before the schema is fully loaded. * The fully loaded schema can be accessed via the schema context using the getCachedSchema method. * @param schemaKey The SchemaKey describing the schema to get from the cache. * @param matchType The match type to use when locating the schema */ getSchemaInfo(schemaKey: Readonly<SchemaKey>, matchType: SchemaMatchType, context: SchemaContext): Promise<SchemaInfo | undefined>; /** * Attempts to get a schema from the schema rpc locater. Yields undefined if no matching schema is found. * @param schemaKey Key to look up * @param matchType How to match key against candidate schemas * @param context The SchemaContext that will control the lifetime of the schema and holds the schema's references, if they exist. */ getSchemaSync<T extends Schema>(schemaKey: Readonly<SchemaKey>, matchType: SchemaMatchType, context: SchemaContext): T | undefined; } //# sourceMappingURL=ECSchemaRpcLocater.d.ts.map