feat: add profile status service and integrate it into the gateway API context and router

This commit is contained in:
2026-01-03 10:30:59 +00:00
parent 821e18cb53
commit 1988e180c5
5 changed files with 124 additions and 0 deletions
+4
View File
@@ -5,6 +5,7 @@ import type { KakaoOAuthClient } from './auth/kakaoClient.js';
import type { OAuthSessionStore } from './auth/oauthSessionStore.js';
import type { GatewayProfileRepository } from './orchestrator/profileRepository.js';
import type { GatewayOrchestratorHandle } from './orchestrator/gatewayOrchestrator.js';
import type { GatewayProfileStatusService } from './lobby/profileStatusService.js';
export interface GatewayApiContext {
users: UserRepository;
@@ -17,6 +18,7 @@ export interface GatewayApiContext {
publicBaseUrl: string;
profiles: GatewayProfileRepository;
orchestrator: GatewayOrchestratorHandle;
profileStatus: GatewayProfileStatusService;
adminToken?: string;
requestHeaders: Record<string, string | string[] | undefined>;
}
@@ -32,6 +34,7 @@ export const createGatewayApiContext = (options: {
publicBaseUrl: string;
profiles: GatewayProfileRepository;
orchestrator: GatewayOrchestratorHandle;
profileStatus: GatewayProfileStatusService;
adminToken?: string;
requestHeaders?: Record<string, string | string[] | undefined>;
}): GatewayApiContext => ({
@@ -45,6 +48,7 @@ export const createGatewayApiContext = (options: {
publicBaseUrl: options.publicBaseUrl,
profiles: options.profiles,
orchestrator: options.orchestrator,
profileStatus: options.profileStatus,
adminToken: options.adminToken,
requestHeaders: options.requestHeaders ?? {},
});