@hey-api/openapi-ts 0.74.0 → 0.75.0
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/bin/index.cjs +7 -1
- package/dist/chunk-D24GAR6J.js +39 -0
- package/dist/chunk-D24GAR6J.js.map +1 -0
- package/dist/clients/core/bodySerializer.ts +1 -1
- package/dist/clients/fetch/client.ts +16 -8
- package/dist/clients/fetch/types.ts +8 -1
- package/dist/clients/fetch/utils.ts +2 -0
- package/dist/clients/next/client.ts +14 -6
- package/dist/clients/next/types.ts +8 -1
- package/dist/clients/next/utils.ts +2 -0
- package/dist/index.cjs +59 -59
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +9 -9
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +1 -1
- package/dist/{types.d-jQzOw4mx.d.cts → types.d-CjrgVCUn.d.cts} +624 -183
- package/dist/{types.d-jQzOw4mx.d.ts → types.d-CjrgVCUn.d.ts} +624 -183
- package/package.json +1 -1
- package/dist/chunk-WELTPW5K.js +0 -39
- package/dist/chunk-WELTPW5K.js.map +0 -1
|
@@ -5093,6 +5093,7 @@ interface XMLObject$1 {
|
|
|
5093
5093
|
}
|
|
5094
5094
|
|
|
5095
5095
|
interface OpenApiV2_0_XTypes {
|
|
5096
|
+
InfoObject: InfoObject$1;
|
|
5096
5097
|
SchemaObject: SchemaObject$1;
|
|
5097
5098
|
}
|
|
5098
5099
|
|
|
@@ -6378,6 +6379,7 @@ type OpenApiSchemaFormats =
|
|
|
6378
6379
|
type Format = JsonSchemaFormats | OpenApiSchemaFormats | (string & {});
|
|
6379
6380
|
|
|
6380
6381
|
interface OpenApiV3_0_XTypes {
|
|
6382
|
+
InfoObject: InfoObject;
|
|
6381
6383
|
ParameterObject: ParameterObject;
|
|
6382
6384
|
ReferenceObject: ReferenceObject;
|
|
6383
6385
|
RequestBodyObject: RequestBodyObject;
|
|
@@ -6386,6 +6388,7 @@ interface OpenApiV3_0_XTypes {
|
|
|
6386
6388
|
}
|
|
6387
6389
|
|
|
6388
6390
|
interface OpenApiV3_1_XTypes {
|
|
6391
|
+
InfoObject: InfoObject$2;
|
|
6389
6392
|
ParameterObject: ParameterObject$2;
|
|
6390
6393
|
ReferenceObject: ReferenceObject$2;
|
|
6391
6394
|
RequestBodyObject: RequestBodyObject$1;
|
|
@@ -6401,6 +6404,14 @@ declare namespace OpenApi {
|
|
|
6401
6404
|
export type V3_1_X = OpenApiV3_1_X;
|
|
6402
6405
|
}
|
|
6403
6406
|
|
|
6407
|
+
declare namespace OpenApiMetaObject {
|
|
6408
|
+
export type V2_0_X = OpenApiV2_0_XTypes['InfoObject'];
|
|
6409
|
+
|
|
6410
|
+
export type V3_0_X = OpenApiV3_0_XTypes['InfoObject'];
|
|
6411
|
+
|
|
6412
|
+
export type V3_1_X = OpenApiV3_1_XTypes['InfoObject'];
|
|
6413
|
+
}
|
|
6414
|
+
|
|
6404
6415
|
declare namespace OpenApiParameterObject {
|
|
6405
6416
|
export type V3_0_X =
|
|
6406
6417
|
| OpenApiV3_0_XTypes['ParameterObject']
|
|
@@ -6439,6 +6450,42 @@ declare namespace OpenApiSchemaObject {
|
|
|
6439
6450
|
export type V3_1_X = OpenApiV3_1_XTypes['SchemaObject'];
|
|
6440
6451
|
}
|
|
6441
6452
|
|
|
6453
|
+
type WalkEvents =
|
|
6454
|
+
| {
|
|
6455
|
+
method: keyof IR.PathItemObject;
|
|
6456
|
+
operation: IR.OperationObject;
|
|
6457
|
+
path: string;
|
|
6458
|
+
type: 'operation';
|
|
6459
|
+
}
|
|
6460
|
+
| {
|
|
6461
|
+
$ref: string;
|
|
6462
|
+
name: string;
|
|
6463
|
+
parameter: IR.ParameterObject;
|
|
6464
|
+
type: 'parameter';
|
|
6465
|
+
}
|
|
6466
|
+
| {
|
|
6467
|
+
$ref: string;
|
|
6468
|
+
name: string;
|
|
6469
|
+
requestBody: IR.RequestBodyObject;
|
|
6470
|
+
type: 'requestBody';
|
|
6471
|
+
}
|
|
6472
|
+
| {
|
|
6473
|
+
$ref: string;
|
|
6474
|
+
name: string;
|
|
6475
|
+
schema: IR.SchemaObject;
|
|
6476
|
+
type: 'schema';
|
|
6477
|
+
}
|
|
6478
|
+
| {
|
|
6479
|
+
server: IR.ServerObject;
|
|
6480
|
+
type: 'server';
|
|
6481
|
+
};
|
|
6482
|
+
|
|
6483
|
+
type WalkEventType = WalkEvents['type'];
|
|
6484
|
+
type WalkEvent<T extends WalkEventType = WalkEventType> = Extract<
|
|
6485
|
+
WalkEvents,
|
|
6486
|
+
{ type: T }
|
|
6487
|
+
>;
|
|
6488
|
+
|
|
6442
6489
|
declare class PluginInstance<PluginConfig extends BaseConfig = BaseConfig> {
|
|
6443
6490
|
config: Plugin.Config<PluginConfig>['config'];
|
|
6444
6491
|
context: IR.Context;
|
|
@@ -6451,6 +6498,33 @@ declare class PluginInstance<PluginConfig extends BaseConfig = BaseConfig> {
|
|
|
6451
6498
|
name: string;
|
|
6452
6499
|
});
|
|
6453
6500
|
createFile(file: IR.ContextFile): TypeScriptFile;
|
|
6501
|
+
/**
|
|
6502
|
+
* Iterates over various input elements as specified by the event types, in
|
|
6503
|
+
* a specific order: servers, schemas, parameters, request bodies, then
|
|
6504
|
+
* operations.
|
|
6505
|
+
*
|
|
6506
|
+
* This ensures, for example, that schemas are always processed before
|
|
6507
|
+
* operations, which may reference them.
|
|
6508
|
+
*
|
|
6509
|
+
* @template T - The event type(s) to yield. Defaults to all event types.
|
|
6510
|
+
* @param events - The event types to walk over. If none are provided, all event types are included.
|
|
6511
|
+
* @param callback - Function to execute for each event.
|
|
6512
|
+
*
|
|
6513
|
+
* @example
|
|
6514
|
+
* // Iterate over all operations and schemas
|
|
6515
|
+
* plugin.forEach('operation', 'schema', (event) => {
|
|
6516
|
+
* if (event.type === 'operation') {
|
|
6517
|
+
* // handle operation
|
|
6518
|
+
* } else if (event.type === 'schema') {
|
|
6519
|
+
* // handle schema
|
|
6520
|
+
* }
|
|
6521
|
+
* });
|
|
6522
|
+
*/
|
|
6523
|
+
forEach<T extends WalkEventType = WalkEventType>(...args: [
|
|
6524
|
+
...events: ReadonlyArray<T>,
|
|
6525
|
+
callback: (event: WalkEvent<T>) => void
|
|
6526
|
+
]): void;
|
|
6527
|
+
private forEachError;
|
|
6454
6528
|
/**
|
|
6455
6529
|
* Retrieves a registered plugin instance by its name from the context. This
|
|
6456
6530
|
* allows plugins to access other plugins that have been registered in the
|
|
@@ -6464,14 +6538,6 @@ declare class PluginInstance<PluginConfig extends BaseConfig = BaseConfig> {
|
|
|
6464
6538
|
* Executes plugin's handler function.
|
|
6465
6539
|
*/
|
|
6466
6540
|
run(): Promise<void>;
|
|
6467
|
-
/**
|
|
6468
|
-
* Subscribe to an input parser event.
|
|
6469
|
-
*
|
|
6470
|
-
* @param event Event type from the parser.
|
|
6471
|
-
* @param callbackFn Function to execute on event.
|
|
6472
|
-
* @returns void
|
|
6473
|
-
*/
|
|
6474
|
-
subscribe<T extends keyof IR.ContextEvents>(event: T, callbackFn: IR.ContextEvents[T]): void;
|
|
6475
6541
|
}
|
|
6476
6542
|
|
|
6477
6543
|
type PluginClientNames =
|
|
@@ -7098,213 +7164,579 @@ interface Config$9 extends Plugin.Name<'@hey-api/typescript'> {
|
|
|
7098
7164
|
}
|
|
7099
7165
|
|
|
7100
7166
|
interface Config$8
|
|
7101
|
-
extends Plugin.Name<'@tanstack/
|
|
7102
|
-
TanStackQuery.Config {
|
|
7167
|
+
extends Plugin.Name<'@tanstack/angular-query-experimental'> {
|
|
7103
7168
|
/**
|
|
7104
|
-
*
|
|
7169
|
+
* The casing convention to use for generated names.
|
|
7105
7170
|
*
|
|
7106
|
-
* @default
|
|
7171
|
+
* @default 'camelCase'
|
|
7107
7172
|
*/
|
|
7108
|
-
|
|
7173
|
+
case?: StringCase;
|
|
7109
7174
|
/**
|
|
7110
|
-
*
|
|
7175
|
+
* Add comments from SDK functions to the generated TanStack Query code?
|
|
7111
7176
|
*
|
|
7112
7177
|
* @default true
|
|
7113
7178
|
*/
|
|
7114
|
-
|
|
7179
|
+
comments?: boolean;
|
|
7180
|
+
/**
|
|
7181
|
+
* Should the exports from the generated files be re-exported in the index barrel file?
|
|
7182
|
+
*
|
|
7183
|
+
* @default false
|
|
7184
|
+
*/
|
|
7185
|
+
exportFromIndex?: boolean;
|
|
7186
|
+
/**
|
|
7187
|
+
* Configuration for generated infinite query key helpers.
|
|
7188
|
+
*
|
|
7189
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions}
|
|
7190
|
+
*/
|
|
7191
|
+
infiniteQueryKeys?:
|
|
7192
|
+
| boolean
|
|
7193
|
+
| string
|
|
7194
|
+
| {
|
|
7195
|
+
case?: StringCase;
|
|
7196
|
+
enabled?: boolean;
|
|
7197
|
+
name?: string | ((name: string) => string);
|
|
7198
|
+
};
|
|
7199
|
+
/**
|
|
7200
|
+
* Configuration for generated infinite query options helpers.
|
|
7201
|
+
*
|
|
7202
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions}
|
|
7203
|
+
*/
|
|
7204
|
+
infiniteQueryOptions?:
|
|
7205
|
+
| boolean
|
|
7206
|
+
| string
|
|
7207
|
+
| {
|
|
7208
|
+
case?: StringCase;
|
|
7209
|
+
enabled?: boolean;
|
|
7210
|
+
name?: string | ((name: string) => string);
|
|
7211
|
+
};
|
|
7212
|
+
/**
|
|
7213
|
+
* Configuration for generated mutation options helpers.
|
|
7214
|
+
*
|
|
7215
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/useMutation}
|
|
7216
|
+
*/
|
|
7217
|
+
mutationOptions?:
|
|
7218
|
+
| boolean
|
|
7219
|
+
| string
|
|
7220
|
+
| {
|
|
7221
|
+
case?: StringCase;
|
|
7222
|
+
enabled?: boolean;
|
|
7223
|
+
name?: string | ((name: string) => string);
|
|
7224
|
+
};
|
|
7115
7225
|
/**
|
|
7116
7226
|
* Name of the generated file.
|
|
7117
7227
|
*
|
|
7118
|
-
* @default '@tanstack/
|
|
7228
|
+
* @default '@tanstack/angular-query-experimental'
|
|
7119
7229
|
*/
|
|
7120
7230
|
output?: string;
|
|
7121
7231
|
/**
|
|
7122
|
-
*
|
|
7123
|
-
* These will be generated from all requests.
|
|
7232
|
+
* Configuration for generated query keys.
|
|
7124
7233
|
*
|
|
7125
|
-
* @
|
|
7234
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/queryKey}
|
|
7126
7235
|
*/
|
|
7127
|
-
|
|
7236
|
+
queryKeys?:
|
|
7237
|
+
| boolean
|
|
7238
|
+
| string
|
|
7239
|
+
| {
|
|
7240
|
+
case?: StringCase;
|
|
7241
|
+
enabled?: boolean;
|
|
7242
|
+
name?: string | ((name: string) => string);
|
|
7243
|
+
};
|
|
7244
|
+
/**
|
|
7245
|
+
* Configuration for generated query options helpers.
|
|
7246
|
+
*
|
|
7247
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/queryOptions}
|
|
7248
|
+
*/
|
|
7249
|
+
queryOptions?:
|
|
7250
|
+
| boolean
|
|
7251
|
+
| string
|
|
7252
|
+
| {
|
|
7253
|
+
case?: StringCase;
|
|
7254
|
+
enabled?: boolean;
|
|
7255
|
+
name?: string | ((name: string) => string);
|
|
7256
|
+
};
|
|
7128
7257
|
}
|
|
7129
7258
|
|
|
7130
|
-
interface Config$7
|
|
7131
|
-
extends Plugin.Name<'@tanstack/solid-query'>,
|
|
7132
|
-
TanStackQuery.Config {
|
|
7259
|
+
interface Config$7 extends Plugin.Name<'@tanstack/react-query'> {
|
|
7133
7260
|
/**
|
|
7134
|
-
*
|
|
7261
|
+
* The casing convention to use for generated names.
|
|
7135
7262
|
*
|
|
7136
|
-
* @default
|
|
7263
|
+
* @default 'camelCase'
|
|
7137
7264
|
*/
|
|
7138
|
-
|
|
7265
|
+
case?: StringCase;
|
|
7139
7266
|
/**
|
|
7140
|
-
*
|
|
7267
|
+
* Add comments from SDK functions to the generated TanStack Query code?
|
|
7268
|
+
* Duplicating comments this way is useful so you don't need to drill into
|
|
7269
|
+
* the underlying SDK function to learn what it does or whether it's
|
|
7270
|
+
* deprecated. You can set this option to `false` if you prefer less
|
|
7271
|
+
* comment duplication.
|
|
7141
7272
|
*
|
|
7142
7273
|
* @default true
|
|
7143
7274
|
*/
|
|
7144
|
-
|
|
7275
|
+
comments?: boolean;
|
|
7276
|
+
/**
|
|
7277
|
+
* Should the exports from the generated files be re-exported in the index
|
|
7278
|
+
* barrel file?
|
|
7279
|
+
*
|
|
7280
|
+
* @default false
|
|
7281
|
+
*/
|
|
7282
|
+
exportFromIndex?: boolean;
|
|
7283
|
+
/**
|
|
7284
|
+
* Configuration for generated infinite query key helpers.
|
|
7285
|
+
*
|
|
7286
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions TanStack Query: infiniteQueryOptions}
|
|
7287
|
+
*
|
|
7288
|
+
* Can be:
|
|
7289
|
+
* - `boolean`: Shorthand for `{ enabled: boolean }`
|
|
7290
|
+
* - `string`: Shorthand for `{ enabled: true; name: string }`
|
|
7291
|
+
* - `object`: Full configuration object
|
|
7292
|
+
*/
|
|
7293
|
+
infiniteQueryKeys?:
|
|
7294
|
+
| boolean
|
|
7295
|
+
| string
|
|
7296
|
+
| {
|
|
7297
|
+
/**
|
|
7298
|
+
* The casing convention to use for generated names.
|
|
7299
|
+
*
|
|
7300
|
+
* @default 'camelCase'
|
|
7301
|
+
*/
|
|
7302
|
+
case?: StringCase;
|
|
7303
|
+
/**
|
|
7304
|
+
* Whether to generate infinite query key helpers.
|
|
7305
|
+
*
|
|
7306
|
+
* @default true
|
|
7307
|
+
*/
|
|
7308
|
+
enabled?: boolean;
|
|
7309
|
+
/**
|
|
7310
|
+
* Custom naming pattern for generated infinite query key names. The name variable is
|
|
7311
|
+
* obtained from the SDK function name.
|
|
7312
|
+
*
|
|
7313
|
+
* @default '{{name}}InfiniteQueryKey'
|
|
7314
|
+
* @see https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions
|
|
7315
|
+
*/
|
|
7316
|
+
name?: string | ((name: string) => string);
|
|
7317
|
+
};
|
|
7318
|
+
/**
|
|
7319
|
+
* Configuration for generated infinite query options helpers.
|
|
7320
|
+
*
|
|
7321
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions TanStack Query: infiniteQueryOptions}
|
|
7322
|
+
*
|
|
7323
|
+
* Can be:
|
|
7324
|
+
* - `boolean`: Shorthand for `{ enabled: boolean }`
|
|
7325
|
+
* - `string`: Shorthand for `{ enabled: true; name: string }`
|
|
7326
|
+
* - `object`: Full configuration object
|
|
7327
|
+
*/
|
|
7328
|
+
infiniteQueryOptions?:
|
|
7329
|
+
| boolean
|
|
7330
|
+
| string
|
|
7331
|
+
| {
|
|
7332
|
+
/**
|
|
7333
|
+
* The casing convention to use for generated names.
|
|
7334
|
+
*
|
|
7335
|
+
* @default 'camelCase'
|
|
7336
|
+
*/
|
|
7337
|
+
case?: StringCase;
|
|
7338
|
+
/**
|
|
7339
|
+
* Whether to generate infinite query options helpers.
|
|
7340
|
+
*
|
|
7341
|
+
* @default true
|
|
7342
|
+
*/
|
|
7343
|
+
enabled?: boolean;
|
|
7344
|
+
/**
|
|
7345
|
+
* Custom naming pattern for generated infinite query options names. The name variable is
|
|
7346
|
+
* obtained from the SDK function name.
|
|
7347
|
+
*
|
|
7348
|
+
* @default '{{name}}InfiniteOptions'
|
|
7349
|
+
* @see https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions
|
|
7350
|
+
*/
|
|
7351
|
+
name?: string | ((name: string) => string);
|
|
7352
|
+
};
|
|
7353
|
+
/**
|
|
7354
|
+
* Configuration for generated mutation options helpers.
|
|
7355
|
+
*
|
|
7356
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation TanStack Query: useMutation}
|
|
7357
|
+
*
|
|
7358
|
+
* Can be:
|
|
7359
|
+
* - `boolean`: Shorthand for `{ enabled: boolean }`
|
|
7360
|
+
* - `string`: Shorthand for `{ enabled: true; name: string }`
|
|
7361
|
+
* - `object`: Full configuration object
|
|
7362
|
+
*/
|
|
7363
|
+
mutationOptions?:
|
|
7364
|
+
| boolean
|
|
7365
|
+
| string
|
|
7366
|
+
| {
|
|
7367
|
+
/**
|
|
7368
|
+
* The casing convention to use for generated names.
|
|
7369
|
+
*
|
|
7370
|
+
* @default 'camelCase'
|
|
7371
|
+
*/
|
|
7372
|
+
case?: StringCase;
|
|
7373
|
+
/**
|
|
7374
|
+
* Whether to generate mutation options helpers.
|
|
7375
|
+
*
|
|
7376
|
+
* @default true
|
|
7377
|
+
*/
|
|
7378
|
+
enabled?: boolean;
|
|
7379
|
+
/**
|
|
7380
|
+
* Custom naming pattern for generated mutation options names. The name variable is
|
|
7381
|
+
* obtained from the SDK function name.
|
|
7382
|
+
*
|
|
7383
|
+
* @default '{{name}}Mutation'
|
|
7384
|
+
* @see https://tanstack.com/query/v5/docs/framework/react/reference/useMutation
|
|
7385
|
+
*/
|
|
7386
|
+
name?: string | ((name: string) => string);
|
|
7387
|
+
};
|
|
7145
7388
|
/**
|
|
7146
7389
|
* Name of the generated file.
|
|
7147
7390
|
*
|
|
7148
|
-
* @default '@tanstack/
|
|
7391
|
+
* @default '@tanstack/react-query'
|
|
7149
7392
|
*/
|
|
7150
7393
|
output?: string;
|
|
7151
7394
|
/**
|
|
7152
|
-
*
|
|
7153
|
-
* These will be generated from all requests.
|
|
7395
|
+
* Configuration for generated query keys.
|
|
7154
7396
|
*
|
|
7155
|
-
* @
|
|
7397
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/react/reference/queryKey TanStack Query: queryKey}
|
|
7398
|
+
*
|
|
7399
|
+
* Can be:
|
|
7400
|
+
* - `boolean`: Shorthand for `{ enabled: boolean }`
|
|
7401
|
+
* - `string`: Shorthand for `{ enabled: true; name: string }`
|
|
7402
|
+
* - `object`: Full configuration object
|
|
7403
|
+
*/
|
|
7404
|
+
queryKeys?:
|
|
7405
|
+
| boolean
|
|
7406
|
+
| string
|
|
7407
|
+
| {
|
|
7408
|
+
/**
|
|
7409
|
+
* The casing convention to use for generated names.
|
|
7410
|
+
*
|
|
7411
|
+
* @default 'camelCase'
|
|
7412
|
+
*/
|
|
7413
|
+
case?: StringCase;
|
|
7414
|
+
/**
|
|
7415
|
+
* Whether to generate query keys.
|
|
7416
|
+
*
|
|
7417
|
+
* @default true
|
|
7418
|
+
*/
|
|
7419
|
+
enabled?: boolean;
|
|
7420
|
+
/**
|
|
7421
|
+
* Custom naming pattern for generated query key names. The name variable is
|
|
7422
|
+
* obtained from the SDK function name.
|
|
7423
|
+
*
|
|
7424
|
+
* @default '{{name}}QueryKey'
|
|
7425
|
+
* @see https://tanstack.com/query/v5/docs/framework/react/reference/queryKey
|
|
7426
|
+
*/
|
|
7427
|
+
name?: string | ((name: string) => string);
|
|
7428
|
+
};
|
|
7429
|
+
/**
|
|
7430
|
+
* Configuration for generated query options helpers.
|
|
7431
|
+
*
|
|
7432
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions TanStack Query: queryOptions}
|
|
7433
|
+
*
|
|
7434
|
+
* Can be:
|
|
7435
|
+
* - `boolean`: Shorthand for `{ enabled: boolean }`
|
|
7436
|
+
* - `string`: Shorthand for `{ enabled: true; name: string }`
|
|
7437
|
+
* - `object`: Full configuration object
|
|
7156
7438
|
*/
|
|
7157
|
-
queryOptions?:
|
|
7439
|
+
queryOptions?:
|
|
7440
|
+
| boolean
|
|
7441
|
+
| string
|
|
7442
|
+
| {
|
|
7443
|
+
/**
|
|
7444
|
+
* The casing convention to use for generated names.
|
|
7445
|
+
*
|
|
7446
|
+
* @default 'camelCase'
|
|
7447
|
+
*/
|
|
7448
|
+
case?: StringCase;
|
|
7449
|
+
/**
|
|
7450
|
+
* Whether to generate query options helpers.
|
|
7451
|
+
*
|
|
7452
|
+
* @default true
|
|
7453
|
+
*/
|
|
7454
|
+
enabled?: boolean;
|
|
7455
|
+
/**
|
|
7456
|
+
* Custom naming pattern for generated query options names. The name variable is
|
|
7457
|
+
* obtained from the SDK function name.
|
|
7458
|
+
*
|
|
7459
|
+
* @default '{{name}}Options'
|
|
7460
|
+
* @see https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions
|
|
7461
|
+
*/
|
|
7462
|
+
name?: string | ((name: string) => string);
|
|
7463
|
+
};
|
|
7158
7464
|
}
|
|
7159
7465
|
|
|
7160
|
-
interface Config$6
|
|
7161
|
-
extends Plugin.Name<'@tanstack/svelte-query'>,
|
|
7162
|
-
TanStackQuery.Config {
|
|
7466
|
+
interface Config$6 extends Plugin.Name<'@tanstack/solid-query'> {
|
|
7163
7467
|
/**
|
|
7164
|
-
*
|
|
7468
|
+
* The casing convention to use for generated names.
|
|
7165
7469
|
*
|
|
7166
|
-
* @default
|
|
7470
|
+
* @default 'camelCase'
|
|
7167
7471
|
*/
|
|
7168
|
-
|
|
7472
|
+
case?: StringCase;
|
|
7169
7473
|
/**
|
|
7170
|
-
*
|
|
7474
|
+
* Add comments from SDK functions to the generated TanStack Query code?
|
|
7171
7475
|
*
|
|
7172
7476
|
* @default true
|
|
7173
7477
|
*/
|
|
7174
|
-
|
|
7478
|
+
comments?: boolean;
|
|
7479
|
+
/**
|
|
7480
|
+
* Should the exports from the generated files be re-exported in the index barrel file?
|
|
7481
|
+
*
|
|
7482
|
+
* @default false
|
|
7483
|
+
*/
|
|
7484
|
+
exportFromIndex?: boolean;
|
|
7485
|
+
/**
|
|
7486
|
+
* Configuration for generated infinite query key helpers.
|
|
7487
|
+
*
|
|
7488
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery}
|
|
7489
|
+
*/
|
|
7490
|
+
infiniteQueryKeys?:
|
|
7491
|
+
| boolean
|
|
7492
|
+
| string
|
|
7493
|
+
| {
|
|
7494
|
+
case?: StringCase;
|
|
7495
|
+
enabled?: boolean;
|
|
7496
|
+
name?: string | ((name: string) => string);
|
|
7497
|
+
};
|
|
7498
|
+
/**
|
|
7499
|
+
* Configuration for generated infinite query options helpers.
|
|
7500
|
+
*
|
|
7501
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery}
|
|
7502
|
+
*/
|
|
7503
|
+
infiniteQueryOptions?:
|
|
7504
|
+
| boolean
|
|
7505
|
+
| string
|
|
7506
|
+
| {
|
|
7507
|
+
case?: StringCase;
|
|
7508
|
+
enabled?: boolean;
|
|
7509
|
+
name?: string | ((name: string) => string);
|
|
7510
|
+
};
|
|
7511
|
+
/**
|
|
7512
|
+
* Configuration for generated mutation options helpers.
|
|
7513
|
+
*
|
|
7514
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation}
|
|
7515
|
+
*/
|
|
7516
|
+
mutationOptions?:
|
|
7517
|
+
| boolean
|
|
7518
|
+
| string
|
|
7519
|
+
| {
|
|
7520
|
+
case?: StringCase;
|
|
7521
|
+
enabled?: boolean;
|
|
7522
|
+
name?: string | ((name: string) => string);
|
|
7523
|
+
};
|
|
7175
7524
|
/**
|
|
7176
7525
|
* Name of the generated file.
|
|
7177
7526
|
*
|
|
7178
|
-
* @default '@tanstack/
|
|
7527
|
+
* @default '@tanstack/solid-query'
|
|
7179
7528
|
*/
|
|
7180
7529
|
output?: string;
|
|
7181
7530
|
/**
|
|
7182
|
-
*
|
|
7183
|
-
* These will be generated from all requests.
|
|
7531
|
+
* Configuration for generated query keys.
|
|
7184
7532
|
*
|
|
7185
|
-
* @
|
|
7533
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/queryKey}
|
|
7534
|
+
*/
|
|
7535
|
+
queryKeys?:
|
|
7536
|
+
| boolean
|
|
7537
|
+
| string
|
|
7538
|
+
| {
|
|
7539
|
+
case?: StringCase;
|
|
7540
|
+
enabled?: boolean;
|
|
7541
|
+
name?: string | ((name: string) => string);
|
|
7542
|
+
};
|
|
7543
|
+
/**
|
|
7544
|
+
* Configuration for generated query options helpers.
|
|
7545
|
+
*
|
|
7546
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createQuery}
|
|
7186
7547
|
*/
|
|
7187
|
-
queryOptions?:
|
|
7548
|
+
queryOptions?:
|
|
7549
|
+
| boolean
|
|
7550
|
+
| string
|
|
7551
|
+
| {
|
|
7552
|
+
case?: StringCase;
|
|
7553
|
+
enabled?: boolean;
|
|
7554
|
+
name?: string | ((name: string) => string);
|
|
7555
|
+
};
|
|
7188
7556
|
}
|
|
7189
7557
|
|
|
7190
|
-
interface Config$5
|
|
7191
|
-
extends Plugin.Name<'@tanstack/vue-query'>,
|
|
7192
|
-
TanStackQuery.Config {
|
|
7558
|
+
interface Config$5 extends Plugin.Name<'@tanstack/svelte-query'> {
|
|
7193
7559
|
/**
|
|
7194
|
-
*
|
|
7560
|
+
* The casing convention to use for generated names.
|
|
7195
7561
|
*
|
|
7196
|
-
* @default
|
|
7562
|
+
* @default 'camelCase'
|
|
7197
7563
|
*/
|
|
7198
|
-
|
|
7564
|
+
case?: StringCase;
|
|
7199
7565
|
/**
|
|
7200
|
-
*
|
|
7566
|
+
* Add comments from SDK functions to the generated TanStack Query code?
|
|
7201
7567
|
*
|
|
7202
7568
|
* @default true
|
|
7203
7569
|
*/
|
|
7204
|
-
|
|
7570
|
+
comments?: boolean;
|
|
7571
|
+
/**
|
|
7572
|
+
* Should the exports from the generated files be re-exported in the index barrel file?
|
|
7573
|
+
*
|
|
7574
|
+
* @default false
|
|
7575
|
+
*/
|
|
7576
|
+
exportFromIndex?: boolean;
|
|
7577
|
+
/**
|
|
7578
|
+
* Configuration for generated infinite query key helpers.
|
|
7579
|
+
*
|
|
7580
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery}
|
|
7581
|
+
*/
|
|
7582
|
+
infiniteQueryKeys?:
|
|
7583
|
+
| boolean
|
|
7584
|
+
| string
|
|
7585
|
+
| {
|
|
7586
|
+
case?: StringCase;
|
|
7587
|
+
enabled?: boolean;
|
|
7588
|
+
name?: string | ((name: string) => string);
|
|
7589
|
+
};
|
|
7590
|
+
/**
|
|
7591
|
+
* Configuration for generated infinite query options helpers.
|
|
7592
|
+
*
|
|
7593
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery}
|
|
7594
|
+
*/
|
|
7595
|
+
infiniteQueryOptions?:
|
|
7596
|
+
| boolean
|
|
7597
|
+
| string
|
|
7598
|
+
| {
|
|
7599
|
+
case?: StringCase;
|
|
7600
|
+
enabled?: boolean;
|
|
7601
|
+
name?: string | ((name: string) => string);
|
|
7602
|
+
};
|
|
7603
|
+
/**
|
|
7604
|
+
* Configuration for generated mutation options helpers.
|
|
7605
|
+
*
|
|
7606
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/createMutation}
|
|
7607
|
+
*/
|
|
7608
|
+
mutationOptions?:
|
|
7609
|
+
| boolean
|
|
7610
|
+
| string
|
|
7611
|
+
| {
|
|
7612
|
+
case?: StringCase;
|
|
7613
|
+
enabled?: boolean;
|
|
7614
|
+
name?: string | ((name: string) => string);
|
|
7615
|
+
};
|
|
7205
7616
|
/**
|
|
7206
7617
|
* Name of the generated file.
|
|
7207
7618
|
*
|
|
7208
|
-
* @default '@tanstack/
|
|
7619
|
+
* @default '@tanstack/svelte-query'
|
|
7209
7620
|
*/
|
|
7210
7621
|
output?: string;
|
|
7211
7622
|
/**
|
|
7212
|
-
*
|
|
7213
|
-
* These will be generated from all requests.
|
|
7623
|
+
* Configuration for generated query keys.
|
|
7214
7624
|
*
|
|
7215
|
-
* @
|
|
7625
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/queryKey}
|
|
7216
7626
|
*/
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7223
|
-
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
*
|
|
7239
|
-
* @default false
|
|
7240
|
-
*/
|
|
7241
|
-
exportFromIndex?: boolean;
|
|
7242
|
-
/**
|
|
7243
|
-
* Customize the generated infinite query key names. The name variable is
|
|
7244
|
-
* obtained from the SDK function name.
|
|
7245
|
-
*
|
|
7246
|
-
* @default '{{name}}InfiniteQueryKey'
|
|
7247
|
-
*/
|
|
7248
|
-
infiniteQueryKeyNameBuilder?: string | ((name: string) => string);
|
|
7249
|
-
/**
|
|
7250
|
-
* Customize the generated infinite query options names. The name variable
|
|
7251
|
-
* is obtained from the SDK function name.
|
|
7252
|
-
*
|
|
7253
|
-
* @default '{{name}}InfiniteOptions'
|
|
7254
|
-
*/
|
|
7255
|
-
infiniteQueryOptionsNameBuilder?: string | ((name: string) => string);
|
|
7256
|
-
/**
|
|
7257
|
-
* Customize the generated mutation options names. The name variable is
|
|
7258
|
-
* obtained from the SDK function name.
|
|
7259
|
-
*
|
|
7260
|
-
* @default '{{name}}Mutation'
|
|
7261
|
-
*/
|
|
7262
|
-
mutationOptionsNameBuilder?: string | ((name: string) => string);
|
|
7263
|
-
/**
|
|
7264
|
-
* Customize the generated query key names. The name variable is obtained
|
|
7265
|
-
* from the SDK function name.
|
|
7266
|
-
*
|
|
7267
|
-
* @default '{{name}}QueryKey'
|
|
7268
|
-
*/
|
|
7269
|
-
queryKeyNameBuilder?: string | ((name: string) => string);
|
|
7270
|
-
/**
|
|
7271
|
-
* Customize the generated query options names. The name variable is
|
|
7272
|
-
* obtained from the SDK function name.
|
|
7273
|
-
*
|
|
7274
|
-
* @default '{{name}}Options'
|
|
7275
|
-
*/
|
|
7276
|
-
queryOptionsNameBuilder?: string | ((name: string) => string);
|
|
7277
|
-
};
|
|
7627
|
+
queryKeys?:
|
|
7628
|
+
| boolean
|
|
7629
|
+
| string
|
|
7630
|
+
| {
|
|
7631
|
+
case?: StringCase;
|
|
7632
|
+
enabled?: boolean;
|
|
7633
|
+
name?: string | ((name: string) => string);
|
|
7634
|
+
};
|
|
7635
|
+
/**
|
|
7636
|
+
* Configuration for generated query options helpers.
|
|
7637
|
+
*
|
|
7638
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/createQuery}
|
|
7639
|
+
*/
|
|
7640
|
+
queryOptions?:
|
|
7641
|
+
| boolean
|
|
7642
|
+
| string
|
|
7643
|
+
| {
|
|
7644
|
+
case?: StringCase;
|
|
7645
|
+
enabled?: boolean;
|
|
7646
|
+
name?: string | ((name: string) => string);
|
|
7647
|
+
};
|
|
7278
7648
|
}
|
|
7279
7649
|
|
|
7280
|
-
interface Config$4
|
|
7281
|
-
extends Plugin.Name<'@tanstack/angular-query-experimental'>,
|
|
7282
|
-
TanStackQuery.Config {
|
|
7650
|
+
interface Config$4 extends Plugin.Name<'@tanstack/vue-query'> {
|
|
7283
7651
|
/**
|
|
7284
|
-
*
|
|
7652
|
+
* The casing convention to use for generated names.
|
|
7285
7653
|
*
|
|
7286
|
-
* @default
|
|
7654
|
+
* @default 'camelCase'
|
|
7287
7655
|
*/
|
|
7288
|
-
|
|
7656
|
+
case?: StringCase;
|
|
7289
7657
|
/**
|
|
7290
|
-
*
|
|
7658
|
+
* Add comments from SDK functions to the generated TanStack Query code?
|
|
7291
7659
|
*
|
|
7292
7660
|
* @default true
|
|
7293
7661
|
*/
|
|
7294
|
-
|
|
7662
|
+
comments?: boolean;
|
|
7663
|
+
/**
|
|
7664
|
+
* Should the exports from the generated files be re-exported in the index barrel file?
|
|
7665
|
+
*
|
|
7666
|
+
* @default false
|
|
7667
|
+
*/
|
|
7668
|
+
exportFromIndex?: boolean;
|
|
7669
|
+
/**
|
|
7670
|
+
* Configuration for generated infinite query key helpers.
|
|
7671
|
+
*
|
|
7672
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions}
|
|
7673
|
+
*/
|
|
7674
|
+
infiniteQueryKeys?:
|
|
7675
|
+
| boolean
|
|
7676
|
+
| string
|
|
7677
|
+
| {
|
|
7678
|
+
case?: StringCase;
|
|
7679
|
+
enabled?: boolean;
|
|
7680
|
+
name?: string | ((name: string) => string);
|
|
7681
|
+
};
|
|
7682
|
+
/**
|
|
7683
|
+
* Configuration for generated infinite query options helpers.
|
|
7684
|
+
*
|
|
7685
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions}
|
|
7686
|
+
*/
|
|
7687
|
+
infiniteQueryOptions?:
|
|
7688
|
+
| boolean
|
|
7689
|
+
| string
|
|
7690
|
+
| {
|
|
7691
|
+
case?: StringCase;
|
|
7692
|
+
enabled?: boolean;
|
|
7693
|
+
name?: string | ((name: string) => string);
|
|
7694
|
+
};
|
|
7695
|
+
/**
|
|
7696
|
+
* Configuration for generated mutation options helpers.
|
|
7697
|
+
*
|
|
7698
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/useMutation}
|
|
7699
|
+
*/
|
|
7700
|
+
mutationOptions?:
|
|
7701
|
+
| boolean
|
|
7702
|
+
| string
|
|
7703
|
+
| {
|
|
7704
|
+
case?: StringCase;
|
|
7705
|
+
enabled?: boolean;
|
|
7706
|
+
name?: string | ((name: string) => string);
|
|
7707
|
+
};
|
|
7295
7708
|
/**
|
|
7296
7709
|
* Name of the generated file.
|
|
7297
7710
|
*
|
|
7298
|
-
* @default '@tanstack/
|
|
7711
|
+
* @default '@tanstack/vue-query'
|
|
7299
7712
|
*/
|
|
7300
7713
|
output?: string;
|
|
7301
7714
|
/**
|
|
7302
|
-
*
|
|
7303
|
-
* These will be generated from all requests.
|
|
7715
|
+
* Configuration for generated query keys.
|
|
7304
7716
|
*
|
|
7305
|
-
* @
|
|
7717
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/queryKey}
|
|
7306
7718
|
*/
|
|
7307
|
-
|
|
7719
|
+
queryKeys?:
|
|
7720
|
+
| boolean
|
|
7721
|
+
| string
|
|
7722
|
+
| {
|
|
7723
|
+
case?: StringCase;
|
|
7724
|
+
enabled?: boolean;
|
|
7725
|
+
name?: string | ((name: string) => string);
|
|
7726
|
+
};
|
|
7727
|
+
/**
|
|
7728
|
+
* Configuration for generated query options helpers.
|
|
7729
|
+
*
|
|
7730
|
+
* See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/queryOptions}
|
|
7731
|
+
*/
|
|
7732
|
+
queryOptions?:
|
|
7733
|
+
| boolean
|
|
7734
|
+
| string
|
|
7735
|
+
| {
|
|
7736
|
+
case?: StringCase;
|
|
7737
|
+
enabled?: boolean;
|
|
7738
|
+
name?: string | ((name: string) => string);
|
|
7739
|
+
};
|
|
7308
7740
|
}
|
|
7309
7741
|
|
|
7310
7742
|
interface Config$3 extends Plugin.Name<'fastify'> {
|
|
@@ -7491,11 +7923,11 @@ interface Config$1 extends Plugin.Name<'zod'> {
|
|
|
7491
7923
|
/**
|
|
7492
7924
|
* User-facing plugin types.
|
|
7493
7925
|
*/
|
|
7494
|
-
type UserPlugins = Plugin.UserConfig<Config$i> | Plugin.UserConfig<Config$l> | Plugin.UserConfig<Config$k> | Plugin.UserConfig<Config$j> | Plugin.UserConfig<Config$h> | Plugin.UserConfig<Config$g> | Plugin.UserConfig<Config$f> | Plugin.UserConfig<Config$e> | Plugin.UserConfig<Config$d> | Plugin.UserConfig<Config$c> | Plugin.UserConfig<Config$b> | Plugin.UserConfig<Config$a> | Plugin.UserConfig<Config$9> | Plugin.UserConfig<Config$
|
|
7926
|
+
type UserPlugins = Plugin.UserConfig<Config$i> | Plugin.UserConfig<Config$l> | Plugin.UserConfig<Config$k> | Plugin.UserConfig<Config$j> | Plugin.UserConfig<Config$h> | Plugin.UserConfig<Config$g> | Plugin.UserConfig<Config$f> | Plugin.UserConfig<Config$e> | Plugin.UserConfig<Config$d> | Plugin.UserConfig<Config$c> | Plugin.UserConfig<Config$b> | Plugin.UserConfig<Config$a> | Plugin.UserConfig<Config$9> | Plugin.UserConfig<Config$8> | Plugin.UserConfig<Config$7> | Plugin.UserConfig<Config$6> | Plugin.UserConfig<Config$5> | Plugin.UserConfig<Config$4> | Plugin.UserConfig<Config$3> | Plugin.UserConfig<Config$2> | Plugin.UserConfig<Config$1>;
|
|
7495
7927
|
/**
|
|
7496
7928
|
* Internal plugin types.
|
|
7497
7929
|
*/
|
|
7498
|
-
type ClientPlugins = Plugin.Config<Config$i> | Plugin.Config<Config$l> | Plugin.Config<Config$k> | Plugin.Config<Config$j> | Plugin.Config<Config$h> | Plugin.Config<Config$g> | Plugin.Config<Config$f> | Plugin.Config<Config$e> | Plugin.Config<Config$d> | Plugin.Config<Config$c> | Plugin.Config<Config$b> | Plugin.Config<Config$a> | Plugin.Config<Config$9> | Plugin.Config<Config$
|
|
7930
|
+
type ClientPlugins = Plugin.Config<Config$i> | Plugin.Config<Config$l> | Plugin.Config<Config$k> | Plugin.Config<Config$j> | Plugin.Config<Config$h> | Plugin.Config<Config$g> | Plugin.Config<Config$f> | Plugin.Config<Config$e> | Plugin.Config<Config$d> | Plugin.Config<Config$c> | Plugin.Config<Config$b> | Plugin.Config<Config$a> | Plugin.Config<Config$9> | Plugin.Config<Config$8> | Plugin.Config<Config$7> | Plugin.Config<Config$6> | Plugin.Config<Config$5> | Plugin.Config<Config$4> | Plugin.Config<Config$3> | Plugin.Config<Config$2> | Plugin.Config<Config$1>;
|
|
7499
7931
|
|
|
7500
7932
|
interface Input {
|
|
7501
7933
|
/**
|
|
@@ -7738,12 +8170,43 @@ interface Filters {
|
|
|
7738
8170
|
}
|
|
7739
8171
|
|
|
7740
8172
|
interface Patch {
|
|
8173
|
+
/**
|
|
8174
|
+
* Patch the OpenAPI meta object in place. Useful for modifying general metadata such as title, description, version, or custom fields before further processing.
|
|
8175
|
+
*
|
|
8176
|
+
* @param meta The OpenAPI meta object for the current version.
|
|
8177
|
+
*/
|
|
8178
|
+
meta?: (
|
|
8179
|
+
meta:
|
|
8180
|
+
| OpenApiMetaObject.V2_0_X
|
|
8181
|
+
| OpenApiMetaObject.V3_0_X
|
|
8182
|
+
| OpenApiMetaObject.V3_1_X,
|
|
8183
|
+
) => void;
|
|
8184
|
+
/**
|
|
8185
|
+
* Patch OpenAPI parameters in place. The key is the parameter name, and the function receives the parameter object to modify directly.
|
|
8186
|
+
*
|
|
8187
|
+
* @example
|
|
8188
|
+
* parameters: {
|
|
8189
|
+
* limit: (parameter) => {
|
|
8190
|
+
* parameter.schema.type = 'integer';
|
|
8191
|
+
* }
|
|
8192
|
+
* }
|
|
8193
|
+
*/
|
|
7741
8194
|
parameters?: Record<
|
|
7742
8195
|
string,
|
|
7743
8196
|
(
|
|
7744
8197
|
parameter: OpenApiParameterObject.V3_0_X | OpenApiParameterObject.V3_1_X,
|
|
7745
8198
|
) => void
|
|
7746
8199
|
>;
|
|
8200
|
+
/**
|
|
8201
|
+
* Patch OpenAPI request bodies in place. The key is the request body name, and the function receives the request body object to modify directly.
|
|
8202
|
+
*
|
|
8203
|
+
* @example
|
|
8204
|
+
* requestBodies: {
|
|
8205
|
+
* CreateUserRequest: (requestBody) => {
|
|
8206
|
+
* requestBody.required = true;
|
|
8207
|
+
* }
|
|
8208
|
+
* }
|
|
8209
|
+
*/
|
|
7747
8210
|
requestBodies?: Record<
|
|
7748
8211
|
string,
|
|
7749
8212
|
(
|
|
@@ -7752,6 +8215,16 @@ interface Patch {
|
|
|
7752
8215
|
| OpenApiRequestBodyObject.V3_1_X,
|
|
7753
8216
|
) => void
|
|
7754
8217
|
>;
|
|
8218
|
+
/**
|
|
8219
|
+
* Patch OpenAPI responses in place. The key is the response name, and the function receives the response object to modify directly.
|
|
8220
|
+
*
|
|
8221
|
+
* @example
|
|
8222
|
+
* responses: {
|
|
8223
|
+
* NotFound: (response) => {
|
|
8224
|
+
* response.description = 'Resource not found.';
|
|
8225
|
+
* }
|
|
8226
|
+
* }
|
|
8227
|
+
*/
|
|
7755
8228
|
responses?: Record<
|
|
7756
8229
|
string,
|
|
7757
8230
|
(
|
|
@@ -7795,6 +8268,17 @@ interface Patch {
|
|
|
7795
8268
|
| OpenApiSchemaObject.V3_1_X,
|
|
7796
8269
|
) => void
|
|
7797
8270
|
>;
|
|
8271
|
+
/**
|
|
8272
|
+
* Patch the OpenAPI version string. The function receives the current version and should return the new version string.
|
|
8273
|
+
* Useful for normalizing or overriding the version value before further processing.
|
|
8274
|
+
*
|
|
8275
|
+
* @param version The current OpenAPI version string.
|
|
8276
|
+
* @returns The new version string to use.
|
|
8277
|
+
*
|
|
8278
|
+
* @example
|
|
8279
|
+
* version: (version) => version.replace(/^v/, '')
|
|
8280
|
+
*/
|
|
8281
|
+
version?: (version: string) => string;
|
|
7798
8282
|
}
|
|
7799
8283
|
|
|
7800
8284
|
interface Watch {
|
|
@@ -8203,39 +8687,6 @@ interface ContextFile {
|
|
|
8203
8687
|
*/
|
|
8204
8688
|
path: string;
|
|
8205
8689
|
}
|
|
8206
|
-
interface Events {
|
|
8207
|
-
/**
|
|
8208
|
-
* Called after parsing.
|
|
8209
|
-
*/
|
|
8210
|
-
after: () => void;
|
|
8211
|
-
/**
|
|
8212
|
-
* Called before parsing.
|
|
8213
|
-
*/
|
|
8214
|
-
before: () => void;
|
|
8215
|
-
operation: (args: {
|
|
8216
|
-
method: keyof IR.PathItemObject;
|
|
8217
|
-
operation: IR.OperationObject;
|
|
8218
|
-
path: string;
|
|
8219
|
-
}) => void;
|
|
8220
|
-
parameter: (args: {
|
|
8221
|
-
$ref: string;
|
|
8222
|
-
name: string;
|
|
8223
|
-
parameter: IR.ParameterObject;
|
|
8224
|
-
}) => void;
|
|
8225
|
-
requestBody: (args: {
|
|
8226
|
-
$ref: string;
|
|
8227
|
-
name: string;
|
|
8228
|
-
requestBody: IR.RequestBodyObject;
|
|
8229
|
-
}) => void;
|
|
8230
|
-
schema: (args: {
|
|
8231
|
-
$ref: string;
|
|
8232
|
-
name: string;
|
|
8233
|
-
schema: IR.SchemaObject;
|
|
8234
|
-
}) => void;
|
|
8235
|
-
server: (args: {
|
|
8236
|
-
server: IR.ServerObject;
|
|
8237
|
-
}) => void;
|
|
8238
|
-
}
|
|
8239
8690
|
declare class IRContext<Spec extends Record<string, any> = any> {
|
|
8240
8691
|
/**
|
|
8241
8692
|
* Configuration for parsing and generating the output. This
|
|
@@ -8260,18 +8711,10 @@ declare class IRContext<Spec extends Record<string, any> = any> {
|
|
|
8260
8711
|
* Resolved specification from `input`.
|
|
8261
8712
|
*/
|
|
8262
8713
|
spec: Spec;
|
|
8263
|
-
/**
|
|
8264
|
-
* A map of event listeners.
|
|
8265
|
-
*/
|
|
8266
|
-
private listeners;
|
|
8267
8714
|
constructor({ config, spec }: {
|
|
8268
8715
|
config: Config;
|
|
8269
8716
|
spec: Spec;
|
|
8270
8717
|
});
|
|
8271
|
-
/**
|
|
8272
|
-
* Notify all event listeners about `event`.
|
|
8273
|
-
*/
|
|
8274
|
-
broadcast<T extends keyof Events>(event: T, ...args: Parameters<Events[T]>): Promise<void>;
|
|
8275
8718
|
/**
|
|
8276
8719
|
* Create and return a new TypeScript file. Also set the current file context
|
|
8277
8720
|
* to the newly created file.
|
|
@@ -8295,19 +8738,18 @@ declare class IRContext<Spec extends Record<string, any> = any> {
|
|
|
8295
8738
|
*/
|
|
8296
8739
|
private registerPlugin;
|
|
8297
8740
|
/**
|
|
8298
|
-
*
|
|
8299
|
-
*
|
|
8741
|
+
* Registers all plugins in the order specified by the configuration and returns
|
|
8742
|
+
* an array of the registered PluginInstance objects. Each plugin is instantiated
|
|
8743
|
+
* and added to the context's plugins map.
|
|
8744
|
+
*
|
|
8745
|
+
* @returns {ReadonlyArray<PluginInstance>} An array of registered plugin instances in order.
|
|
8300
8746
|
*/
|
|
8301
|
-
registerPlugins():
|
|
8747
|
+
registerPlugins(): ReadonlyArray<PluginInstance>;
|
|
8302
8748
|
resolveIrRef<T>($ref: string): T;
|
|
8303
8749
|
/**
|
|
8304
8750
|
* Returns a resolved reference from `spec`.
|
|
8305
8751
|
*/
|
|
8306
8752
|
resolveRef<T>($ref: string): T;
|
|
8307
|
-
/**
|
|
8308
|
-
* Register a new `event` listener.
|
|
8309
|
-
*/
|
|
8310
|
-
subscribe<T extends keyof Events>(event: T, callbackFn: Events[T], pluginName: string): void;
|
|
8311
8753
|
}
|
|
8312
8754
|
|
|
8313
8755
|
type IRMediaType = 'form-data' | 'json' | 'text' | 'url-search-params' | 'octet-stream';
|
|
@@ -8523,7 +8965,6 @@ declare namespace IR {
|
|
|
8523
8965
|
export type BodyObject = IRBodyObject;
|
|
8524
8966
|
export type ComponentsObject = IRComponentsObject;
|
|
8525
8967
|
export type Context<Spec extends Record<string, any> = any> = IRContext<Spec>;
|
|
8526
|
-
export type ContextEvents = Events;
|
|
8527
8968
|
export type ContextFile = ContextFile;
|
|
8528
8969
|
export type Model = IRModel;
|
|
8529
8970
|
export type OperationObject = IROperationObject;
|