interface IProfileApi {
    baseUrl: string;
    http: HttpClient;
    rest: RestClient;
    userAgent: string;
    vsoClient: VsoClient;
    createAcceptHeader(type: string, apiVersion?: string): string;
    createProfile(
        createProfileContext: CreateProfileContext,
        autoCreate?: boolean,
    ): Promise<Profile>;
    createRequestOptions(type: string, apiVersion?: string): IRequestOptions;
    deleteProfileAttribute(id: string, descriptor: string): Promise<void>;
    formatResponse(
        data: any,
        responseTypeMetadata: any,
        isCollection: boolean,
    ): any;
    getAvatar(id: string, size?: string, format?: string): Promise<Avatar>;
    getAvatarPreview(
        container: any,
        id: string,
        size?: string,
        format?: string,
        displayName?: string,
    ): Promise<Avatar>;
    getGeoRegion(ipaddress: string): Promise<GeoRegion>;
    getProfile(
        id: string,
        details?: boolean,
        withAttributes?: boolean,
        partition?: string,
        coreAttributes?: string,
        forceRefresh?: boolean,
    ): Promise<Profile>;
    getProfileAttribute(
        id: string,
        descriptor: string,
    ): Promise<ProfileAttribute>;
    getProfileAttributes(
        id: string,
        partition: string,
        modifiedSince?: string,
        modifiedAfterRevision?: string,
        withCoreAttributes?: boolean,
        coreAttributes?: string,
    ): Promise<ProfileAttribute[]>;
    getRegions(): Promise<ProfileRegions>;
    getSupportedLcids(): Promise<string[]>;
    getUserDefaults(includeAvatar?: boolean): Promise<Profile>;
    refreshUserDefaults(id: string): Promise<Profile>;
    resetAvatar(id: string): Promise<void>;
    setAvatar(container: any, id: string): Promise<void>;
    setProfileAttribute(
        container: any,
        id: string,
        descriptor: string,
    ): Promise<void>;
    setProfileAttributes(
        attributesCollection: VssJsonCollectionWrapperV<
            ProfileAttributeBase<any>[],
        >,
        id: string,
    ): Promise<void>;
    updateProfile(profile: Profile, id: string): Promise<void>;
}

Hierarchy (View Summary)

Implemented by

Properties

baseUrl: string
http: HttpClient
rest: RestClient
userAgent: string
vsoClient: VsoClient

Methods

  • Parameters

    • container: any
    • id: string
    • Optionalsize: string
    • Optionalformat: string
    • OptionaldisplayName: string

    Returns Promise<Avatar>

  • Parameters

    • id: string
    • Optionaldetails: boolean
    • OptionalwithAttributes: boolean
    • Optionalpartition: string
    • OptionalcoreAttributes: string
    • OptionalforceRefresh: boolean

    Returns Promise<Profile>

  • Parameters

    • id: string
    • partition: string
    • OptionalmodifiedSince: string
    • OptionalmodifiedAfterRevision: string
    • OptionalwithCoreAttributes: boolean
    • OptionalcoreAttributes: string

    Returns Promise<ProfileAttribute[]>