11import { GenerateType } from "src/generators/types/generate" ;
22import { GenerateOptions } from "src/generators/types/options" ;
3- import { TEMPLATE_DATA_TS_PATH , TEMPLATE_IMPORTS } from "./deps.const" ;
43import { ENUM_SUFFIX , SCHEMA_SUFFIX } from "./zod.const" ;
54
65export const DEFAULT_GENERATE_OPTIONS : GenerateOptions = {
@@ -13,7 +12,7 @@ export const DEFAULT_GENERATE_OPTIONS: GenerateOptions = {
1312 excludePathRegex : "" ,
1413 excludeRedundantZodSchemas : true ,
1514 tsNamespaces : true ,
16- tsPath : TEMPLATE_DATA_TS_PATH ,
15+ tsPath : "@/data" ,
1716 importPath : "ts" ,
1817 configs : {
1918 [ GenerateType . Models ] : {
@@ -32,6 +31,10 @@ export const DEFAULT_GENERATE_OPTIONS: GenerateOptions = {
3231 outputFileNameSuffix : "acl" ,
3332 namespaceSuffix : "Acl" ,
3433 } ,
34+ [ GenerateType . Configs ] : {
35+ outputFileNameSuffix : "configs" ,
36+ namespaceSuffix : "Configs" ,
37+ } ,
3538 } ,
3639 standalone : false ,
3740 baseUrl : "" ,
@@ -42,18 +45,33 @@ export const DEFAULT_GENERATE_OPTIONS: GenerateOptions = {
4245 extractEnums : true ,
4346 replaceOptionalWithNullish : false ,
4447 // Endpoints options
45- restClientImportPath : TEMPLATE_IMPORTS . appRestClient ,
46- errorHandlingImportPath : TEMPLATE_IMPORTS . errorHandling ,
48+ restClientImportPath : "@/util/rest/clients/app-rest-client" ,
49+ errorHandlingImportPath : "@/util/vendor/error-handling" ,
4750 removeOperationPrefixEndingWith : "Controller_" ,
4851 parseRequestParams : true ,
4952 // Queries options
50- queryTypesImportPath : TEMPLATE_IMPORTS . queryTypes ,
53+ queryTypesImportPath : "@/types/react-query" ,
5154 axiosRequestConfig : false ,
52- infiniteQueries : false ,
5355 mutationEffects : true ,
56+ // Infinite queries options
57+ infiniteQueries : false ,
58+ infiniteQueryParamNames : {
59+ page : "page" ,
60+ } ,
61+ infiniteQueryResponseParamNames : {
62+ page : "page" ,
63+ totalItems : "totalItems" ,
64+ limit : "limit" ,
65+ } ,
5466 // ACL options
5567 acl : true ,
5668 checkAcl : true ,
57- abilityContextImportPath : TEMPLATE_IMPORTS . abilityContext ,
69+ abilityContextImportPath : "@/data/acl/ability.context" ,
5870 abilityContextGenericAppAbilities : false ,
71+ // Builder Configs options
72+ builderConfigs : false ,
73+ filterParamName : "filter" ,
74+ dataResponseParamNames : [ "data" , "items" ] ,
75+ dynamicInputsImportPath : "@povio/ui" ,
76+ dynamicColumnsImportPath : "@povio/ui" ,
5977} ;
0 commit comments