@@ -564,7 +564,7 @@ export default class ConsumedThing extends Thing implements IConsumedThing {
564564
565565 const content = await client . readResource ( form ) ;
566566 try {
567- return this . handleInteractionOutput ( content , form , tp , false ) ;
567+ return this . handleInteractionOutput ( content , form , tp ) ;
568568 } catch ( e ) {
569569 const error = e instanceof Error ? e : new Error ( JSON . stringify ( e ) ) ;
570570 throw new Error ( `Error while processing property for ${ tp . title } . ${ error . message } ` ) ;
@@ -574,14 +574,13 @@ export default class ConsumedThing extends Thing implements IConsumedThing {
574574 private handleInteractionOutput (
575575 content : Content ,
576576 form : Form ,
577- outputDataSchema : WoT . DataSchema | undefined ,
578- ignoreValidation : boolean
577+ outputDataSchema : WoT . DataSchema | undefined
579578 ) : InteractionOutput {
580579 // infer media type from form if not in response metadata
581580 content . type ??= form . contentType ?? "application/json" ;
582581 // check if returned media type is the same as expected media type (from TD)
583582 this . checkMediaTypeOrThrow ( content , form ) ;
584- return new InteractionOutput ( content , form , outputDataSchema , { ignoreValidation } ) ;
583+ return new InteractionOutput ( content , form , outputDataSchema ) ;
585584 }
586585
587586 // check if returned media type is the same as expected media type (from TD)
@@ -601,13 +600,13 @@ export default class ConsumedThing extends Thing implements IConsumedThing {
601600 content : Content ,
602601 form : Form ,
603602 outputDataSchema : WoT . DataSchema | undefined ,
604- ignoreValidation : boolean
603+ synchronous ? : boolean
605604 ) : ActionInteractionOutput {
606605 // infer media type from form if not in response metadata
607606 content . type ??= form . contentType ?? "application/json" ;
608607 // check if returned media type is the same as expected media type (from TD)
609608 this . checkMediaTypeOrThrow ( content , form ) ;
610- return new ActionInteractionOutput ( content , form , outputDataSchema , { ignoreValidation } ) ;
609+ return new ActionInteractionOutput ( content , form , outputDataSchema , synchronous ) ;
611610 }
612611
613612 async _readProperties ( propertyNames : string [ ] ) : Promise < WoT . PropertyReadMap > {
@@ -726,8 +725,7 @@ export default class ConsumedThing extends Thing implements IConsumedThing {
726725
727726 const content = await client . invokeResource ( form , input ) ;
728727 try {
729- const ignoreValidation = ta . synchronous === undefined ? true : ! ta . synchronous ;
730- return this . handleActionInteractionOutput ( content , form , ta . output , ignoreValidation ) ;
728+ return this . handleActionInteractionOutput ( content , form , ta . output , ta . synchronous ) ;
731729 } catch ( e ) {
732730 const error = e instanceof Error ? e : new Error ( JSON . stringify ( e ) ) ;
733731 throw new Error ( `Error while processing action for ${ ta . title } . ${ error . message } ` ) ;
@@ -770,7 +768,7 @@ export default class ConsumedThing extends Thing implements IConsumedThing {
770768 // next
771769 ( content ) => {
772770 try {
773- listener ( this . handleInteractionOutput ( content , form , tp , false ) ) ;
771+ listener ( this . handleInteractionOutput ( content , form , tp ) ) ;
774772 } catch ( e ) {
775773 const error = e instanceof Error ? e : new Error ( JSON . stringify ( e ) ) ;
776774 warn ( `Error while processing observe property for ${ tp . title } . ${ error . message } ` ) ;
@@ -826,7 +824,7 @@ export default class ConsumedThing extends Thing implements IConsumedThing {
826824 formWithoutURITemplates ,
827825 ( content ) => {
828826 try {
829- listener ( this . handleInteractionOutput ( content , form , te . data , false ) ) ;
827+ listener ( this . handleInteractionOutput ( content , form , te . data ) ) ;
830828 } catch ( e ) {
831829 const error = e instanceof Error ? e : new Error ( JSON . stringify ( e ) ) ;
832830 warn ( `Error while processing event for ${ te . title } . ${ error . message } ` ) ;
0 commit comments