import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { XrmQueryResult } from './xrm.service';
import { XrmContextService, Entity } from './xrmcontext.service';
import * as i0 from "@angular/core";
export declare class LabelMeta {
    Label: string;
    LanguageCode: number;
    IsManaged: boolean;
    MetadataId: string;
    HasChanged: boolean;
}
export declare class DisplayNameMeta {
    LocalizedLabels: LabelMeta[];
    UserLocalizedLabel: LabelMeta;
}
export declare class EntityMeta extends Entity {
    constructor();
    DisplayName: LabelMeta;
    LogicalName: string;
    ObjectTypeCode: number;
    SchemaName: string;
    LogicalCollectionName: string;
    IsActivity: boolean;
    IsActivityParty: boolean;
    Attributes: AttributeMeta[];
    OneToManyRelations: OneToManyRelationship[];
    ManyToManyRelations: ManyToManyRelationship[];
    meta(): EntityMeta;
}
export declare class AttributeMeta extends Entity {
    constructor();
    AttributeType: string;
    DisplayName: LabelMeta;
    LogicalName: string;
    Description: LabelMeta;
    SchemaName: string;
    selected: boolean;
    Lookup: LookupAttribute;
    onFetch(): void;
}
export declare class OneToManyRelationship {
    MetadataId: string;
    RelationshipType: number;
    SchemaName: string;
    ReferencedAttribute: string;
    ReferencingAttribute: string;
    ReferencedEntity: string;
    ReferencingEntity: string;
    ReferencingEntityNavigationPropertyName: string;
}
export declare class ManyToManyRelationship {
    MetadataId: string;
    Entity1LogicalName: string;
    Entity1NavigationPropertyName: string;
    Entity2LogicalName: string;
    Entity2NavigationPropertyName: string;
    SchemaName: string;
    RelationshipType: string;
    Other: string;
    OtherSchemaName: string;
    Entity1LogicalCollectionName: string;
    Entity2LogicalCollectionName: string;
}
export declare class LookupAttribute {
    Targets: string[];
    LogicalName: string;
    SchemaName: string;
}
export declare class AttributeOptionsetMeta {
    LogicalName: string | undefined;
    MetadataId: string | undefined;
    OptionSet: OptionSetMeta | undefined;
}
declare class OptionSetMeta {
    Options: OptionSetMetaValue[] | undefined;
}
declare class OptionSetMetaValue {
    Value: number | undefined;
    Label: OptionsetLabelMeta | undefined;
}
declare class OptionsetLabelMeta {
    UserLocalizedLabel: OptionsetLabel | undefined;
    LocalizedLabels: OptionsetLabel[] | undefined;
}
declare class OptionsetLabel {
    Label: string | undefined;
    LanguageCode: number | undefined;
    MetadataId: string | undefined;
}
export declare class XrmMetadataService {
    private http;
    private xrmService;
    private searchEntityMetaPrototype;
    private getEntityMetaPrototype;
    constructor(http: HttpClient, xrmService: XrmContextService);
    search(name: string): Observable<XrmQueryResult<EntityMeta>>;
    search(name: string, unique: boolean): Observable<XrmQueryResult<EntityMeta>>;
    get(id: string): Observable<EntityMeta>;
    getManyToManyRelationships(entity: EntityMeta): Observable<EntityMeta>;
    resolveRelationshipNames(relations: ManyToManyRelationship[]): void;
    getOneToManyRelationships(entity: EntityMeta): Observable<EntityMeta>;
    getLookup(entity: EntityMeta, attr: AttributeMeta): Observable<EntityMeta>;
    getPicklists(entity: EntityMeta): Observable<AttributeOptionsetMeta[]>;
    static ɵfac: i0.ɵɵFactoryDeclaration<XrmMetadataService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<XrmMetadataService>;
}
export {};
