sitemap.xml llms.txt
Skip to main content

Project Functions

Use the Project adapter to manage Epicenter projects.

Importing the adapter​

To use the functions of the Project adapter, import it as shown:
import { projectAdapter } from 'epicenter-libs';

The projectAdapter namespace exports functions that make calls to the Project API.

learn more

For descriptions of the objects used by the project adapter functions, read Project Entities.


Retrieving projects​

Get project​

The get() function retrieves the details of a project.

Function signature
export async function get(optionals: RoutingOptions = {}): Promise<Project>

Permissions​

Requires a role of PARTICIPANT or higher.

Parameters​

Return value​

List projects​

The list() function retrieves a list of projects for an account.

Function signature
export async function list(
accountShortName: string,
optionals: RoutingOptions = {}
): Promise<Project[]>

Permissions​

Requires a role of SUPPORT or higher.

Parameters​

Return value​

  • Promise<Project[]> – A promise resolving to an array of project objects.

Checking push channels​

The channelsEnabled function makes a GET request to the /project/channel/isEnabled endpoint to check if push channels enabled for the project. If they are, the simulation participants can sign up for and receive push notifications.

Function signature
export async function channelsEnabled(optionals: RoutingOptions = {}): Promise<boolean>

Permissions​

Requires a role of PARTICIPANT or higher.

Parameters​

  • optionals (RoutingOptions, optional) – Pass network call options overrides here.

Return value​

  • Promise<boolean> – A promise that resolves to true if the project supports the use of push channels, otherwise false.