Group Entities
These entities are used by the Group adapter and encapsulate data objects that implement groups in Epicenter.
Managing groups
AUGMENT enum
Pass a value of the AUGMENT enum to the Group adapter unctions to modify API endpoint URLs.
To perform operations on individual group members rather than the entire group, pass MEMBERS. For example: a POST /group call creates a group, while a POST /group/member call creates an individual member.
To get data that requires additional processing by the DB, make a quantized API call by passing QUANTIZED in the function's augment parameter.
Values
MEMBERS: Addmember/to the URL.QUANTIZED: Addquantized/to the URL.
Pricing interface
The Pricing interface defines the price for a group membership.
Properties
amount(number): The cost associated with the group membership.
FlightRecorder interface
A flight recorder allows a record of all HTTP requests to be made in a group-specific log file. It can be used for replay a model run, or to reproduce and diagnose problems.
Start and stop values are times when the recording is scheduled to start and finish.
The FlightRecorder interface contains the flight recorder settings.
Properties
start(number): The time in epoch milliseconds when the recording is scheduled to begin.stop(number): The time in epoch milliseconds when the recording is scheduled to finish.enabled(boolean): Indicates whether the flight recorder is enabled for the group.
Group interface
The Group interface extends GroupUpdate to define a complete group entity.
Properties
name(string): The name of the group. Unique for the project.groupKey(string): A unique GUID for the group.members?(Member[]): A list of group members (optional).
GroupUpdate interface
The GroupUpdate interface defines properties that can be updated in a group.
Properties
runLimit?(number): The maximum number of times that a user can run a simulation before the group expires.expirationDate?(Date): Users can't register for the group or run the sim after this date.organization?(string): The organization that runs the group. Could be different from the simulation creator/owner.allowSelfRegistration?(boolean): Iftrue, a user can register themselves. Otherwise, a new user must be invited by a facilitator.flightRecorder?(FlightRecorder): Contains flight recorder settings.event?(string): Describes the associated event.allowMembershipChanges?(boolean): Iffalse, no member can be removed or added.pricing?(Pricing): The price for the group membership for a user.startDate?(Date): The date when the group event or activity will start.capacity?(number): The maximum number of members allowed.allowChannel?(boolean): Iftrue, allow push notifications. Ifnull, inherited from higher up (project).
Managing group members
Member interface
The Member interface extends GroupPermission to include user details.
Properties
GroupPermission interface
The GroupPermission interface defines user permissions within a group.
Properties
available(boolean): Iftrue, the user can log in and be assigned to worlds.objectType('group'): Specifies the type asgroup.role(keyof typeof ROLE): Defines the user's role within the group.
SelfRegistrationResult interface
The SelfRegistrationResult interface defines the response of a self-registration request.
Properties
redirectUrl(string): The URL to redirect the user after registration.whoAmI(Session): Contains session details of the registered user.
UserInput type
UserInput is a union type. It is either a string or an object with user data.
Variants
- A string representing a
userKey. - An object with the following properties:
userKey(string): A unique identifier for the user.role?(keyof typeof ROLE): The role assigned to the user (optional).available?(boolean): Iftrue, the user can log in and be assigned to worlds (optional).