@@ -25,6 +25,7 @@ export default class TypeScriptCodeGeneratorCommand extends Command {
2525 '$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts"' ,
2626 '$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts" -p "I"' ,
2727 '$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts" --no-doc' ,
28+ '$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts" --include-referenced-entry' ,
2829 '$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts" --api-type graphql' ,
2930 '$ csdx tsgen -a "delivery token alias" -o "contentstack/generated.d.ts" --api-type graphql --namespace "GraphQL" ' ,
3031 ] ;
@@ -92,6 +93,12 @@ export default class TypeScriptCodeGeneratorCommand extends Command {
9293 default : false ,
9394 } ) ,
9495
96+ "include-referenced-entry" : flags . boolean ( {
97+ description : "include ReferencedEntry interface in generated types" ,
98+ default : false ,
99+ allowNo : true ,
100+ } ) ,
101+
95102 "api-type" : flags . string ( {
96103 default : "rest" ,
97104 multiple : false ,
@@ -117,6 +124,7 @@ export default class TypeScriptCodeGeneratorCommand extends Command {
117124 const branch = flags . branch ;
118125 const includeSystemFields = flags [ "include-system-fields" ] ;
119126 const includeEditableTags = flags [ "include-editable-tags" ] ;
127+ const includeReferencedEntry = flags [ "include-referenced-entry" ] ;
120128 const namespace = flags . namespace ;
121129
122130 const outputPath = createOutputPath ( filePath ) ;
@@ -200,6 +208,7 @@ export default class TypeScriptCodeGeneratorCommand extends Command {
200208 prefix,
201209 systemFields : includeSystemFields ,
202210 isEditableTags : includeEditableTags ,
211+ includeReferencedEntry,
203212 } ) ;
204213
205214 fs . writeFileSync ( outputPath , result || "" ) ;
0 commit comments