Skip to content

Interface: ManagementStore

@roomful/relay


@roomful/relay / ManagementStore

Defined in: packages/relay/src/management/store.ts:23

Pluggable storage backend for project/room/quota management data.

Implementations must be safe for concurrent access. The in-memory version is synchronous; Redis / DB versions will be async.

createProject(input): Project | Promise<Project>

Defined in: packages/relay/src/management/store.ts:33

Creates a project and returns the stored record.

string = ...

string = ...

Optional id; auto-generated when omitted. Must be unique.

Record<string, unknown> = ...

string = ...

string = ...

Project | Promise<Project>


createRoom(projectId, input): RoomRecord | Promise<RoomRecord>

Defined in: packages/relay/src/management/store.ts:53

Creates a room record. Throws when the project does not exist.

string

boolean = ...

string = ...

Optional id; auto-generated when omitted.

Record<string, unknown> = ...

string = ...

number = ...

RoomRecord | Promise<RoomRecord>


deleteProject(projectId): boolean | Promise<boolean>

Defined in: packages/relay/src/management/store.ts:42

Deletes a project and all associated rooms + quota. Returns true if it existed.

string

boolean | Promise<boolean>


deleteQuota(projectId): boolean | Promise<boolean>

Defined in: packages/relay/src/management/store.ts:67

Removes the explicit quota for a project so it falls back to relay defaults.

string

boolean | Promise<boolean>


deleteRoom(roomId): boolean | Promise<boolean>

Defined in: packages/relay/src/management/store.ts:56

Deletes a room. Returns true if it existed.

string

boolean | Promise<boolean>


getProject(projectId): Project | Promise<Project | null> | null

Defined in: packages/relay/src/management/store.ts:30

Returns a single project, or null when not found.

string

Project | Promise<Project | null> | null


getQuota(projectId): ProjectQuota | Promise<ProjectQuota | null> | null

Defined in: packages/relay/src/management/store.ts:61

Returns the quota for a project, or null when the project has no explicit quota.

string

ProjectQuota | Promise<ProjectQuota | null> | null


getRoom(roomId): RoomRecord | Promise<RoomRecord | null> | null

Defined in: packages/relay/src/management/store.ts:50

Returns a single room, or null when not found.

string

RoomRecord | Promise<RoomRecord | null> | null


getUsage(projectId): ProjectUsage | Promise<ProjectUsage>

Defined in: packages/relay/src/management/store.ts:72

Returns a point-in-time usage snapshot for a project.

string

ProjectUsage | Promise<ProjectUsage>


listProjects(ownerId): Project[] | Promise<Project[]>

Defined in: packages/relay/src/management/store.ts:27

Lists all projects visible to ownerId. Pass '*' to bypass filtering.

string

Project[] | Promise<Project[]>


listRooms(projectId): RoomRecord[] | Promise<RoomRecord[]>

Defined in: packages/relay/src/management/store.ts:47

Lists all rooms belonging to a project.

string

RoomRecord[] | Promise<RoomRecord[]>


setQuota(projectId, input): ProjectQuota | Promise<ProjectQuota>

Defined in: packages/relay/src/management/store.ts:64

Creates or replaces the quota for a project.

string

number = ...

number = ...

number = ...

number = ...

number = ...

number = ...

number = ...

ProjectQuota | Promise<ProjectQuota>


updateProject(projectId, input): Project | Promise<Project | null> | null

Defined in: packages/relay/src/management/store.ts:36

Updates a project in-place. Returns the updated record or null when not found.

string

string = ...

Record<string, unknown> = ...

string = ...

Project | Promise<Project | null> | null