Add an identity to the someone object and save it.
Retrieve all identities managed by this someone object except the main identity.
Return all descriptions from all profiles.
Optional
identity: SHA256IdHash<Person>Return all endpoints from all profiles.
Optional
identity: SHA256IdHash<Person>Create a new profile for a specific person.
Get the profile name from one of the default profiles.
It will first try to find the profile that we edited (I am owner). Then it will try to find the profile that the person itself edited (He is owner) Then it will look for a default profile from any owner.
This needs to be my own main identity, because profiles with this owner will supersede the other profiles.
Returns whether this model has data loaded.
If this returns false, then the 'hash', 'profileId' ... properties will throw when being accessed.
Get all identities managed by this someone object.
Load the latest someone version.
Retrieve the main identity by looking it up in the main profile.
Checks whether this identity is managed by this someone object.
Get the profiles managed by this someone object.
Optional
identity: SHA256IdHash<Person>Get the profiles managed by this someone object.
Note that this will return ProfileModel instances that have no data in them. You have to use loadLatestVersion on it in order to get the data.
Optional
identity: SHA256IdHash<Person>Get the profiles only for this identity. If not specified, get all profiles for all identities managed by this someone object.
Remove an identity to the someone object
Remove a profile to this someone object.
Save the someone to disk and load the latest version.
Why is there no pure save() function? The cause are crdts. The object that is eventually written to disk might differ from the current state of this instance. This happens when new data was received via chum since the last load. This means that we don't have a hash representing the current state.
Sets the main identity by guessing which profile to use as mainProfile
Set the main profile.
Throws if the identity referenced by this profile is not managed by this someone object.
Set the main profile only when the saved profile is not the main profile.
Throws if the identity referenced by this profile is not managed by this someone object.
Static
constructStatic
constructStatic
constructCreate a someone if it does not exist.
If you specify descriptions and / or endpoints here and a someone version already exists without those endpoints and / or descriptions it will add them again.
The latest version of the someone or an empty someone.
This class is a nicer frontend for the Someone recipe.
'Someone' is a collection of several person identities that belong the the same real person. Someone also collects all the profiles of those identities.
Reasons for not using the Someone recipe directly: