@hey-api/openapi-ts 0.63.1 → 0.64.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/dist/index.d.cts CHANGED
@@ -6441,41 +6441,6 @@ interface Meta<Config extends BaseConfig> {
6441
6441
  _tags?: ReadonlyArray<PluginTag>;
6442
6442
  }
6443
6443
 
6444
- /**
6445
- * Public Client API.
6446
- */
6447
- declare namespace Client {
6448
- export type Config = {
6449
- /**
6450
- * Bundle the client module? Set this to true if don't want to declare it
6451
- * as a separate dependency. When true, the client module will be generated
6452
- * from the client package and bundled with the rest of the generated output.
6453
- * This is useful if you're repackaging the output, publishing it to other
6454
- * users, and you don't want them to install any dependencies.
6455
- *
6456
- * @default false
6457
- */
6458
- bundle?: boolean;
6459
- /**
6460
- * Name of the generated file.
6461
- *
6462
- * @default 'client'
6463
- */
6464
- output?: string;
6465
- /**
6466
- * Relative path to the runtime configuration file. This file must export
6467
- * a `createClientConfig()` function. The `createClientConfig()` function
6468
- * will be called on client initialization and the returned object will
6469
- * become the client's initial configuration.
6470
- *
6471
- * You may want to initialize your client this way instead of calling
6472
- * `setConfig()`. This is useful for example if you're using Next.js
6473
- * to ensure your client always has the correct values.
6474
- */
6475
- runtimeConfigPath?: string;
6476
- };
6477
- }
6478
-
6479
6444
  /**
6480
6445
  * Public Plugin API.
6481
6446
  */
