Constants
Enums
Push category
The PUSH_CATEGORY enum contains the possible values of a channel's push category property.
Enum values
CHAT: Intended for chat messages.CONSENSUS: Consensus related messages.CONTROL: Intended for general, non-chat, simulation-level communication.PRESENCE: Presence related messages.LOBBY: Intended for channels awaiting entry into games.RUN: Run related messages.VAULT: Vault related messages.VIDEO: Video related messages.WORLD: World related messages.GROUP: For group-related operations like assignments and unassignments.SYSTEM: Reserved for internal system-related communication.
Ritual
The RITUAL enum implements run rituals. For explanations of the values, read the descriptions below.
Enum values
NONE: Does not allow restore but will allow access to archived state.INTER: Does not allow restore and will not access archived state (if down stay down).REANIMATE:- Use archived state if available. If you attempt to retrieve a variable that isn't saved to archived state, the call fails with an
UnrecordedVariableException. - Restore an inactive run when a state-changing operation is requested.
- Use archived state if available. If you attempt to retrieve a variable that isn't saved to archived state, the call fails with an
REVIVE: Restore the run, do not use archived state.EXORCISE: Restore if required, otherwise access archived state. In any case, terminate the run after issuing the command.RESURRECT: Restore the run, and don't use archived state. Also terminate the run after issuing the command.
Use REVIVE or RESURRECT instead of REANIMATE or EXORCISE when:
- The state is too large to archive completely.
- Archiving is not configured.
- You need variables that may not be in the archive.
- You require guaranteed access to any declared variable.
Role
The ROLE enum defines the different permission levels used in Epicenter to manage access to resources.
Enum values
SYSTEM: System-level role with full privileges, intended for Epicenter managers.MONITOR: A read-only version ofSYSTEMwith selective write access.OWNER: Has full control over the account.AUTHOR: Role for team members or server API keys. This is tied to one account.SUPPORT: A reduced-permission version ofAUTHOR, meant for support staff.ASSOCIATE: An admin with limited access to the accountFACILITATOR: Role designated for facilitators who help run simulations.REVIEWER: A read-only version ofFACILITATOR. Cannot edit anything.USER: Represents users with an associateduserKey.LEADER: A more privileged version ofPARTICIPANT.PARTICIPANT: Users who participate in simulations.ANONYMOUS: The lowest level of access, representing users without identification.
Group role
The GROUP_ROLE enum defines the different access levels assigned to members within a group.
Enum values
FACILITATOR: Role designated for facilitators who help run simulations.REVIEWER: A read-only version ofFACILITATOR. Cannot edit anything.USER: Represents users with an associateduserKey.LEADER: A more privileged version ofPARTICIPANT.PARTICIPANT: Users who participate in simulations.ANONYMOUS: The lowest level of access, representing users without identification.
Scope boundary
The SCOPE_BOUNDARY enum defines the various levels of scope for Epicenter entities. The scope defines the namespace for the scoped entity. Data lives and dies with scope. Delete the scope, you lose the data for the scoped entities.
Enum values
PROJECT: Entity is scoped to a project.GROUP: Entity is scoped to a group.EPISODE: Entity is scoped to a episode.WORLD: Entity is scoped to a world.
Interfaces
Permit
The Permit interface implements the concept of an entity's permit in Epicenter.
Properties
readLock(keyof typeof ROLE): Role required to view the entity. Must be a key from theROLEenum enum.writeLock(keyof typeof ROLE): Role required to update the entity. Must be a key from theROLEenum enum.
Generic scope
The GenericScope interface describes the scope of an Epicenter entity.
Properties
scopeBoundary(keyof typeof SCOPE_BOUNDARY): Specifies the scope level (e.g.,PROJECT,GROUP,EPISODE, orWORLD). Must be one of the values defined in theSCOPE_BOUNDARYenum.scopeKey(string): A unique key for the entity acting as the scope. For example, if the scope boundary isGROUP, thescopeKeymust contain a group key.
Generic search options
The GenericSearchOptions interface is used to pass filtering, sorting, and pagination parameters to adapter methods.
For reference on filter and search values, read Filter and sort syntax.
Properties
filter(Type:FilterInput, optional): List of conditions to filter for.sort(Type:string[], optional): List of values to sort by.first(Type:number, optional): The index of the first result to return (for pagination).max(Type:number, optional): The maximum number of results to return (upper limit is 200).count(Type:boolean, optional): Iftrue, include the total count of matching records in the response.