Qworum domain model
A JavaScript library that defines how Qworum applications deal with the end-users.
Chief among the concepts defined and/or supported here are:
- The 𝐏𝐞𝐫𝐬𝐨𝐧𝐚, consisting of a 𝐆𝐫𝐨𝐮𝐩 and a 𝐔𝐬𝐞𝐫 who is acting on behalf of the group.
- 𝐏𝐚𝐫𝐭𝐧𝐞𝐫𝐬𝐡𝐢𝐩s between groups, through which multiple groups can merge into a single virtual group, thereby facilitating cross-team and cross-org scenarios.
- 𝐑𝐨𝐥𝐞s which are used by group memberships managers for defining what the users are permitted to do when using an application on behalf of a particular group. Roles are also used by partnership managers to define what a group is allowed to do within a partnership; in this case the group roles are a mask over the roles of the group's users.
- A group-centric model of data ownership, where the group owns the data produced within a Qworum application or service, rather than the end-user.
🏷 𝗘𝘅𝗮𝗺𝗽𝗹𝗲 How to create a user.
// The user is created in-memory, without publishing it to the global Qworum database.
import {
User, UserId, GroupId, Password, PasswordId
} from 'https://esm.sh/gh/doga/qworum-domain-model@0.35.0/mod.mjs';
const user = User.create();
user; // a User instance
user.userId; // a UserId instance
user.password; // a Password instance
user.password.passwordId; // a PasswordId instance
user.personalGroupId; // a GroupId instance
🏷 𝗘𝘅𝗮𝗺𝗽𝗹𝗲 How to create a group of users.
// The group is created in-memory, without publishing it to the global Qworum database.
import {
Group, GroupId, OrgId, UserId, UserIdSet
} from 'https://esm.sh/gh/doga/qworum-domain-model@0.35.0/mod.mjs';
const
ownerIds = new UserIdSet().add(UserId.uuid()).add(UserId.uuid()),
orgId = OrgId.uuid(),
parentGroupId = GroupId.uuid(),
// Create the group with a random groupId.
group = new Group({
orgId, parentGroupId,
ownerIds,
subgroupsManagerIds : ownerIds,
partnershipsManagersIds: ownerIds,
membershipsManagerIds : ownerIds,
memberIds : ownerIds
});
🏷 𝗘𝘅𝗮𝗺𝗽𝗹𝗲 How to create a partnership between groups.
// The partnership is created in-memory, without publishing it to the global Qworum database.
import {
Partnership, PartnershipId, GroupId
} from 'https://esm.sh/gh/doga/qworum-domain-model@0.35.0/mod.mjs';
const
ownerId = GroupId.uuid(),
memberIds = new GroupIdSet().add(ownerId).add(GroupId.uuid()).add(GroupId.uuid()),
// Create the partnership with a random partnershipId.
partnership = new Partnership({ ownerId, memberIds });
🏷 𝗦𝗲𝗲
🏷 𝗦𝗲𝗲
class Address
constructor(address)
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
get countryName
get locality
get postalCode
get streetAddress
class DataUrl extends URL
constructor(dataUrl)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataUrl: string
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
get base64Content
static build(data)
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
get contentType
class Email
constructor(emailUrl, types)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 emailUrl: EmailUrl
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 types: (Types | null | undefined)
get emailUrl
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 EmailUrl
get types
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Types
class EmailUrl extends URL
constructor(emailUrl)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 emailUrl: string
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static build(info)
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
get emailAddress
class Group
constructor(group)
Creates a group in memory.
For personal groups, the 𝚘𝚠𝚗𝚎𝚛𝙸𝚍𝚜 array must contain one 𝚄𝚜𝚎𝚛𝙸𝚍, and 𝚒𝚜𝙿𝚎𝚛𝚜𝚘𝚗𝚊𝚕𝙶𝚛𝚘𝚞𝚙 must be truthy and these fields must be omitted: 𝚘𝚛𝚐𝙸𝚍, 𝚙𝚊𝚛𝚎𝚗𝚝𝙶𝚛𝚘𝚞𝚙𝙸𝚍, 𝚜𝚞𝚋𝚐𝚛𝚘𝚞𝚙𝚜𝙼𝚊𝚗𝚊𝚐𝚎𝚛𝙸𝚍𝚜. If these fields are omitted for personal group, then they will be set to 𝚘𝚠𝚗𝚎𝚛𝙸𝚍𝚜: 𝚙𝚊𝚛𝚝𝚗𝚎𝚛𝚜𝚑𝚒𝚙𝚜𝙼𝚊𝚗𝚊𝚐𝚎𝚛𝙸𝚍𝚜, 𝚖𝚎𝚖𝚋𝚎𝚛𝚜𝚑𝚒𝚙𝚜𝙼𝚊𝚗𝚊𝚐𝚎𝚛𝙸𝚍𝚜.
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
equals(other)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 other: *
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get groupId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupId
hasManagers(userIds)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 userIds: (UserId | UserIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
hasMembers(userIds)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 userIds: (UserId | UserIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
hasMembershipsManagers(userIds)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 userIds: (UserId | UserIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
hasOwners(userIds)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 userIds: (UserId | UserIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
hasParticipants(userIds)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 userIds: (UserId | UserIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
hasPartnershipManagers(userIds)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 userIds: (UserId | UserIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
hasSubgroupsManagers(userIds)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 userIds: (UserId | UserIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get isPersonalGroup
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get managerIds
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
get memberIds
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
get membersHaveAllRolesByDefault
A flag indicating whether the group members have all roles in all rolesets by default. This flag is set by memberships managers.
Here is a detailed explanation of how this flag is used. When a Qworum service checks whether the end-user has role R1 in roleset RS1, there are several possibilities:
- The memberships manager has explicity assigned R1 to the end-user, in which case the end-user has all the permissions associated with R1.
- The memberships manager hasn't explicity assigned R1 to the end-user, but has assigned at least one other role from RS1; in this case the end-user does not have the role R1. Keep in mind: the permissions that a particular Qworum service associates with R1 and R2 may have overlaps.
- The memberships manager hasn't explicity assigned R1 to the end-user, and hasn't assigned any other role from RS1 either. The memberships manager was probably unaware of the existence of the roleset. A decision must nevertheless must be taken, and that's exactly the purpose of this boolean flag: the end-user is implicitly assigned the role R1 only if this flag is set to 𝚝𝚛𝚞𝚎.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get membershipsManagerIds
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
get orgId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 OrgId
get ownerIds
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
get parentGroupId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupId
get participantIds
Returns the set of all owners, managers and members
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
get partnershipId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 PartnershipId
set partnershipId
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 value: PartnershipId
get partnershipsManagerIds
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Group[]
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (Group|null)
🏷 𝗦𝗲𝗲
get subgroupsManagerIds
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
toDataset()
Writes this object to a new RDF dataset.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 object
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 Error
🏷 𝗦𝗲𝗲
writeTo(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
class GroupId extends Id
constructor(idString)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idString: string
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static create(bareId)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 bareId: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupId
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupId[]
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (GroupId|null)
toDataset()
static uuid()
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupId
writeTo(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
class GroupIdSet
A 𝐆𝐫𝐨𝐮𝐩𝐈𝐝 set.
add(ids)
Returns this id set for call-chaining purposes.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 ids: (GroupId | GroupId[] | GroupIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupIdSet
clear()
Empties the set.
clone()
Returns a new GroupIdSet that has the same members as this one.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupIdSet
has(id)
Returns true if the set contains 𝐢𝐝.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 id: GroupId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
intersection(idSet)
Returns a new GroupIdSet that is the intersection of this set and the arg set.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idSet: GroupIdSet
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupIdSet
isDisjointFrom(idSet)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idSet: GroupIdSet
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get isEmpty
🏷 𝗧𝘆𝗽𝗲 boolean
isSameAs(idSet)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idSet: GroupIdSet
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
isSubsetOf(idSet)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idSet: GroupIdSet
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
isSupersetOf(idSet)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idSet: GroupIdSet
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get length
🏷 𝗧𝘆𝗽𝗲 number
get members
🏷 𝗧𝘆𝗽𝗲 GroupId[]
remove(ids)
Returns this id set for call-chaining purposes.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 ids: (GroupId | GroupId[] | GroupIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupIdSet
get size
🏷 𝗧𝘆𝗽𝗲 number
symmetricDifference(idSet)
Returns a new GroupIdSet that contains ids contained in this set or the arg set but not both.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idSet: GroupIdSet
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupIdSet
union(idSet)
Returns a new GroupIdSet that is the union of this set and the arg set.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idSet: GroupIdSet
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupIdSet
class GroupVcard extends Vcard
Vcard for organisations.
constructor(ownerId, vcard)
Creates a Vcard object.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 ownerId: Id
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static fromString(ownerId, vcardText)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 ownerId: Id
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 vcardText: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupVcard
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupVcard[]
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (GroupVcard|null)
🏷 𝗦𝗲𝗲
class I18nText
Text that is available in several languages.
getLangs()
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Language[]
getText(lang)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 lang: Language
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (string | null)
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
setText(text, lang)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 text: string
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 lang: Language
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 I18nText
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
class Id extends URN
constructor(idString)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idString: string
bareId
Instance property.
🏷 𝗧𝘆𝗽𝗲 string
idType
Instance property.
🏷 𝗧𝘆𝗽𝗲 string
static create(idType, bareId)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idType: string
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 bareId: (string | string[])
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Id
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readFrom(dataset, rdfType)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 rdfType: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Id[]
🏷 𝗦𝗲𝗲
static readOneFrom(dataset, rdfType)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 rdfType: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (Id|null)
🏷 𝗦𝗲𝗲
toDataset(rdfType)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 rdfType: string
🏷 𝗦𝗲𝗲
static uuid(idType)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idType: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Id
writeTo(dataset, rdfType)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 rdfType: string
🏷 𝗦𝗲𝗲
class IndividualVcard extends Vcard
Vcard for individuals (as in "people").
constructor(ownerId, vcard)
Creates a Vcard object.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 ownerId: Id
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static fromString(ownerId, vcardText)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 ownerId: Id
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 vcardText: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 IndividualVcard
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 IndividualVcard[]
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (IndividualVcard|null)
🏷 𝗦𝗲𝗲
class Membership
An annotation on a group membership that restricts it and defines it more precisely.
constructor(membership)
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
equals(other)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 other: *
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get groupId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupId
get membershipId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 MembershipId
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Membership[]
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
🏷 𝗦𝗲𝗲
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (Membership|null)
🏷 𝗦𝗲𝗲
get roleIds
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 IRL[]
toDataset()
Writes this object to a new RDF dataset.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 object
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 Error
🏷 𝗦𝗲𝗲
get userId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserId
writeTo(dataset)
Writes the membership to an RDF dataset.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 Error
🏷 𝗦𝗲𝗲
class MembershipId extends Id
constructor(idString)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idString: string
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static create(bareId)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 bareId: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 MembershipId
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 MembershipId[]
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (MembershipId|null)
toDataset()
static uuid()
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 MembershipId
writeTo(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
class Name
Name for an individual.
constructor(name)
Creates a name object for an individual.
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
get additionalNames
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 string[]
get familyNames
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 string[]
get givenNames
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 string[]
get honorificPrefixes
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 string[]
get honorificSuffixes
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 string[]
toString()
class Org
Represents an organisation. Has managers and members. Can contain top-level groups. The members of each top-level group is a subset of the org members.
🏷 𝗦𝗲𝗲
constructor(org)
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
equals(other)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 other: *
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get groupsManagerIds
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
hasGroupsManagers(userIds)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 userIds: (UserId | UserIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
hasManagers(userIds)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 userIds: (UserId | UserIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
hasMembers(userIds)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 userIds: (UserId | UserIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
hasMembershipsManagers(userIds)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 userIds: (UserId | UserIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
hasOwners(userIds)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 userIds: (UserId | UserIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
hasParticipants(userIds)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 userIds: (UserId | UserIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get managerIds
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
get memberIds
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
get membershipsManagerIds
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
get orgId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 OrgId
get ownerIds
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
get participantIds
Returns the set of all owners, managers and members
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Org[]
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (Org|null)
🏷 𝗦𝗲𝗲
toDataset()
Writes this object to a new RDF dataset.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 object
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 Error
🏷 𝗦𝗲𝗲
writeTo(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
class OrgId extends Id
constructor(idString)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idString: string
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static create(bareId)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 bareId: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 OrgId
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 OrgId[]
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (OrgId|null)
toDataset()
static uuid()
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 OrgId
writeTo(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
class OrgVcard extends Vcard
Vcard for organisations.
constructor(ownerId, vcard)
Creates a Vcard object.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 ownerId: Id
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static fromString(ownerId, vcardText)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 ownerId: Id
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 vcardText: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 OrgVcard
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 OrgVcard[]
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (OrgVcard|null)
🏷 𝗦𝗲𝗲
class Partnership
constructor(partnership)
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
equals(other)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 other: *
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
hasMembers(groupIds)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 groupIds: (GroupId | GroupIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
hasParticipants(groupIds)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 groupIds: (GroupId | GroupIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get memberIds
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupIdSet
get membersHaveAllRolesByDefault
A flag indicating whether the partnership members have all roles in all rolesets by default. This flag is set by the group which owns the partnership (more precisely, by a partnerships manager who is acting on behalf of the owner group).
For an in-depth explanation of how roles work, see 𝐆𝐫𝐨𝐮𝐩#𝐦𝐞𝐦𝐛𝐞𝐫𝐬𝐇𝐚𝐯𝐞𝐀𝐥𝐥𝐑𝐨𝐥𝐞𝐬𝐁𝐲𝐃𝐞𝐟𝐚𝐮𝐥𝐭.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get ownerId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupId
get participantIds
Returns a set containing the owner group and the member groups.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupIdSet
get partnershipId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 PartnershipId
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Partnership[]
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
🏷 𝗦𝗲𝗲
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (Partnership|null)
🏷 𝗦𝗲𝗲
toDataset()
Writes this object to a new RDF dataset.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 object
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 Error
🏷 𝗦𝗲𝗲
writeTo(dataset)
Writes the partnership to an RDF dataset.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 Error
🏷 𝗦𝗲𝗲
class PartnershipId extends Id
constructor(idString)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idString: string
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static create(bareId)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 bareId: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 PartnershipId
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 PartnershipId[]
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (PartnershipId|null)
toDataset()
static uuid()
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 PartnershipId
writeTo(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
class PartnershipMembership
An annotation on a partnership membership that restricts it and defines it more precisely.
constructor(partnershipMembership)
To remove all permissions from the group, set roleIds to an empty group.
If roleIds is undefined, by default the group has full permissions.
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
equals(other)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 other: *
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get groupId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupId
get partnershipId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 PartnershipId
get partnershipMembershipId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 PartnershipMembershipId
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 PartnershipMembership[]
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
🏷 𝗦𝗲𝗲
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (PartnershipMembership|null)
🏷 𝗦𝗲𝗲
get roleIds
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 IRL[]
toDataset()
Writes this object to a new RDF dataset.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 object
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 Error
🏷 𝗦𝗲𝗲
writeTo(dataset)
Writes the partnership membership to an RDF dataset.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 Error
🏷 𝗦𝗲𝗲
class PartnershipMembershipId extends Id
constructor(idString)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idString: string
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static create(bareId)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 bareId: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 PartnershipMembershipId
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 PartnershipMembershipId[]
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (PartnershipMembershipId|null)
toDataset()
static uuid()
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 PartnershipMembershipId
writeTo(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
class Password
constructor(passwordId, passwordCleartext)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 passwordId: IRI
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 passwordCleartext: string
passwordCleartext
Instance property.
🏷 𝗧𝘆𝗽𝗲 string
equals(other)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 other: *
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get passwordId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 IRI
toString()
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 string
class PasswordId extends Id
constructor(idString)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idString: string
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static forUser(userId)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 userId: UserId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 PasswordId
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
class Persona
Represents a persona in a Qworum session; its basic purpose is to identify the 𝐆𝐫𝐨𝐮𝐩+𝐔𝐬𝐞𝐫 pair who is using the Qworum application and services in a session. It contains:
- The 𝐆𝐫𝐨𝐮𝐩𝐈𝐝 of the group that the end-user is acting on behalf of.
- The 𝐔𝐬𝐞𝐫𝐈𝐝 of the user.
- The 𝐆𝐫𝐨𝐮𝐩𝐈𝐝s of the groups that the group is partnering with, if any.
- The 𝐑𝐨𝐥𝐞s assigned to the user within the group.
- The roles assigned to the group within the 𝐏𝐚𝐫𝐭𝐧𝐞𝐫𝐬𝐡𝐢𝐩, if any.
- The 𝐕𝐜𝐚𝐫𝐝s of the user and the group.
- A method that decides whether a user has been assigned a certain role.
constructor(persona)
Creates a persona object.
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
get groupHasAllRolesByDefault
This flag is used by 𝐏𝐞𝐫𝐬𝐨𝐧𝐚#𝐡𝐚𝐬𝐑𝐨𝐥𝐞 for deciding whether the group has a certain role, in cases where the outcome would have been undecidable otherwise, such as when the role belongs to an unknown roleset RS1 (i.e. when none of the roles in 𝐏𝐞𝐫𝐬𝐨𝐧𝐚#𝐠𝐫𝐨𝐮𝐩𝐑𝐨𝐥𝐞𝐈𝐝𝐬 belong to RS1).
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get groupId
Identifies the group that the user is acting on behalf of.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupId
get groupRoleIds
Defines the set of roles that the user is allowed to have when acting on behalf of a group that is in a partnership. In other words, this is a mask for user's roles. This property is ignored if the group is not in a partnership.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 IRL[]
get groupVcard
The group's vcard.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupVcard
hasRole()
Qworum services and applications should call this method to decide whether a persona has a certain role R1. If having another role R2 implies also having R1 (this is typically the case for rolesets with internal role hierarchies), then both roles should be passed as call arguments.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 roleIds: ...(IRL | URL | (IRL | URL)[])
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
get partnerGroupIds
The other groups whose data the user can access, within the restrictions of the user's roles. This set is empty if the user's group is not part of a partnership.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (GroupIdSet | null)
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Persona
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
🏷 𝗦𝗲𝗲
toDataset()
Writes this object to a new RDF dataset.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 object
🏷 𝗦𝗲𝗲
get userHasAllRolesByDefault
This flag is used by 𝐏𝐞𝐫𝐬𝐨𝐧𝐚#𝐡𝐚𝐬𝐑𝐨𝐥𝐞 for deciding whether the user has a certain role, in cases where the outcome would have been undecidable otherwise, such as when the role belongs to an unknown roleset RS1 (i.e. when none of the roles in 𝐏𝐞𝐫𝐬𝐨𝐧𝐚#𝐮𝐬𝐞𝐫𝐑𝐨𝐥𝐞𝐈𝐝𝐬 belong to RS1).
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get userId
Identifies the user.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserId
get userRoleIds
The roles the user has when using Qworum services on behalf of the group.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 IRL[]
get userVcard
The user's vcard.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 IndividualVcard
writeTo(dataset)
Writes a persona to an in-memory RDF dataset that conforms to the DatasetCore interface.
⚠️ Warning: the persona must be the only data that is stored in the dataset.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗦𝗲𝗲
class PersonalGroup extends Group
Personal groups are groups that have only one owner.
These groups are created at the time of user account creation.
They don't belong to an org, and they don't have subgroups or a parent group.
Personal groups have the same bare IDs as their owners.
A user account has exactly one personal account.
constructor(group)
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static create(group)
Creates a user's personal group.
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 PersonalGroup[]
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (PersonalGroup|null)
🏷 𝗦𝗲𝗲
class Phone
constructor(phoneUrl, types)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 phoneUrl: PhoneUrl
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 types: (Types | null | undefined)
get phoneUrl
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 PhoneUrl
get types
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Types
class PhoneUrl extends URL
constructor(phoneUrl)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 phoneUrl: string
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static build(info)
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
get phoneNumber
class Photo
Represents a Vcard photo.
constructor(photo)
Creates a Vcard photo object.
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
get dataUrl
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 DataUrl
class Role
A user role within a group.
Each role belongs to exactly one roleset. The rolesetId prefixes each roleId that belongs to the roleset.
All roles that aren't the root role in a roleset have a parent role.
constructor(role)
get description
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 I18nText
equals(other)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 other: *
get parentRoleId
When a role has a parent role, this means that the role has all the permissions of the parent role, and it may have additional permissions that the parent role does not have.
This is similar to the concept of a superclass in OOP, where the superclass has typically less features than the classes that are derived from it.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (IRL | null)
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Role[]
🏷 𝗦𝗲𝗲
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (Role|null)
🏷 𝗦𝗲𝗲
get roleId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 IRL
toDataset()
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 object
🏷 𝗦𝗲𝗲
writeTo(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗦𝗲𝗲
class Roleset
A set of roles that are assignable by the managers of group memberships to group members.
constructor(roleset)
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
get description
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 I18nText
equals(other)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 other: *
findRole(matcher)
Returns a role whose ID matches the call argument.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 matcher: (IRL | Role | RegExp | string)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (Role | null)
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
get generalSet
Finds the minimum number of roles that imply also having all of the other roles in the roleset.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Role[]
getSuperRolesOf(role)
Finds all roles that imply also having the role 𝚛𝚘𝚕𝚎.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 role: (Role | IRL)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Role[]
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
hasRole(role)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 role: (Role | IRL)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Roleset[]
🏷 𝗦𝗲𝗲
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (Roleset|null)
🏷 𝗦𝗲𝗲
get roles
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Role[]
get rolesetId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 IRL
toDataset()
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 object
🏷 𝗦𝗲𝗲
writeTo(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗦𝗲𝗲
class Types
Email/phone types.
constructor(types)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 types: (string[] | string | null | undefined)
static knownTypes
Class property. The email/phone types are 'home', 'work', 'voice', 'video', 'fax', 'cell'.
🏷 𝗧𝘆𝗽𝗲 string[]
get all
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 string[]
hasType(type)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 type: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
setType(type)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 type: string
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
unsetType(type)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 type: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
class User
constructor(user)
password
Instance property.
🏷 𝗧𝘆𝗽𝗲 Password
static create()
Create a new user that has a random ID and a random password.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 User
equals(other)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 other: *
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get personalGroupId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 GroupId
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 User[]
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (User|null)
🏷 𝗦𝗲𝗲
toDataset()
Writes this object to a new RDF dataset.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 object
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 Error
🏷 𝗦𝗲𝗲
get userId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserId
writeTo(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
class UserExtras
User-related data that is stored in the user repo not the auth repo.
constructor(user)
groupIds
Instance property.
🏷 𝗧𝘆𝗽𝗲 GroupId[]
orgIds
Instance property.
🏷 𝗧𝘆𝗽𝗲 OrgId[]
static create(userId)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 userId: UserId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserExtras
equals(other)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 other: *
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
a DatasetCore object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserExtras[]
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (UserExtras|null)
🏷 𝗦𝗲𝗲
toDataset()
Writes this object to a new RDF dataset.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 object
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 Error
🏷 𝗦𝗲𝗲
get userId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserId
writeTo(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
class UserId extends Id
constructor(idString)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idString: string
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static create(bareId)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 bareId: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserId
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserId[]
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (UserId|null)
toDataset()
static uuid()
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserId
writeTo(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
class UserIdSet
A 𝐔𝐬𝐞𝐫𝐈𝐝 set.
add(ids)
Returns this id set for call-chaining purposes.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 ids: (UserId | UserId[] | UserIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
clear()
Empties the set.
clone()
Returns a new 𝚄𝚜𝚎𝚛𝙸𝚍𝚂𝚎𝚝 that has the same members as this one.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
has(id)
Returns true if the set contains 𝐢𝐝.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 id: UserId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
intersection(idSet)
Returns a new 𝚄𝚜𝚎𝚛𝙸𝚍𝚂𝚎𝚝 that is the intersection of this set and the arg set.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idSet: UserIdSet
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
isDisjointFrom(idSet)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idSet: UserIdSet
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get isEmpty
🏷 𝗧𝘆𝗽𝗲 boolean
isSameAs(idSet)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idSet: UserIdSet
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
isSubsetOf(idSet)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idSet: UserIdSet
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
isSupersetOf(idSet)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idSet: UserIdSet
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 boolean
get length
🏷 𝗧𝘆𝗽𝗲 number
get members
🏷 𝗧𝘆𝗽𝗲 UserId[]
remove(ids)
Returns this id set for call-chaining purposes.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 ids: (UserId | UserId[] | UserIdSet)
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
get size
🏷 𝗧𝘆𝗽𝗲 number
symmetricDifference(idSet)
Returns a new 𝚄𝚜𝚎𝚛𝙸𝚍𝚂𝚎𝚝 that contains ids contained in this set or the arg set but not both.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idSet: UserIdSet
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
union(idSet)
Returns a new 𝚄𝚜𝚎𝚛𝙸𝚍𝚂𝚎𝚝 that is the union of this set and the arg set.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 idSet: UserIdSet
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 UserIdSet
class Vcard
Represents a Vcard.
constructor(ownerId, vcard)
Creates a 𝚅𝚌𝚊𝚛𝚍 object.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 ownerId: Id
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
emails
Instance property.
🏷 𝗧𝘆𝗽𝗲 Email[]
formattedName
Instance property.
🏷 𝗧𝘆𝗽𝗲 string
name
Instance property.
🏷 𝗧𝘆𝗽𝗲 (Name | undefined)
nickname
Instance property.
🏷 𝗧𝘆𝗽𝗲 (string | undefined)
org
Instance property.
🏷 𝗧𝘆𝗽𝗲 (string | undefined)
phones
Instance property.
🏷 𝗧𝘆𝗽𝗲 Phone[]
photo
Instance property.
🏷 𝗧𝘆𝗽𝗲 (Photo | undefined)
static fromString(vcardText)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 vcardText: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 {formattedName: string, kind: string | undefined, name: Name | undefined, nickname: string | undefined, emails: Email[] | undefined, phones: Phone[] | undefined, photo: Photo | undefined, org: string | undefined
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
get kind
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (string | undefined)
get ownerId
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Id
static readFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 Vcard[]
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 TypeError
static readOneFrom(dataset)
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (Vcard|null)
🏷 𝗦𝗲𝗲
toDataset()
Writes this object to a new RDF dataset.
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 object
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 Error
🏷 𝗦𝗲𝗲
writeTo(dataset)
Writes the vCard to an RDF dataset. Vcards that don't have a ownerId are not written.
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 dataset: object
🏷 𝗧𝗵𝗿𝗼𝘄𝘀 Error
const IRI
const IRL
const IriParser
const Language
const URN
const defaultRoleset: Roleset
const group_id
Tagged-template parser.
🏷 𝗧𝘆𝗽𝗲 function
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 stringValue: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (GroupId | null)
const membership_id
Tagged-template parser.
🏷 𝗧𝘆𝗽𝗲 function
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 stringValue: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (PartnershipId | null)
const org_id
Tagged-template parser.
🏷 𝗧𝘆𝗽𝗲 function
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 stringValue: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (OrgId | null)
const partnership_id
Tagged-template parser.
🏷 𝗧𝘆𝗽𝗲 function
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 stringValue: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (PartnershipId | null)
const partnership_membership_id
Tagged-template parser.
🏷 𝗧𝘆𝗽𝗲 function
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 stringValue: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (PartnershipMembershipId | null)
const user_id
Tagged-template parser.
🏷 𝗧𝘆𝗽𝗲 function
🏷 𝗣𝗮𝗿𝗮𝗺𝗲𝘁𝗲𝗿 stringValue: string
🏷 𝗥𝗲𝘁𝘂𝗿𝗻𝘀 (UserId | null)
📅 𝑪𝒂𝒄𝒉𝒆𝒅 𝒐𝒏 𝑾𝒆𝒅 𝑫𝒆𝒄 𝟢𝟥 𝟤𝟢𝟤𝟧 𝟢𝟫:𝟤𝟨:𝟣𝟤 𝑮𝑴𝑻+𝟢𝟣𝟢𝟢 (𝑪𝒆𝒏𝒕𝒓𝒂𝒍 𝑬𝒖𝒓𝒐𝒑𝒆𝒂𝒏 𝑺𝒕𝒂𝒏𝒅𝒂𝒓𝒅 𝑻𝒊𝒎𝒆)