@@ -35,8 +35,6 @@ interface TemplateTypeConfig {
3535 updateMethodName : keyof IterableClient ;
3636 proofMethodName : keyof IterableClient ;
3737 previewMethodName ?: keyof IterableClient ; // Only email and inapp support preview
38- // Special handling for parameter differences
39- getParamsTransform ?: ( params : z . infer < typeof GetTemplateParamsSchema > ) => any ;
4038}
4139
4240const TEMPLATE_TYPES : TemplateTypeConfig [ ] = [
@@ -50,7 +48,6 @@ const TEMPLATE_TYPES: TemplateTypeConfig[] = [
5048 updateMethodName : "updateEmailTemplate" ,
5149 proofMethodName : "sendEmailTemplateProof" ,
5250 previewMethodName : "previewEmailTemplate" ,
53- getParamsTransform : ( params ) => params . templateId , // Email uses just templateId
5451 } ,
5552 {
5653 type : "sms" ,
@@ -94,12 +91,7 @@ function createTemplateToolsForType(
9491 name : `get_${ config . type } _template` ,
9592 description : `Get details for specific ${ config . displayName } template by ID` ,
9693 schema : GetTemplateParamsSchema ,
97- execute : ( params ) => {
98- const methodParams = config . getParamsTransform
99- ? config . getParamsTransform ( params )
100- : params ;
101- return ( client as any ) [ config . getMethodName ] ( methodParams ) ;
102- } ,
94+ execute : ( params ) => ( client as any ) [ config . getMethodName ] ( params ) ,
10395 } ) ,
10496 createTool ( {
10597 name : `upsert_${ config . type } _template` ,
0 commit comments