@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 +8 -4
- package/lib/index.d.ts +8 -4
- package/lib/index.js +460 -124
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +460 -124
- package/lib/index.mjs.map +1 -1
- package/package.json +11 -2
- package/src/generate.ts +365 -142
- package/src/generators/react-hooks.ts +2 -2
- package/src/index.ts +250 -9
- package/src/types.ts +9 -1
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
|
|
134
|
-
|
|
135
|
-
|
|
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
|
|
134
|
-
|
|
135
|
-
|
|
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 };
|