@acrool/rtk-query-codegen-openapi 0.0.2 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.mts CHANGED
@@ -130,13 +130,17 @@ type EndpointOverrides = {
130
130
  type: 'mutation' | 'query';
131
131
  parameterFilter: ParameterMatcher;
132
132
  }>;
133
- type ConfigFile = Id<Require<CommonOptions & OutputFileOptions, 'outputFile'>> | Id<Omit<CommonOptions, 'outputFile'> & {
134
- outputFiles: {
135
- [outputFile: string]: Omit<OutputFileOptions, 'outputFile'>;
133
+ type OutputFilesConfig = {
134
+ [outputFile: string]: {
135
+ groupMatch: RegExp;
136
+ filterEndpoint?: (groupName: string) => RegExp;
136
137
  };
138
+ };
139
+ type ConfigFile = Id<Require<CommonOptions & OutputFileOptions, 'outputFile'>> | Id<Omit<CommonOptions, 'outputFile'> & {
140
+ outputFiles: OutputFilesConfig;
137
141
  }>;
138
142
 
139
143
  declare function generateEndpoints(options: GenerationOptions): Promise<string | void>;
140
144
  declare function parseConfig(fullConfig: ConfigFile): (CommonOptions & OutputFileOptions)[];
141
145
 
142
- export { type ConfigFile, generateEndpoints, parseConfig };
146
+ export { type ConfigFile, type OutputFilesConfig, generateEndpoints, parseConfig };
package/lib/index.d.ts CHANGED
@@ -130,13 +130,17 @@ type EndpointOverrides = {
130
130
  type: 'mutation' | 'query';
131
131
  parameterFilter: ParameterMatcher;
132
132
  }>;
133
- type ConfigFile = Id<Require<CommonOptions & OutputFileOptions, 'outputFile'>> | Id<Omit<CommonOptions, 'outputFile'> & {
134
- outputFiles: {
135
- [outputFile: string]: Omit<OutputFileOptions, 'outputFile'>;
133
+ type OutputFilesConfig = {
134
+ [outputFile: string]: {
135
+ groupMatch: RegExp;
136
+ filterEndpoint?: (groupName: string) => RegExp;
136
137
  };
138
+ };
139
+ type ConfigFile = Id<Require<CommonOptions & OutputFileOptions, 'outputFile'>> | Id<Omit<CommonOptions, 'outputFile'> & {
140
+ outputFiles: OutputFilesConfig;
137
141
  }>;
138
142
 
139
143
  declare function generateEndpoints(options: GenerationOptions): Promise<string | void>;
140
144
  declare function parseConfig(fullConfig: ConfigFile): (CommonOptions & OutputFileOptions)[];
141
145
 
142
- export { type ConfigFile, generateEndpoints, parseConfig };
146
+ export { type ConfigFile, type OutputFilesConfig, generateEndpoints, parseConfig };