World Entities
These entities are used by the World adapter functions and encapsulate data objects used by Epicenter World API.
Enums
OBJECTIVE
Defines the assignment goal for automatic user assignments.
Possible values:
OBJECTIVE.MINIMUM = 'MINIMUM'- Assign the minimum number of users for each world persona.OBJECTIVE.MAXIMUM = 'MAXIMUM'- Assign the minimum number of users for each persona.OBJECTIVE.MARGINAL = 'MARGINAL'- Assign the optimal number of users.
The marginal must be greater than or equal to the minimum and less than or equal to the maximum.
ORBIT_TYPE
Defines the types of orbits that a world can belong to.
Possible values:
ORBIT_TYPE.GROUP = 'GROUP'- The world belongs to a group.ORBIT_TYPE.EPISODE = 'EPISODE'- The world belongs to an episode.
WORLD_NAME_GENERATOR
Defines the methods available for generating world names.
Possible values:
WORLD_NAME_GENERATOR.colorAnimal = 'colorAnimal'- Generates names using a combination of colors and animals.WORLD_NAME_GENERATOR.sequential = 'sequential'- Generates names sequentially.
Interfaces
UserAssignment
Describes the assignment of a user to a role within a world. Used by worldAdapter functions to auto-assign users and update the assignments.
Properties:
userKey: string- The unique identifier of the user.role?: string- (Optional) The user's role in a world.
Persona
The Persona interface describes a world persona. It names the role a user plays in a world and the number of users that can be assigned to the role.
Properties:
role: string- A user's role in a world.minimum: number- The minimum number of users that must be assigned to a persona within a single world.maximum?: number- (Optional) The maximum number of users that can be assigned to a persona within a single world. If the value isnull, the number of users that can be assigned is unlimited.marginal?: number- (Optional) The ideal number of users to be assigned to a persona within a single world.
Assignment
The Assignment interface describes an assignment of a user to a world persona. An array of Assignment objects is contained in world.
Properties:
role: string- The user's role in a world.user: User- The user assigned to the role.
World
Represents a world, containing assignments, personas, and metadata.
Properties:
lastUpdated: string- The timestamp of the last update to the world.personae: Persona[]- A list of personas associated with the world.assignments: Assignment[]- A list of user assignments in the world.orbitKey: string- The unique identifier of the orbit the world belongs to.worldKey: string- The unique identifier of the world.created: string- The timestamp when the world was created.orbitType: keyof typeof ORBIT_TYPE- The type of orbit the world belongs to.runKey: string- The unique identifier for the run associated with the world.
Types
WorldKey
WorldKey is an alias type for string representing the unique key of a world.