Repository for retrieving user information based on user identifier(s).

interface IUserInfoRepository {
    getUserInfo(id: string, type?: null | string): Promise<null | IUserInfo>;
    getUsersInfo(ids: string[], type?: null | string): Promise<IUserInfo[]>;
}

Methods

  • Retrieves user information for single user with specified identifier.

    Parameters

    • id: string

      The user identifier.

    • Optionaltype: null | string

      Optional user info handler type. If null, the default handler is used.

    Returns Promise<null | IUserInfo>

    User information or null user not found by identifier.

  • Retrieves user information for multiple users with specified identifiers.

    Parameters

    • ids: string[]

      A collection of the user identifiers.

    • Optionaltype: null | string

      Optional user info handler type. If null, the default handler is used.

    Returns Promise<IUserInfo[]>

    A collection of user information for users that are found.