@@ -6502,10 +6467,10 @@ declare namespace Plugin {
6502
6467
  /**
6503
6468
  * Plugin implementation for experimental parser.
6504
6469
  */
6505
- export type Handler<Config extends BaseConfig> = (args: {
6470
+ export type Handler<Config extends BaseConfig, ReturnType = void> = (args: {
6506
6471
  context: IR.Context<OpenApi.V2_0_X | OpenApi.V3_0_X | OpenApi.V3_1_X>;
6507
6472
  plugin: Plugin.Instance<Config>;
6508
- }) => void;
6473
+ }) => ReturnType;
6509
6474
 
6510
6475
  export type Instance<Config extends BaseConfig> = OmitUnderscoreKeys<Config> &
6511
6476
  Pick<Required<BaseConfig>, 'exportFromIndex' | 'output'>;
@@ -6533,7 +6498,7 @@ declare namespace Plugin {
6533
6498
  }
6534
6499
 
6535
6500
  interface Config$k
6536
- extends Plugin.Name<'@hey-api/client-axios'>,
6501
+ extends Plugin.Name<'@hey-api/client-fetch'>,
6537
6502
  Client.Config {
6538
6503
  /**
6539
6504
  * Throw an error instead of returning it in the response?
@@ -6544,7 +6509,7 @@ interface Config$k
6544
6509
  }
6545
6510
 
6546
6511
  interface Config$j
6547
- extends Plugin.Name<'@hey-api/client-fetch'>,
6512
+ extends Plugin.Name<'@hey-api/client-next'>,
6548
6513
  Client.Config {
6549
6514
  /**
6550
6515
  * Throw an error instead of returning it in the response?
@@ -6555,7 +6520,71 @@ interface Config$j
6555
6520
  }
6556
6521
 
6557
6522
  interface Config$i
6558
- extends Plugin.Name<'@hey-api/client-next'>,
6523
+ extends Plugin.Name<'@hey-api/client-nuxt'>,
6524
+ Client.Config {}
6525
+
6526
+ /**
6527
+ * Public Client API.
6528
+ */
6529
+ declare namespace Client {
6530
+ export type Config = {
6531
+ /**
6532
+ * Set a default base URL when creating the client? You can set `baseUrl`
6533
+ * to a string which will be used as the base URL. If your input defines
6534
+ * server(s), you can set `baseUrl` to a number to pick a specific server
6535
+ * to use as the base URL. You can disable setting the base URL by setting
6536
+ * `baseUrl` to `false`. By default, `baseUrl` is `true` and it will try to
6537
+ * use the first defined server value. If there's none, we won't set a
6538
+ * base URL.
6539
+ *
6540
+ * If the matched URL contains template literals, it will be ignored.
6541
+ *
6542
+ * @default true
6543
+ */
6544
+ baseUrl?: string | number | boolean;
6545
+ /**
6546
+ * Bundle the client module? Set this to true if don't want to declare it
6547
+ * as a separate dependency. When true, the client module will be generated
6548
+ * from the client package and bundled with the rest of the generated output.
6549
+ * This is useful if you're repackaging the output, publishing it to other
6550
+ * users, and you don't want them to install any dependencies.
6551
+ *
6552
+ * @default false
6553
+ */
6554
+ bundle?: boolean;
6555
+ /**
6556
+ * Name of the generated file.
6557
+ *
6558
+ * @default 'client'
6559
+ */
6560
+ output?: string;
6561
+ /**
6562
+ * Relative path to the runtime configuration file. This file must export
6563
+ * a `createClientConfig()` function. The `createClientConfig()` function
6564
+ * will be called on client initialization and the returned object will
6565
+ * become the client's initial configuration.
6566
+ *
6567
+ * You may want to initialize your client this way instead of calling
6568
+ * `setConfig()`. This is useful for example if you're using Next.js
6569
+ * to ensure your client always has the correct values.
6570
+ */
6571
+ runtimeConfigPath?: string;
6572
+ /**
6573
+ * Should the type helper for base URL allow only values matching the
6574
+ * server(s) defined in the input? By default, `strictBaseUrl` is `false`
6575
+ * which will provide type hints and allow you to pass any string.
6576
+ *
6577
+ * Note that setting `strictBaseUrl` to `true` can produce an invalid
6578
+ * build if you specify `baseUrl` which doesn't conform to the type helper.
6579
+ *
6580
+ * @default false
6581
+ */
6582
+ strictBaseUrl?: boolean;
6583
+ };
6584
+ }
6585
+
6586
+ interface Config$h
6587
+ extends Plugin.Name<'@hey-api/client-axios'>,
6559
6588
  Client.Config {
6560
6589
  /**
6561
6590
  * Throw an error instead of returning it in the response?
@@ -6565,10 +6594,6 @@ interface Config$i
6565
6594
  throwOnError?: boolean;
6566
6595
  }
6567
6596
 
6568
- interface Config$h
6569
- extends Plugin.Name<'@hey-api/client-nuxt'>,
6570
- Client.Config {}
6571
-
6572
6597
  interface Config$g
6573
6598
  extends Plugin.Name<'legacy/angular'>,
6574
6599
  Pick<Client.Config, 'output'> {}
@@ -6993,11 +7018,11 @@ interface Config$1 extends Plugin.Name<'zod'> {
6993
7018
  /**
6994
7019
  * User-facing plugin types.
6995
7020
  */
6996
- type UserPlugins = Plugin.UserConfig<Config$k> | Plugin.UserConfig<Config$j> | Plugin.UserConfig<Config$i> | 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>;
7021
+ type UserPlugins = Plugin.UserConfig<Config$h> | Plugin.UserConfig<Config$k> | Plugin.UserConfig<Config$j> | Plugin.UserConfig<Config$i> | 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>;
6997
7022
  /**
6998
7023
  * Internal plugin types.
6999
7024
  */
7000
- type ClientPlugins = Plugin.Config<Config$k> | Plugin.Config<Config$j> | Plugin.Config<Config$i> | 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>;
7025
+ type ClientPlugins = Plugin.Config<Config$h> | Plugin.Config<Config$k> | Plugin.Config<Config$j> | Plugin.Config<Config$i> | 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>;
7001
7026
 
7002
7027
  type Formatters = 'biome' | 'prettier';
7003
7028
  type Linters = 'biome' | 'eslint' | 'oxlint';
@@ -7375,6 +7400,9 @@ interface Events {
7375
7400
  name: string;
7376
7401
  schema: IR.SchemaObject;
7377
7402
  }) => void;
7403
+ server: (args: {
7404
+ server: IR.ServerObject;
7405
+ }) => void;
7378
7406
  }
7379
7407
  declare class IRContext<Spec extends Record<string, any> = any> {
7380
7408
  /**
@@ -7428,27 +7456,24 @@ declare class IRContext<Spec extends Record<string, any> = any> {
7428
7456
 
7429
7457
  type IRMediaType = 'form-data' | 'json' | 'text' | 'url-search-params';
7430
7458
 
7459
+ interface IRBodyObject {
7460
+ mediaType: string;
7461
+ /**
7462
+ * Does body control pagination? We handle only simple values
7463
+ * for now, up to 1 nested field.
7464
+ */
7465
+ pagination?: boolean | string;
7466
+ required?: boolean;
7467
+ schema: IRSchemaObject;
7468
+ type?: IRMediaType;
7469
+ }
7470
+
7431
7471
  interface IRComponentsObject {
7432
7472
  parameters?: Record<string, IRParameterObject>;
7433
7473
  requestBodies?: Record<string, IRRequestBodyObject>;
7434
7474
  schemas?: Record<string, IRSchemaObject>;
7435
7475
  }
7436
7476
 
7437
- interface IRPathsObject {
7438
- [path: `/${string}`]: IRPathItemObject;
7439
- }
7440
-
7441
- interface IRPathItemObject {
7442
- delete?: IROperationObject;
7443
- get?: IROperationObject;
7444
- head?: IROperationObject;
7445
- options?: IROperationObject;
7446
- patch?: IROperationObject;
7447
- post?: IROperationObject;
7448
- put?: IROperationObject;
7449
- trace?: IROperationObject;
7450
- }
7451
-
7452
7477
  interface IROperationObject {
7453
7478
  body?: IRBodyObject;
7454
7479
  deprecated?: boolean;
@@ -7459,24 +7484,11 @@ interface IROperationObject {
7459
7484
  path: keyof IRPathsObject;
7460
7485
  responses?: IRResponsesObject;
7461
7486
  security?: ReadonlyArray<IRSecurityObject>;
7462
- // TODO: parser - add more properties
7463
- // servers?: ReadonlyArray<ServerObject>;
7487
+ servers?: ReadonlyArray<IRServerObject>;
7464
7488
  summary?: string;
7465
7489
  tags?: ReadonlyArray<string>;
7466
7490
  }
7467
7491
 
7468
- interface IRBodyObject {
7469
- mediaType: string;
7470
- /**
7471
- * Does body control pagination? We handle only simple values
7472
- * for now, up to 1 nested field.
7473
- */
7474
- pagination?: boolean | string;
7475
- required?: boolean;
7476
- schema: IRSchemaObject;
7477
- type?: IRMediaType;
7478
- }
7479
-
7480
7492
  interface IRParametersObject {
7481
7493
  cookie?: Record<string, IRParameterObject>;
7482
7494
  header?: Record<string, IRParameterObject>;
@@ -7519,6 +7531,21 @@ interface IRParameterObject
7519
7531
  | 'spaceDelimited';
7520
7532
  }
7521
7533
 
7534
+ interface IRPathsObject {
7535
+ [path: `/${string}`]: IRPathItemObject;
7536
+ }
7537
+
7538
+ interface IRPathItemObject {
7539
+ delete?: IROperationObject;
7540
+ get?: IROperationObject;
7541
+ head?: IROperationObject;
7542
+ options?: IROperationObject;
7543
+ patch?: IROperationObject;
7544
+ post?: IROperationObject;
7545
+ put?: IROperationObject;
7546
+ trace?: IROperationObject;
7547
+ }
7548
+
7522
7549
  interface IRRequestBodyObject
7523
7550
  extends Pick<JsonSchemaDraft2020_12, 'description'> {
7524
7551
  required?: boolean;
@@ -7613,9 +7640,12 @@ interface IRSchemaObject
7613
7640
 
7614
7641
  type IRSecurityObject = SecuritySchemeObject$2;
7615
7642
 
7643
+ type IRServerObject = ServerObject$1;
7644
+
7616
7645
  interface IRModel {
7617
7646
  components?: IRComponentsObject;
7618
7647
  paths?: IRPathsObject;
7648
+ servers?: ReadonlyArray<IRServerObject>;
7619
7649
  }
7620
7650
 
7621
7651
  declare namespace IR {
@@ -7633,6 +7663,7 @@ declare namespace IR {
7633
7663
  export type ResponsesObject = IRResponsesObject;
7634
7664
  export type SchemaObject = IRSchemaObject;
7635
7665
  export type SecurityObject = IRSecurityObject;
7666
+ export type ServerObject = IRServerObject;
7636
7667
  }
7637
7668
 
7638
7669
  declare namespace LegacyIR {
package/dist/index.d.ts CHANGED
@@ -6441,41 +6441,6 @@ interface Meta<Config extends BaseConfig> {
6441
6441
  _tags?: ReadonlyArray<PluginTag>;
6442
6442
  }
6443
6443
 
6444
- /**
6445
- * Public Client API.
6446
- */
6447
- declare namespace Client {
6448
- export type Config = {
6449
- /**
6450
- * Bundle the client module? Set this to true if don't want to declare it
6451
- * as a separate dependency. When true, the client module will be generated
6452
- * from the client package and bundled with the rest of the generated output.
6453
- * This is useful if you're repackaging the output, publishing it to other
6454
- * users, and you don't want them to install any dependencies.
6455
- *
6456
- * @default false
6457
- */
6458
- bundle?: boolean;
6459
- /**
6460
- * Name of the generated file.
6461
- *
6462
- * @default 'client'
6463
- */
6464
- output?: string;
6465
- /**
6466
- * Relative path to the runtime configuration file. This file must export
6467
- * a `createClientConfig()` function. The `createClientConfig()` function
6468
- * will be called on client initialization and the returned object will
6469
- * become the client's initial configuration.
6470
- *
6471
- * You may want to initialize your client this way instead of calling
6472
- * `setConfig()`. This is useful for example if you're using Next.js
6473
- * to ensure your client always has the correct values.
6474
- */
6475
- runtimeConfigPath?: string;
6476
- };
6477
- }
6478
-
6479
6444
  /**
6480
6445
  * Public Plugin API.
6481
6446
  */
@@ -6502,10 +6467,10 @@ declare namespace Plugin {
6502
6467
  /**
6503
6468
  * Plugin implementation for experimental parser.
6504
6469
  */
6505
- export type Handler<Config extends BaseConfig> = (args: {
6470
+ export type Handler<Config extends BaseConfig, ReturnType = void> = (args: {
6506
6471
  context: IR.Context<OpenApi.V2_0_X | OpenApi.V3_0_X | OpenApi.V3_1_X>;
6507
6472
  plugin: Plugin.Instance<Config>;
6508
- }) => void;
6473
+ }) => ReturnType;
6509
6474
 
6510
6475
  export type Instance<Config extends BaseConfig> = OmitUnderscoreKeys<Config> &
6511
6476
  Pick<Required<BaseConfig>, 'exportFromIndex' | 'output'>;
@@ -6533,7 +6498,7 @@ declare namespace Plugin {
6533
6498
  }
6534
6499
 
6535
6500
  interface Config$k
6536
- extends Plugin.Name<'@hey-api/client-axios'>,
6501
+ extends Plugin.Name<'@hey-api/client-fetch'>,
6537
6502
  Client.Config {
6538
6503
  /**
6539
6504
  * Throw an error instead of returning it in the response?
@@ -6544,7 +6509,7 @@ interface Config$k
6544
6509
  }
6545
6510
 
6546
6511
  interface Config$j
6547
- extends Plugin.Name<'@hey-api/client-fetch'>,
6512
+ extends Plugin.Name<'@hey-api/client-next'>,
6548
6513
  Client.Config {
6549
6514
  /**
6550
6515
  * Throw an error instead of returning it in the response?
@@ -6555,7 +6520,71 @@ interface Config$j
6555
6520
  }
6556
6521
 
6557
6522
  interface Config$i
6558
- extends Plugin.Name<'@hey-api/client-next'>,
6523
+ extends Plugin.Name<'@hey-api/client-nuxt'>,
6524
+ Client.Config {}
6525
+
6526
+ /**
6527
+ * Public Client API.
6528
+ */
6529
+ declare namespace Client {
6530
+ export type Config = {
6531
+ /**
6532
+ * Set a default base URL when creating the client? You can set `baseUrl`
6533
+ * to a string which will be used as the base URL. If your input defines
6534
+ * server(s), you can set `baseUrl` to a number to pick a specific server
6535
+ * to use as the base URL. You can disable setting the base URL by setting
6536
+ * `baseUrl` to `false`. By default, `baseUrl` is `true` and it will try to
6537
+ * use the first defined server value. If there's none, we won't set a
6538
+ * base URL.
6539
+ *
6540
+ * If the matched URL contains template literals, it will be ignored.
6541
+ *
6542
+ * @default true
6543
+ */
6544
+ baseUrl?: string | number | boolean;
6545
+ /**
6546
+ * Bundle the client module? Set this to true if don't want to declare it
6547
+ * as a separate dependency. When true, the client module will be generated
6548
+ * from the client package and bundled with the rest of the generated output.
6549
+ * This is useful if you're repackaging the output, publishing it to other
6550
+ * users, and you don't want them to install any dependencies.
6551
+ *
6552
+ * @default false
6553
+ */
6554
+ bundle?: boolean;
6555
+ /**
6556
+ * Name of the generated file.
6557
+ *
6558
+ * @default 'client'
6559
+ */
6560
+ output?: string;
6561
+ /**
6562
+ * Relative path to the runtime configuration file. This file must export
6563
+ * a `createClientConfig()` function. The `createClientConfig()` function
6564
+ * will be called on client initialization and the returned object will
6565
+ * become the client's initial configuration.
6566
+ *
6567
+ * You may want to initialize your client this way instead of calling
6568
+ * `setConfig()`. This is useful for example if you're using Next.js
6569
+ * to ensure your client always has the correct values.
6570
+ */
6571
+ runtimeConfigPath?: string;
6572
+ /**
6573
+ * Should the type helper for base URL allow only values matching the
6574
+ * server(s) defined in the input? By default, `strictBaseUrl` is `false`
6575
+ * which will provide type hints and allow you to pass any string.
6576
+ *
6577
+ * Note that setting `strictBaseUrl` to `true` can produce an invalid
6578
+ * build if you specify `baseUrl` which doesn't conform to the type helper.
6579
+ *
6580
+ * @default false
6581
+ */
6582
+ strictBaseUrl?: boolean;
6583
+ };
6584
+ }
6585
+
6586
+ interface Config$h
6587
+ extends Plugin.Name<'@hey-api/client-axios'>,
6559
6588
  Client.Config {
6560
6589
  /**
6561
6590
  * Throw an error instead of returning it in the response?
@@ -6565,10 +6594,6 @@ interface Config$i
6565
6594
  throwOnError?: boolean;
6566
6595
  }
6567
6596
 
6568
- interface Config$h
6569
- extends Plugin.Name<'@hey-api/client-nuxt'>,
6570
- Client.Config {}
6571
-
6572
6597
  interface Config$g
6573
6598
  extends Plugin.Name<'legacy/angular'>,
6574
6599
  Pick<Client.Config, 'output'> {}
@@ -6993,11 +7018,11 @@ interface Config$1 extends Plugin.Name<'zod'> {
6993
7018
  /**
6994
7019
  * User-facing plugin types.
6995
7020
  */
6996
- type UserPlugins = Plugin.UserConfig<Config$k> | Plugin.UserConfig<Config$j> | Plugin.UserConfig<Config$i> | 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>;
7021
+ type UserPlugins = Plugin.UserConfig<Config$h> | Plugin.UserConfig<Config$k> | Plugin.UserConfig<Config$j> | Plugin.UserConfig<Config$i> | 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>;
6997
7022
  /**
6998
7023
  * Internal plugin types.
6999
7024
  */
7000
- type ClientPlugins = Plugin.Config<Config$k> | Plugin.Config<Config$j> | Plugin.Config<Config$i> | 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>;
7025
+ type ClientPlugins = Plugin.Config<Config$h> | Plugin.Config<Config$k> | Plugin.Config<Config$j> | Plugin.Config<Config$i> | 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>;
7001
7026
 
7002
7027
  type Formatters = 'biome' | 'prettier';
7003
7028
  type Linters = 'biome' | 'eslint' | 'oxlint';
@@ -7375,6 +7400,9 @@ interface Events {
7375
7400
  name: string;
7376
7401
  schema: IR.SchemaObject;
7377
7402
  }) => void;
7403
+ server: (args: {
7404
+ server: IR.ServerObject;
7405
+ }) => void;
7378
7406
  }
7379
7407
  declare class IRContext<Spec extends Record<string, any> = any> {
7380
7408
  /**
@@ -7428,27 +7456,24 @@ declare class IRContext<Spec extends Record<string, any> = any> {
7428
7456
 
7429
7457
  type IRMediaType = 'form-data' | 'json' | 'text' | 'url-search-params';
7430
7458
 
7459
+ interface IRBodyObject {
7460
+ mediaType: string;
7461
+ /**
7462
+ * Does body control pagination? We handle only simple values
7463
+ * for now, up to 1 nested field.
7464
+ */
7465
+ pagination?: boolean | string;
7466
+ required?: boolean;
7467
+ schema: IRSchemaObject;
7468
+ type?: IRMediaType;
7469
+ }
7470
+
7431
7471
  interface IRComponentsObject {
7432
7472
  parameters?: Record<string, IRParameterObject>;
7433
7473
  requestBodies?: Record<string, IRRequestBodyObject>;
7434
7474
  schemas?: Record<string, IRSchemaObject>;
7435
7475
  }
7436
7476
 
7437
- interface IRPathsObject {
7438
- [path: `/${string}`]: IRPathItemObject;
7439
- }
7440
-
7441
- interface IRPathItemObject {
7442
- delete?: IROperationObject;
7443
- get?: IROperationObject;
7444
- head?: IROperationObject;
7445
- options?: IROperationObject;
7446
- patch?: IROperationObject;
7447
- post?: IROperationObject;
7448
- put?: IROperationObject;
7449
- trace?: IROperationObject;
7450
- }
7451
-
7452
7477
  interface IROperationObject {
7453
7478
  body?: IRBodyObject;
7454
7479
  deprecated?: boolean;
@@ -7459,24 +7484,11 @@ interface IROperationObject {
7459
7484
  path: keyof IRPathsObject;
7460
7485
  responses?: IRResponsesObject;
7461
7486
  security?: ReadonlyArray<IRSecurityObject>;
7462
- // TODO: parser - add more properties
7463
- // servers?: ReadonlyArray<ServerObject>;
7487
+ servers?: ReadonlyArray<IRServerObject>;
7464
7488
  summary?: string;
7465
7489
  tags?: ReadonlyArray<string>;
7466
7490
  }
7467
7491
 
7468
- interface IRBodyObject {
7469
- mediaType: string;
7470
- /**
7471
- * Does body control pagination? We handle only simple values
7472
- * for now, up to 1 nested field.
7473
- */
7474
- pagination?: boolean | string;
7475
- required?: boolean;
7476
- schema: IRSchemaObject;
7477
- type?: IRMediaType;
7478
- }
7479
-
7480
7492
  interface IRParametersObject {
7481
7493
  cookie?: Record<string, IRParameterObject>;
7482
7494
  header?: Record<string, IRParameterObject>;
@@ -7519,6 +7531,21 @@ interface IRParameterObject
7519
7531
  | 'spaceDelimited';
7520
7532
  }
7521
7533
 
7534
+ interface IRPathsObject {
7535
+ [path: `/${string}`]: IRPathItemObject;
7536
+ }
7537
+
7538
+ interface IRPathItemObject {
7539
+ delete?: IROperationObject;
7540
+ get?: IROperationObject;
7541
+ head?: IROperationObject;
7542
+ options?: IROperationObject;
7543
+ patch?: IROperationObject;
7544
+ post?: IROperationObject;
7545
+ put?: IROperationObject;
7546
+ trace?: IROperationObject;
7547
+ }
7548
+
7522
7549
  interface IRRequestBodyObject
7523
7550
  extends Pick<JsonSchemaDraft2020_12, 'description'> {
7524
7551
  required?: boolean;
@@ -7613,9 +7640,12 @@ interface IRSchemaObject
7613
7640
 
7614
7641
  type IRSecurityObject = SecuritySchemeObject$2;
7615
7642
 
7643
+ type IRServerObject = ServerObject$1;
7644
+
7616
7645
  interface IRModel {
7617
7646
  components?: IRComponentsObject;
7618
7647
  paths?: IRPathsObject;
7648
+ servers?: ReadonlyArray<IRServerObject>;
7619
7649
  }
7620
7650
 
7621
7651
  declare namespace IR {
@@ -7633,6 +7663,7 @@ declare namespace IR {
7633
7663
  export type ResponsesObject = IRResponsesObject;
7634
7664
  export type SchemaObject = IRSchemaObject;
7635
7665
  export type SecurityObject = IRSecurityObject;
7666
+ export type ServerObject = IRServerObject;
7636
7667
  }
7637
7668
 
7638
7669
  declare namespace LegacyIR {