77 getExecutionMeta ,
88 readExecutionEvents ,
99} from '@/lib/execution/event-buffer'
10- import { formatSSEEvent } from '@/lib/workflows/executor/execution-events'
10+ import { type ExecutionEvent , formatSSEEvent } from '@/lib/workflows/executor/execution-events'
1111import { authorizeWorkflowByWorkspacePermission } from '@/lib/workflows/utils'
1212
1313const logger = createLogger ( 'ExecutionStreamReconnectAPI' )
@@ -88,7 +88,7 @@ export async function GET(
8888 const events = await readExecutionEvents ( executionId , lastEventId )
8989 for ( const entry of events ) {
9090 if ( closed ) return
91- enqueue ( formatSSEEvent ( entry . event as any ) )
91+ enqueue ( formatSSEEvent ( entry . event as unknown as ExecutionEvent ) )
9292 lastEventId = entry . eventId
9393 }
9494
@@ -108,7 +108,7 @@ export async function GET(
108108 const newEvents = await readExecutionEvents ( executionId , lastEventId )
109109 for ( const entry of newEvents ) {
110110 if ( closed ) return
111- enqueue ( formatSSEEvent ( entry . event as any ) )
111+ enqueue ( formatSSEEvent ( entry . event as unknown as ExecutionEvent ) )
112112 lastEventId = entry . eventId
113113 }
114114
@@ -118,7 +118,7 @@ export async function GET(
118118 const finalEvents = await readExecutionEvents ( executionId , lastEventId )
119119 for ( const entry of finalEvents ) {
120120 if ( closed ) return
121- enqueue ( formatSSEEvent ( entry . event as any ) )
121+ enqueue ( formatSSEEvent ( entry . event as unknown as ExecutionEvent ) )
122122 lastEventId = entry . eventId
123123 }
124124 enqueue ( 'data: [DONE]\n\n' )
0 commit comments