fix: update useFlowPilotSession return types for optional documentation
SessionCloseResponse.documentation is now nullable — update resolve/escalate return types to match. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -27,8 +27,8 @@ export interface UseFlowPilotSession {
|
||||
// Actions
|
||||
startSession: (intake: AISessionCreateRequest) => Promise<void>
|
||||
respondToStep: (response: StepResponseRequest) => Promise<void>
|
||||
resolveSession: (data: ResolveSessionRequest) => Promise<SessionDocumentation>
|
||||
escalateSession: (data: EscalateSessionRequest) => Promise<SessionDocumentation>
|
||||
resolveSession: (data: ResolveSessionRequest) => Promise<SessionDocumentation | null>
|
||||
escalateSession: (data: EscalateSessionRequest) => Promise<SessionDocumentation | null>
|
||||
pauseSession: () => Promise<void>
|
||||
resumeOwnSession: () => Promise<void>
|
||||
abandonSession: () => Promise<void>
|
||||
@@ -134,7 +134,7 @@ export function useFlowPilotSession(): UseFlowPilotSession {
|
||||
}
|
||||
}, [session])
|
||||
|
||||
const resolveSession = useCallback(async (data: ResolveSessionRequest): Promise<SessionDocumentation> => {
|
||||
const resolveSession = useCallback(async (data: ResolveSessionRequest): Promise<SessionDocumentation | null> => {
|
||||
if (!session) throw new Error('No active session')
|
||||
setIsProcessing(true)
|
||||
try {
|
||||
@@ -156,7 +156,7 @@ export function useFlowPilotSession(): UseFlowPilotSession {
|
||||
}
|
||||
}, [session])
|
||||
|
||||
const escalateSession = useCallback(async (data: EscalateSessionRequest): Promise<SessionDocumentation> => {
|
||||
const escalateSession = useCallback(async (data: EscalateSessionRequest): Promise<SessionDocumentation | null> => {
|
||||
if (!session) throw new Error('No active session')
|
||||
setIsProcessing(true)
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user