api-farmer 0.1.3 → 0.1.4

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/dist/index.d.cts DELETED
@@ -1,334 +0,0 @@
1
- import { OpenAPI3, RequestBodyObject, ReferenceObject, OperationObject, OpenAPITSOptions } from 'openapi-typescript';
2
- export { default as pluralize } from 'pluralize';
3
-
4
- type Preset = 'axle' | 'axios';
5
- type StatusCodeStrategy = 'strict' | 'loose' | 'smart';
6
- interface StatusCodes {
7
- get?: number;
8
- post?: number;
9
- put?: number;
10
- delete?: number;
11
- patch?: number;
12
- options?: number;
13
- head?: number;
14
- }
15
- declare function createStatusCodesByStrategy(strategy: StatusCodeStrategy): {
16
- get: number;
17
- post: number;
18
- put: number;
19
- delete: number;
20
- patch: number;
21
- options: number;
22
- head: number;
23
- } | {
24
- get: number;
25
- post: number;
26
- put: number;
27
- delete: number;
28
- patch: number;
29
- options: number;
30
- head: number;
31
- } | {
32
- get: number;
33
- post: number;
34
- put: number;
35
- delete: number;
36
- patch: number;
37
- options: number;
38
- head: number;
39
- };
40
- declare function readSchema(input: string): Promise<OpenAPI3>;
41
- declare function getSchemaNode(schema: OpenAPI3, path: string): any;
42
- declare function readSchemaContent(input: string): Promise<string>;
43
- declare function isRemoteSchema(path: string): boolean;
44
- declare function readTemplateFile(preset?: Preset): string;
45
- declare function getCliVersion(): any;
46
- declare function isRequiredRequestBody(value: RequestBodyObject | ReferenceObject): boolean;
47
- declare function findObjectKey(object: Record<string, any>, targetKeys: string[]): string | undefined;
48
- declare function getRequestBodyContentType(value: RequestBodyObject | ReferenceObject): string | undefined;
49
- type ResponseMetadataItem = {
50
- status: number;
51
- responseContentType: string;
52
- };
53
- declare function getResponseMetadataItems(operation: OperationObject, validateStatus: (status: number) => boolean): ResponseMetadataItem[];
54
-
55
- type TransformerBaseArgs = {
56
- path: string;
57
- fullPath: string;
58
- base: string | undefined;
59
- url: string;
60
- method: string;
61
- operation: OperationObject;
62
- uncountableNouns: string[];
63
- };
64
- declare function transformModuleName({ name }: {
65
- name: string;
66
- }): string;
67
- declare function transformUrl({ path }: {
68
- path: string;
69
- fullPath: string;
70
- base: string | undefined;
71
- }): string;
72
- declare function transformComment({ summary, description, path, method, }: {
73
- summary?: string;
74
- description?: string;
75
- path: string;
76
- method: string;
77
- } & TransformerBaseArgs): string;
78
- declare function transformVerb({ method }: {
79
- method: string;
80
- }): string;
81
- declare function transformEntity({ path, method, uncountableNouns }: TransformerBaseArgs): string;
82
- declare function transformFn({ verb, entity }: {
83
- verb: string;
84
- entity: string;
85
- } & TransformerBaseArgs): string;
86
- declare function transformType({ verb, entity }: {
87
- verb: string;
88
- entity: string;
89
- } & TransformerBaseArgs): string;
90
- declare function transformTypeValue({ fullPath, method }: {
91
- verb: string;
92
- entity: string;
93
- } & TransformerBaseArgs): string;
94
- declare function transformTypeQuery({ type }: {
95
- type: string;
96
- verb: string;
97
- entity: string;
98
- } & TransformerBaseArgs): string;
99
- declare function transformTypeQueryValue({ type, }: {
100
- type: string;
101
- verb: string;
102
- entity: string;
103
- } & TransformerBaseArgs): string;
104
- declare function transformTypeRequestBody({ type, }: {
105
- type: string;
106
- verb: string;
107
- entity: string;
108
- } & TransformerBaseArgs): string;
109
- declare function transformTypeRequestBodyValue({ type, required, requestContentType, }: {
110
- type: string;
111
- verb: string;
112
- entity: string;
113
- required: boolean;
114
- requestContentType: string;
115
- } & TransformerBaseArgs): string;
116
- declare function transformTypeResponseBody({ type, }: {
117
- type: string;
118
- verb: string;
119
- entity: string;
120
- } & TransformerBaseArgs): string;
121
- declare function transformTypeResponseBodyValue({ type, responseMetadataItems, }: {
122
- type: string;
123
- verb: string;
124
- entity: string;
125
- responseMetadataItems: ResponseMetadataItem[];
126
- } & TransformerBaseArgs): string;
127
- interface Transformer {
128
- moduleName: typeof transformModuleName;
129
- verb: typeof transformVerb;
130
- url: typeof transformUrl;
131
- comment: typeof transformComment;
132
- entity: typeof transformEntity;
133
- fn: typeof transformFn;
134
- type: typeof transformType;
135
- typeValue: typeof transformTypeValue;
136
- typeQuery: typeof transformTypeQuery;
137
- typeQueryValue: typeof transformTypeQueryValue;
138
- typeRequestBody: typeof transformTypeRequestBody;
139
- typeRequestBodyValue: typeof transformTypeRequestBodyValue;
140
- typeResponseBody: typeof transformTypeResponseBody;
141
- typeResponseBodyValue: typeof transformTypeResponseBodyValue;
142
- }
143
- declare function createTransformer(): Transformer;
144
-
145
- interface ApiModuleTemplateData {
146
- /**
147
- * API module metadata
148
- */
149
- apiModule: ApiModule;
150
- /**
151
- * The name of the generated api ts type aggregation file
152
- */
153
- typesFilename: string;
154
- /**
155
- * Whether to generate ts code
156
- */
157
- ts: boolean;
158
- /**
159
- * Whether to generate only types
160
- */
161
- typesOnly: boolean;
162
- }
163
- interface ApiModule {
164
- /**
165
- * The name of the API module
166
- */
167
- name: string;
168
- /**
169
- * API module payloads
170
- */
171
- payloads: ApiModulePayload[];
172
- }
173
- interface ApiModulePayload {
174
- /**
175
- * The comment of the API endpoint, including summary, description, URL, and method.
176
- */
177
- comment: string;
178
- /**
179
- * The name of the API function/dispatcher, such as apiGetUsers, apiCreatePost, apiUpdateComment, etc.
180
- */
181
- fn: string;
182
- /**
183
- * The URL of the API endpoint, such as /users, /posts, /comments, etc.
184
- */
185
- url: string;
186
- /**
187
- * The HTTP method of the API endpoint, such as get, post, put, delete, etc.
188
- */
189
- method: string;
190
- /**
191
- * The HTTP verb of the API endpoint, such as Get, Create, Update, Delete, etc.
192
- */
193
- verb: string;
194
- /**
195
- * The entity name of the API endpoint, such as User, Comment, Post, etc.
196
- */
197
- entity: string;
198
- /**
199
- * The request content type of the API endpoint, such as 'application/json', 'application/x-www-form-urlencoded'.
200
- */
201
- requestContentType?: string;
202
- /**
203
- * The type name of the API endpoint, such as ApiGetUsers, ApiCreatePost, ApiUpdateComment, etc.
204
- */
205
- type: string;
206
- /**
207
- * The value of the type of the API endpoint, such as paths['/users']['get'], paths['/posts']['post'], paths['/comments']['put'], etc.
208
- */
209
- typeValue: string;
210
- /**
211
- * The type name of the query parameters of the API endpoint, such as ApiGetUsersQuery, ApiCreatePostQuery, ApiUpdateCommentQuery, etc.
212
- */
213
- typeQuery: string;
214
- /**
215
- * The value of the type of the query parameters of the API endpoint, such as ApiGetUsersQuery['parameters']['query'], ApiCreatePostQuery['parameters']['query'], ApiUpdateCommentQuery['parameters']['query'], etc.
216
- */
217
- typeQueryValue: string;
218
- /**
219
- * The type name of the request body of the API endpoint, such as ApiGetUsersRequestBody, ApiCreatePostRequestBody, ApiUpdateCommentRequestBody, etc.
220
- */
221
- typeRequestBody: string;
222
- /**
223
- * The value of the type of the request body of the API endpoint, such as ApiGetUsersRequestBody['requestBody']['content']['application/json'], ApiCreatePostRequestBody['requestBody']['content']['application/json'], ApiUpdateCommentRequestBody['requestBody']['content']['application/json'], etc.
224
- */
225
- typeRequestBodyValue: string;
226
- /**
227
- * The type name of the response body of the API endpoint, such as ApiGetUsersResponseBody, ApiCreatePostResponseBody, ApiUpdateCommentResponseBody, etc.
228
- */
229
- typeResponseBody: string;
230
- /**
231
- * The value of the type of the response body of the API endpoint, such as ApiGetUsersResponseBody['responses']['200']['content']['application/json'], ApiCreatePostResponseBody['responses']['201']['content']['application/json'], ApiUpdateCommentResponseBody['responses']['200']['content']['application/json'], etc.
232
- */
233
- typeResponseBodyValue: string;
234
- }
235
- interface GenerateOptions {
236
- /**
237
- * The path to the OpenAPI/Swagger schema file.
238
- * @default './schema.json'
239
- */
240
- input?: string;
241
- /**
242
- * The path to the output directory.
243
- * @default './src/apis/generated'
244
- */
245
- output?: string;
246
- /**
247
- * The base path of the API endpoints.
248
- */
249
- base?: string;
250
- /**
251
- * The filename of the generated openapi types file.
252
- * @default '_types.ts'
253
- */
254
- typesFilename?: string;
255
- /**
256
- * Whether to generate TypeScript code.
257
- * @default true
258
- */
259
- ts?: boolean;
260
- /**
261
- * Whether to generate only types.
262
- * @default false
263
- */
264
- typesOnly?: boolean;
265
- /**
266
- * Whether to override the existing files, or an array of filenames to override.
267
- * @default true
268
- */
269
- overrides?: boolean | string[];
270
- /**
271
- * The preset ejs template to use.
272
- * @default 'axle'
273
- */
274
- preset?: Preset;
275
- /**
276
- * Defines which return status codes will be typed
277
- * @default (status) => status >= 200 && status < 300
278
- */
279
- validateStatus?: (status: number) => boolean;
280
- /**
281
- * The transformer api options, used to override the default transformation rules.
282
- */
283
- transformer?: Partial<Transformer>;
284
- /**
285
- * Certain uncountable nouns that do not change from singular to plural
286
- */
287
- uncountableNouns?: string[];
288
- /**
289
- * Whether to clean the output directory before generating.
290
- * @default false
291
- */
292
- clean?: boolean;
293
- /**
294
- * A function to transform the generated types AST before printing to string.
295
- */
296
- openapiTsOptions?: OpenAPITSOptions;
297
- /**
298
- * Whether to exclude deprecated API endpoints.
299
- * @default false
300
- */
301
- excludeDeprecated?: boolean;
302
- }
303
- declare function transformPayloads(pathItems: Record<string, OperationObject>, options: {
304
- path: string;
305
- fullPath: string;
306
- base: string | undefined;
307
- transformer: Transformer;
308
- uncountableNouns: string[];
309
- validateStatus: (status: number) => boolean;
310
- excludeDeprecated?: boolean;
311
- }): ApiModulePayload[];
312
- declare function partitionApiModules(schema: OpenAPI3, options: {
313
- transformer: Transformer;
314
- base: string | undefined;
315
- uncountableNouns: string[];
316
- validateStatus: (status: number) => boolean;
317
- excludeDeprecated?: boolean;
318
- }): ApiModule[];
319
- declare function renderApiModules(apiModules: ApiModule[], options: {
320
- output: string;
321
- typesFilename: string;
322
- ts: boolean;
323
- typesOnly: boolean;
324
- overrides: boolean | string[];
325
- preset: Preset;
326
- }): Promise<unknown[]>;
327
- declare function generateTypes(schema: OpenAPI3, output: string, typesFilename: string, openapiTsOptions: OpenAPITSOptions): Promise<void>;
328
- declare function generate(userOptions?: GenerateOptions): Promise<void>;
329
-
330
- type Config = GenerateOptions;
331
- declare function defineConfig(config: Config): GenerateOptions;
332
- declare function getConfig(): Promise<Config>;
333
-
334
- export { type ApiModule, type ApiModulePayload, type ApiModuleTemplateData, type Config, type GenerateOptions, type Preset, type ResponseMetadataItem, type StatusCodeStrategy, type StatusCodes, type Transformer, type TransformerBaseArgs, createStatusCodesByStrategy, createTransformer, defineConfig, findObjectKey, generate, generateTypes, getCliVersion, getConfig, getRequestBodyContentType, getResponseMetadataItems, getSchemaNode, isRemoteSchema, isRequiredRequestBody, partitionApiModules, readSchema, readSchemaContent, readTemplateFile, renderApiModules, transformComment, transformEntity, transformFn, transformModuleName, transformPayloads, transformType, transformTypeQuery, transformTypeQueryValue, transformTypeRequestBody, transformTypeRequestBodyValue, transformTypeResponseBody, transformTypeResponseBodyValue, transformTypeValue, transformUrl, transformVerb };
package/dist/index.d.ts DELETED
@@ -1,334 +0,0 @@
1
- import { OpenAPI3, RequestBodyObject, ReferenceObject, OperationObject, OpenAPITSOptions } from 'openapi-typescript';
2
- export { default as pluralize } from 'pluralize';
3
-
4
- type Preset = 'axle' | 'axios';
5
- type StatusCodeStrategy = 'strict' | 'loose' | 'smart';
6
- interface StatusCodes {
7
- get?: number;
8
- post?: number;
9
- put?: number;
10
- delete?: number;
11
- patch?: number;
12
- options?: number;
13
- head?: number;
14
- }
15
- declare function createStatusCodesByStrategy(strategy: StatusCodeStrategy): {
16
- get: number;
17
- post: number;
18
- put: number;
19
- delete: number;
20
- patch: number;
21
- options: number;
22
- head: number;
23
- } | {
24
- get: number;
25
- post: number;
26
- put: number;
27
- delete: number;
28
- patch: number;
29
- options: number;
30
- head: number;
31
- } | {
32
- get: number;
33
- post: number;
34
- put: number;
35
- delete: number;
36
- patch: number;
37
- options: number;
38
- head: number;
39
- };
40
- declare function readSchema(input: string): Promise<OpenAPI3>;
41
- declare function getSchemaNode(schema: OpenAPI3, path: string): any;
42
- declare function readSchemaContent(input: string): Promise<string>;
43
- declare function isRemoteSchema(path: string): boolean;
44
- declare function readTemplateFile(preset?: Preset): string;
45
- declare function getCliVersion(): any;
46
- declare function isRequiredRequestBody(value: RequestBodyObject | ReferenceObject): boolean;
47
- declare function findObjectKey(object: Record<string, any>, targetKeys: string[]): string | undefined;
48
- declare function getRequestBodyContentType(value: RequestBodyObject | ReferenceObject): string | undefined;
49
- type ResponseMetadataItem = {
50
- status: number;
51
- responseContentType: string;
52
- };
53
- declare function getResponseMetadataItems(operation: OperationObject, validateStatus: (status: number) => boolean): ResponseMetadataItem[];
54
-
55
- type TransformerBaseArgs = {
56
- path: string;
57
- fullPath: string;
58
- base: string | undefined;
59
- url: string;
60
- method: string;
61
- operation: OperationObject;
62
- uncountableNouns: string[];
63
- };
64
- declare function transformModuleName({ name }: {
65
- name: string;
66
- }): string;
67
- declare function transformUrl({ path }: {
68
- path: string;
69
- fullPath: string;
70
- base: string | undefined;
71
- }): string;
72
- declare function transformComment({ summary, description, path, method, }: {
73
- summary?: string;
74
- description?: string;
75
- path: string;
76
- method: string;
77
- } & TransformerBaseArgs): string;
78
- declare function transformVerb({ method }: {
79
- method: string;
80
- }): string;
81
- declare function transformEntity({ path, method, uncountableNouns }: TransformerBaseArgs): string;
82
- declare function transformFn({ verb, entity }: {
83
- verb: string;
84
- entity: string;
85
- } & TransformerBaseArgs): string;
86
- declare function transformType({ verb, entity }: {
87
- verb: string;
88
- entity: string;
89
- } & TransformerBaseArgs): string;
90
- declare function transformTypeValue({ fullPath, method }: {
91
- verb: string;
92
- entity: string;
93
- } & TransformerBaseArgs): string;
94
- declare function transformTypeQuery({ type }: {
95
- type: string;
96
- verb: string;
97
- entity: string;
98
- } & TransformerBaseArgs): string;
99
- declare function transformTypeQueryValue({ type, }: {
100
- type: string;
101
- verb: string;
102
- entity: string;
103
- } & TransformerBaseArgs): string;
104
- declare function transformTypeRequestBody({ type, }: {
105
- type: string;
106
- verb: string;
107
- entity: string;
108
- } & TransformerBaseArgs): string;
109
- declare function transformTypeRequestBodyValue({ type, required, requestContentType, }: {
110
- type: string;
111
- verb: string;
112
- entity: string;
113
- required: boolean;
114
- requestContentType: string;
115
- } & TransformerBaseArgs): string;
116
- declare function transformTypeResponseBody({ type, }: {
117
- type: string;
118
- verb: string;
119
- entity: string;
120
- } & TransformerBaseArgs): string;
121
- declare function transformTypeResponseBodyValue({ type, responseMetadataItems, }: {
122
- type: string;
123
- verb: string;
124
- entity: string;
125
- responseMetadataItems: ResponseMetadataItem[];
126
- } & TransformerBaseArgs): string;
127
- interface Transformer {
128
- moduleName: typeof transformModuleName;
129
- verb: typeof transformVerb;
130
- url: typeof transformUrl;
131
- comment: typeof transformComment;
132
- entity: typeof transformEntity;
133
- fn: typeof transformFn;
134
- type: typeof transformType;
135
- typeValue: typeof transformTypeValue;
136
- typeQuery: typeof transformTypeQuery;
137
- typeQueryValue: typeof transformTypeQueryValue;
138
- typeRequestBody: typeof transformTypeRequestBody;
139
- typeRequestBodyValue: typeof transformTypeRequestBodyValue;
140
- typeResponseBody: typeof transformTypeResponseBody;
141
- typeResponseBodyValue: typeof transformTypeResponseBodyValue;
142
- }
143
- declare function createTransformer(): Transformer;
144
-
145
- interface ApiModuleTemplateData {
146
- /**
147
- * API module metadata
148
- */
149
- apiModule: ApiModule;
150
- /**
151
- * The name of the generated api ts type aggregation file
152
- */
153
- typesFilename: string;
154
- /**
155
- * Whether to generate ts code
156
- */
157
- ts: boolean;
158
- /**
159
- * Whether to generate only types
160
- */
161
- typesOnly: boolean;
162
- }
163
- interface ApiModule {
164
- /**
165
- * The name of the API module
166
- */
167
- name: string;
168
- /**
169
- * API module payloads
170
- */
171
- payloads: ApiModulePayload[];
172
- }
173
- interface ApiModulePayload {
174
- /**
175
- * The comment of the API endpoint, including summary, description, URL, and method.
176
- */
177
- comment: string;
178
- /**
179
- * The name of the API function/dispatcher, such as apiGetUsers, apiCreatePost, apiUpdateComment, etc.
180
- */
181
- fn: string;
182
- /**
183
- * The URL of the API endpoint, such as /users, /posts, /comments, etc.
184
- */
185
- url: string;
186
- /**
187
- * The HTTP method of the API endpoint, such as get, post, put, delete, etc.
188
- */
189
- method: string;
190
- /**
191
- * The HTTP verb of the API endpoint, such as Get, Create, Update, Delete, etc.
192
- */
193
- verb: string;
194
- /**
195
- * The entity name of the API endpoint, such as User, Comment, Post, etc.
196
- */
197
- entity: string;
198
- /**
199
- * The request content type of the API endpoint, such as 'application/json', 'application/x-www-form-urlencoded'.
200
- */
201
- requestContentType?: string;
202
- /**
203
- * The type name of the API endpoint, such as ApiGetUsers, ApiCreatePost, ApiUpdateComment, etc.
204
- */
205
- type: string;
206
- /**
207
- * The value of the type of the API endpoint, such as paths['/users']['get'], paths['/posts']['post'], paths['/comments']['put'], etc.
208
- */
209
- typeValue: string;
210
- /**
211
- * The type name of the query parameters of the API endpoint, such as ApiGetUsersQuery, ApiCreatePostQuery, ApiUpdateCommentQuery, etc.
212
- */
213
- typeQuery: string;
214
- /**
215
- * The value of the type of the query parameters of the API endpoint, such as ApiGetUsersQuery['parameters']['query'], ApiCreatePostQuery['parameters']['query'], ApiUpdateCommentQuery['parameters']['query'], etc.
216
- */
217
- typeQueryValue: string;
218
- /**
219
- * The type name of the request body of the API endpoint, such as ApiGetUsersRequestBody, ApiCreatePostRequestBody, ApiUpdateCommentRequestBody, etc.
220
- */
221
- typeRequestBody: string;
222
- /**
223
- * The value of the type of the request body of the API endpoint, such as ApiGetUsersRequestBody['requestBody']['content']['application/json'], ApiCreatePostRequestBody['requestBody']['content']['application/json'], ApiUpdateCommentRequestBody['requestBody']['content']['application/json'], etc.
224
- */
225
- typeRequestBodyValue: string;
226
- /**
227
- * The type name of the response body of the API endpoint, such as ApiGetUsersResponseBody, ApiCreatePostResponseBody, ApiUpdateCommentResponseBody, etc.
228
- */
229
- typeResponseBody: string;
230
- /**
231
- * The value of the type of the response body of the API endpoint, such as ApiGetUsersResponseBody['responses']['200']['content']['application/json'], ApiCreatePostResponseBody['responses']['201']['content']['application/json'], ApiUpdateCommentResponseBody['responses']['200']['content']['application/json'], etc.
232
- */
233
- typeResponseBodyValue: string;
234
- }
235
- interface GenerateOptions {
236
- /**
237
- * The path to the OpenAPI/Swagger schema file.
238
- * @default './schema.json'
239
- */
240
- input?: string;
241
- /**
242
- * The path to the output directory.
243
- * @default './src/apis/generated'
244
- */
245
- output?: string;
246
- /**
247
- * The base path of the API endpoints.
248
- */
249
- base?: string;
250
- /**
251
- * The filename of the generated openapi types file.
252
- * @default '_types.ts'
253
- */
254
- typesFilename?: string;
255
- /**
256
- * Whether to generate TypeScript code.
257
- * @default true
258
- */
259
- ts?: boolean;
260
- /**
261
- * Whether to generate only types.
262
- * @default false
263
- */
264
- typesOnly?: boolean;
265
- /**
266
- * Whether to override the existing files, or an array of filenames to override.
267
- * @default true
268
- */
269
- overrides?: boolean | string[];
270
- /**
271
- * The preset ejs template to use.
272
- * @default 'axle'
273
- */
274
- preset?: Preset;
275
- /**
276
- * Defines which return status codes will be typed
277
- * @default (status) => status >= 200 && status < 300
278
- */
279
- validateStatus?: (status: number) => boolean;
280
- /**
281
- * The transformer api options, used to override the default transformation rules.
282
- */
283
- transformer?: Partial<Transformer>;
284
- /**
285
- * Certain uncountable nouns that do not change from singular to plural
286
- */
287
- uncountableNouns?: string[];
288
- /**
289
- * Whether to clean the output directory before generating.
290
- * @default false
291
- */
292
- clean?: boolean;
293
- /**
294
- * A function to transform the generated types AST before printing to string.
295
- */
296
- openapiTsOptions?: OpenAPITSOptions;
297
- /**
298
- * Whether to exclude deprecated API endpoints.
299
- * @default false
300
- */
301
- excludeDeprecated?: boolean;
302
- }
303
- declare function transformPayloads(pathItems: Record<string, OperationObject>, options: {
304
- path: string;
305
- fullPath: string;
306
- base: string | undefined;
307
- transformer: Transformer;
308
- uncountableNouns: string[];
309
- validateStatus: (status: number) => boolean;
310
- excludeDeprecated?: boolean;
311
- }): ApiModulePayload[];
312
- declare function partitionApiModules(schema: OpenAPI3, options: {
313
- transformer: Transformer;
314
- base: string | undefined;
315
- uncountableNouns: string[];
316
- validateStatus: (status: number) => boolean;
317
- excludeDeprecated?: boolean;
318
- }): ApiModule[];
319
- declare function renderApiModules(apiModules: ApiModule[], options: {
320
- output: string;
321
- typesFilename: string;
322
- ts: boolean;
323
- typesOnly: boolean;
324
- overrides: boolean | string[];
325
- preset: Preset;
326
- }): Promise<unknown[]>;
327
- declare function generateTypes(schema: OpenAPI3, output: string, typesFilename: string, openapiTsOptions: OpenAPITSOptions): Promise<void>;
328
- declare function generate(userOptions?: GenerateOptions): Promise<void>;
329
-
330
- type Config = GenerateOptions;
331
- declare function defineConfig(config: Config): GenerateOptions;
332
- declare function getConfig(): Promise<Config>;
333
-
334
- export { type ApiModule, type ApiModulePayload, type ApiModuleTemplateData, type Config, type GenerateOptions, type Preset, type ResponseMetadataItem, type StatusCodeStrategy, type StatusCodes, type Transformer, type TransformerBaseArgs, createStatusCodesByStrategy, createTransformer, defineConfig, findObjectKey, generate, generateTypes, getCliVersion, getConfig, getRequestBodyContentType, getResponseMetadataItems, getSchemaNode, isRemoteSchema, isRequiredRequestBody, partitionApiModules, readSchema, readSchemaContent, readTemplateFile, renderApiModules, transformComment, transformEntity, transformFn, transformModuleName, transformPayloads, transformType, transformTypeQuery, transformTypeQueryValue, transformTypeRequestBody, transformTypeRequestBodyValue, transformTypeResponseBody, transformTypeResponseBodyValue, transformTypeValue, transformUrl, transformVerb };