refactor redux data model

This commit is contained in:
seavor 2026-04-15 21:48:03 -05:00
parent ae1bc3da38
commit 0ff391491d
243 changed files with 5212 additions and 5963 deletions

View file

@ -1,5 +1,32 @@
export { AdminService } from './AdminService';
export { AuthenticationService } from './AuthenticationService';
export { ModeratorService } from './ModeratorService';
export { RoomsService } from './RoomsService';
export { SessionService } from './SessionService';
import { WebClient } from '@app/websocket';
import type { IWebClientRequest } from '@app/websocket';
export { createWebClientResponse } from './response';
export { createWebClientRequest } from './request';
/**
* UI-facing request surface. Each property is a lazy getter that resolves
* `WebClient.instance` at call time, so consumers can import this before the
* singleton is bootstrapped it only needs to exist by the first actual call.
*
* Prefer this over importing `WebClient` directly: it keeps UI code free of
* transport-layer names and makes `@app/websocket` an internal detail of the
* `api` layer.
*/
export const request: IWebClientRequest = {
get authentication() {
return WebClient.instance.request.authentication;
},
get session() {
return WebClient.instance.request.session;
},
get rooms() {
return WebClient.instance.request.rooms;
},
get admin() {
return WebClient.instance.request.admin;
},
get moderator() {
return WebClient.instance.request.moderator;
},
};