@refinio/one.models
    Preparing search index...

    Leute data structure:

    • Someone Used as a container for identities and profiles. Usually querryed by identity (personId). There is a Model for managing the someone easier.
    • Profile A profile is always linked to an identity. There aways is at least one profile, considered the main/default profile. The profile contains/could contain an identity's name, picture, email, birthday, etc, known as PersonDescriptions. .owner is the one who created it, while .personId is the identity of the profile. There is a Model for managing the profile easier.
    • Identity (also called a Person/personId) A identity is always linked to a someone. There aways is at least one identity per someone, considered the main identity. Most data in One is linked to an identity (personId), the one who creates it. A identity can have multiple profiles, for example a main and a work profile.
    • Group A group is a collection of identities (persons) A identity (person) can be part of multiple groups. A group can be in the leute list or external to the leute list. There is a Model for managing the group easier.

    Implements

    Index

    Constructors

    Methods

    • Add a new group to the leute list. Note: a group can be external to the leute list.

      Parameters

      • name: string

        The name of the group. Note: could be an existing group name, otherwise a new group will be created.

      Returns Promise<default>

      The new group.

    • Create a new identity for someone.

      Parameters

      • someoneId: SHA256IdHash<Someone>

        The someone to create the identity for.

      • Optionalemail: string

        The email of the identity.

      Returns Promise<default>

      The new identity.

    • Create a new profile for a person.

      Parameters

      • personId: SHA256IdHash<Person>

        The person to create the profile for.

      Returns Promise<default>

      The new profile.

    • Get everyone else except the current user.

      Returns Promise<default[]>

      Everyone else except the current user.

    • Get everyone else except the current user and the person with the given personId.

      Parameters

      • personId: SHA256IdHash<Person>

        The person to exclude.

      Returns Promise<default[]>

      Everyone else except the current user and the person with the given personId.

    • Get everyone else except the initial peers.

      Returns Promise<default[]>

      Everyone else except the initial peers.

    • Get the person information of everyone else.

      Returns Promise<PersonInfo[]>

      The person information of everyone else.

    • Get a group by name.

      Parameters

      • groupName: string

        The name of the group.

      Returns Promise<default>

      The group.

    • Get the members of a group.

      Parameters

      • groupName: string

        The name of the group.

      Returns Promise<{ name: string; personId: SHA256IdHash<Person> }[]>

      An array of objects with the personId and the name of the person.

    • Get the main profile of a person.

      Parameters

      • personId: SHA256IdHash<Person>

        The person to get the main profile of.

      Returns Promise<default>

      The main profile of the person.

      If the person is not found.

    • Get the main identity of the current user.

      Returns Promise<SHA256IdHash<Person>>

      The main identity of the current user.

    • Get the main profile of the current user.

      Returns Promise<default>

      The main profile of the current user.

    • Get the email of a person.

      Parameters

      • personId: SHA256IdHash<Person>

        The person to get the email of.

      Returns Promise<undefined | string>

      The email of the person.

    • Get the person information.

      Parameters

      • personId: SHA256IdHash<Person>

        The person to get.

      Returns Promise<PersonInfo>

      The person information.

    • Get the name of a person.

      Parameters

      • personId: SHA256IdHash<Person>

        The person to get the name of.

      Returns string

      The name of the person.

    • Get the profile picture of a person.

      Parameters

      • personId: SHA256IdHash<Person>

        The person to get the picture of.

      Returns Promise<undefined | ProfileImage>

      The picture of the person or undefined if no picture is found.

    • Get the pictures of a person.

      Parameters

      • personId: SHA256IdHash<Person>

        The person to get the pictures of.

      Returns Promise<ProfileImage[]>

      The pictures of the person.

    • Get the picture of a profile.

      Parameters

      • profileId: SHA256IdHash<Profile>

        The profile to get the picture of.

      Returns Promise<undefined | ProfileImage>

      The picture of the profile or undefined if no picture is found.

    • Get the profiles of a person/someone.

      Parameters

      • personId: SHA256IdHash<Person>

        The personId of the someone.

      • all: boolean = false

        If true, get all profiles to the someone, otherwise get only the personId profile.

      Returns Promise<default[]>

      The profiles of the person/someone.

    • Get the identities of a someone.

      Parameters

      • personId: SHA256IdHash<Person>

        The personId of the someone.

      Returns Promise<SHA256IdHash<Person>[]>

      The identities of the someone.

    • Remove a person you know.

      Parameters

      • someoneId: SHA256IdHash<Someone>

        The someone to remove.

      Returns Promise<void>