feat: define clean architecture layers and ports
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @typedef {"authenticated" | "unauthenticated" | "recovery-pending" | "integration-failed"} SessionState
|
||||
*/
|
||||
|
||||
/**
|
||||
* The session is opaque: credentials are attached without exposing tokens.
|
||||
*
|
||||
* @typedef {{
|
||||
* getState(): SessionState,
|
||||
* attach(request: Request): Promise<Request>,
|
||||
* recover(): Promise<"restored" | "no-session">,
|
||||
* onUnauthenticated(): void
|
||||
* }} AuthSessionPort
|
||||
*/
|
||||
|
||||
export {};
|
||||
Reference in New Issue
Block a user