/** @packageDocumentation * @module iTwinServiceClients */ /** @internal */ export declare type ConstructorType = new () => any; /** @internal */ export interface ClassKeyMapInfo { /** The key of the JSON property that stores the schema name - e.g., set to"schemaName" in the case of JSON consumed/supplied by WSG */ schemaPropertyName?: string; /** The key of the JSON property that stores the class name - e.g., set to "className" in the case of JSON consumed/supplied by WSG. */ classPropertyName?: string; /** The key of the JSON property that stores the "ECClassKey" - e.g., set to "className" in the case of JSON consumed/supplied by the ECDb API */ classKeyPropertyName?: string; } /** Manages the mapping between TypeScript and EC Classes/Properties * @internal */ export declare class ECJsonTypeMap { private static _classesByTypedName; private static readonly _negetadBracketRegex; private static readonly _relationshipDescriptorPairsInParanthesis; /** Gets an existing entry for a mapped class from the name of the TypeScript class */ private static getClassByType; /** Recursively gathers all class entries for base classes starting with the specified class */ private static gatherBaseClassEntries; private static addClassPlaceholder; /** Adds a new entry for a mapped class */ private static addClass; /** Adds a new entry for a mapped property */ private static addProperty; private static getRelationshipDesciptors; /** Create a typed instance from an untyped JSON ECInstance */ static fromJson(typedConstructor: new () => T, applicationKey: string, ecJsonInstance: any): T | undefined; /** Create an untyped instance from a typed instance */ static toJson(applicationKey: string, typedInstance: T): any | undefined; /** * Decorator function for mapping TypeScript classes to JSON * @param applicationKey Identifies the application for which the mapping is specified. e.g., "ecdb", "wsg", etc. * @param classKey Identifies the ec class backing the JSON instance. (e.g., "ServiceStore.Briefcase" (ecdb) or "iModelScope.Briefcase" (wsg)) * @param classKeyMapInfo Information on how the class key is persisted in the JSON instance (e.g., as two properties "schemaName" and "className") */ static classToJson(applicationKey: string, classKey: string, classKeyMapInfo: ClassKeyMapInfo): (typedConstructor: ConstructorType) => void; /** * Decorator function for mapping typescript properties to JSON * @param applicationKey Identifies the application for which the mapping is specified. e.g., "ecdb", "wsg", etc. * @param propertyAccessString Access string for the ECProperty */ static propertyToJson(applicationKey: string, propertyAccessString: string): (object: any, propertyKey: string) => void; } /** Base class for all typed instances mapped to ECInstance-s in an ECDb * @beta */ export declare abstract class ECInstance { ecId: string; [index: string]: any; } /** @beta */ export declare type ChangeState = "new" | "modified" | "deleted"; /** Base class for all typed instances mapped to ECInstance-s in both an ECDb, and the WSG repository * @beta */ export declare abstract class WsgInstance extends ECInstance { wsgId: string; eTag?: string; changeState?: ChangeState; } //# sourceMappingURL=ECJsonTypeMap.d.ts.map