@@ -366,7 +366,7 @@ export function restHandler(options: RestHandlerOptions): RequestHandler {
366366 asyncHandler ( async ( req , res ) => {
367367 const context = await buildContext ( req ) ;
368368 const result = await restTransportHandler . getTask (
369- req . params . taskId ,
369+ req . params . taskId as string ,
370370 context ,
371371 //TODO: clarify for version 1.0.0 the format of the historyLength query parameter, and if history should always be added to the returned object
372372 req . query . historyLength ?? req . query . history_length
@@ -391,7 +391,7 @@ export function restHandler(options: RestHandlerOptions): RequestHandler {
391391 '/v1/tasks/:taskId\\:cancel' ,
392392 asyncHandler ( async ( req , res ) => {
393393 const context = await buildContext ( req ) ;
394- const result = await restTransportHandler . cancelTask ( req . params . taskId , context ) ;
394+ const result = await restTransportHandler . cancelTask ( req . params . taskId as string , context ) ;
395395 const protoResult = ToProto . task ( result ) ;
396396 sendResponse < a2a . Task > ( res , HTTP_STATUS . ACCEPTED , context , protoResult , a2a . Task ) ;
397397 } )
@@ -412,7 +412,7 @@ export function restHandler(options: RestHandlerOptions): RequestHandler {
412412 '/v1/tasks/:taskId\\:subscribe' ,
413413 asyncHandler ( async ( req , res ) => {
414414 const context = await buildContext ( req ) ;
415- const stream = await restTransportHandler . resubscribe ( req . params . taskId , context ) ;
415+ const stream = await restTransportHandler . resubscribe ( req . params . taskId as string , context ) ;
416416 await sendStreamResponse ( res , stream , context ) ;
417417 } )
418418 ) ;
@@ -460,7 +460,7 @@ export function restHandler(options: RestHandlerOptions): RequestHandler {
460460 asyncHandler ( async ( req , res ) => {
461461 const context = await buildContext ( req ) ;
462462 const result = await restTransportHandler . listTaskPushNotificationConfigs (
463- req . params . taskId ,
463+ req . params . taskId as string ,
464464 context
465465 ) ;
466466 const protoResult = ToProto . listTaskPushNotificationConfig ( result ) ;
@@ -489,8 +489,8 @@ export function restHandler(options: RestHandlerOptions): RequestHandler {
489489 asyncHandler ( async ( req , res ) => {
490490 const context = await buildContext ( req ) ;
491491 const result = await restTransportHandler . getTaskPushNotificationConfig (
492- req . params . taskId ,
493- req . params . configId ,
492+ req . params . taskId as string ,
493+ req . params . configId as string ,
494494 context
495495 ) ;
496496 const protoResult = ToProto . taskPushNotificationConfig ( result ) ;
@@ -519,8 +519,8 @@ export function restHandler(options: RestHandlerOptions): RequestHandler {
519519 asyncHandler ( async ( req , res ) => {
520520 const context = await buildContext ( req ) ;
521521 await restTransportHandler . deleteTaskPushNotificationConfig (
522- req . params . taskId ,
523- req . params . configId ,
522+ req . params . taskId as string ,
523+ req . params . configId as string ,
524524 context
525525 ) ;
526526 sendResponse ( res , HTTP_STATUS . NO_CONTENT , context ) ;
0 commit comments