세션 계약 SSOT 정리

This commit is contained in:
Yun Chan 2026-06-27 18:47:55 +09:00
parent 1881fe50bd
commit 17b114f647
8 changed files with 43 additions and 47 deletions

View file

@ -165,7 +165,7 @@ export const authApi = {
withdrawConsent: () => api.del<ConsentResponse>("/auth/consent"),
};
export type SessionStage = "라포" | "탐색" | "개입" | "정리";
export type SessionStage = ApiSchema<"SessionStartResponse">["stage"];
/** GET /personas — personas.py PersonaSummary */
export type PersonaSummary = ApiSchema<"PersonaSummary">;
@ -178,15 +178,7 @@ export type PersonaDraftPayload = ApiSchema<"PersonaDraftPayload">;
export type PersonaDraftDetail = ApiSchema<"PersonaDraftDetail">;
/** POST /sessions — sessions.py SessionStartResponse */
export interface SessionStartResponse {
session_id: string;
case_id: string;
session_no: number;
stage: SessionStage;
effective_openness: number;
recall_summary: string | null;
degraded: boolean;
}
export type SessionStartResponse = ApiSchema<"SessionStartResponse">;
/** POST /sessions/{id}/turn — sessions.py TurnResponse */
export type TurnResponse = ApiSchema<"TurnResponse">;
@ -201,20 +193,7 @@ export type LearnerSessionsResponse = ApiSchema<"LearnerSessionsResponse">;
export type SessionDetailTurn = ApiSchema<"SessionDetailTurn">;
export interface SessionDetailResponse {
session_id: string;
case_id: string;
persona_code: string;
persona_name: string;
theory_mode: string;
status: "active" | "ended";
stage: SessionStage;
effective_openness: number;
started_at: string;
ended_at: string | null;
turns: SessionDetailTurn[];
review_ready: boolean;
}
export type SessionDetailResponse = ApiSchema<"SessionDetailResponse">;
export type ReviewClient = ApiSchema<"ReviewClient">;
export type ReviewTechnique = ApiSchema<"ReviewTechnique">;