@hey-api/openapi-ts 0.61.3 → 0.62.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
@@ -6394,8 +6394,6 @@ interface PluginContext {
6394
6394
 
6395
6395
  interface BaseConfig {
6396
6396
  /**
6397
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6398
- *
6399
6397
  * Should the exports from the plugin's file be re-exported in the index
6400
6398
  * barrel file?
6401
6399
  */
@@ -6461,8 +6459,9 @@ declare namespace Plugin {
6461
6459
  Pick<Required<BaseConfig>, 'exportFromIndex' | 'output'>;
6462
6460
 
6463
6461
  /**
6464
- * Plugin implementation for legacy parser. Use only if you need to support
6465
- * OpenAPI 2.0 since that isn't supported by the experimental parser yet.
6462
+ * @deprecated
6463
+ *
6464
+ * Plugin implementation for legacy parser.
6466
6465
  */
6467
6466
  export type LegacyHandler<Config extends BaseConfig> = (args: {
6468
6467
  client: Client$1;
@@ -6525,8 +6524,6 @@ interface Config$a extends Plugin.Name<'@hey-api/sdk'> {
6525
6524
  */
6526
6525
  asClass?: boolean;
6527
6526
  /**
6528
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6529
- *
6530
6527
  * Should the generated functions contain auth mechanisms? You may want to
6531
6528
  * disable this option if you're handling auth yourself or defining it
6532
6529
  * globally on the client and want to reduce the size of generated code.
@@ -6535,6 +6532,8 @@ interface Config$a extends Plugin.Name<'@hey-api/sdk'> {
6535
6532
  */
6536
6533
  auth?: boolean;
6537
6534
  /**
6535
+ * @deprecated
6536
+ *
6538
6537
  * **This feature works only with the legacy parser**
6539
6538
  *
6540
6539
  * Filter endpoints to be included in the generated SDK. The provided
@@ -6542,8 +6541,6 @@ interface Config$a extends Plugin.Name<'@hey-api/sdk'> {
6542
6541
  * included in the output. The input pattern this string will be tested
6543
6542
  * against is `{method} {path}`. For example, you can match
6544
6543
  * `POST /api/v1/foo` with `^POST /api/v1/foo$`.
6545
- *
6546
- * @deprecated
6547
6544
  */
6548
6545
  filter?: string;
6549
6546
  /**
@@ -6605,8 +6602,6 @@ interface Config$a extends Plugin.Name<'@hey-api/sdk'> {
6605
6602
  */
6606
6603
  transformer?: '@hey-api/transformers' | boolean;
6607
6604
  /**
6608
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6609
- *
6610
6605
  * Validate response data against schema before returning. This is useful
6611
6606
  * if you want to ensure the response conforms to a desired shape. However,
6612
6607
  * validation adds runtime overhead, so it's not recommended to use unless
@@ -6624,8 +6619,6 @@ interface Config$a extends Plugin.Name<'@hey-api/sdk'> {
6624
6619
 
6625
6620
  interface Config$9 extends Plugin.Name<'@hey-api/transformers'> {
6626
6621
  /**
6627
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6628
- *
6629
6622
  * Convert long integers into BigInt values?
6630
6623
  *
6631
6624
  * @default true
@@ -6655,8 +6648,6 @@ interface Config$8 extends Plugin.Name<'@hey-api/typescript'> {
6655
6648
  */
6656
6649
  enums?: 'javascript' | 'typescript' | 'typescript+namespace' | false;
6657
6650
  /**
6658
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6659
- *
6660
6651
  * Defines casing of the enum keys. By default, we use `SCREAMING_SNAKE_CASE`.
6661
6652
  * This option has effect only when `enums` is defined.
6662
6653
  *
@@ -6664,8 +6655,6 @@ interface Config$8 extends Plugin.Name<'@hey-api/typescript'> {
6664
6655
  */
6665
6656
  enumsCase?: StringCase;
6666
6657
  /**
6667
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6668
- *
6669
6658
  * By default, inline enums (enums not defined as reusable components in
6670
6659
  * the input file) are generated as inlined union types. You can set
6671
6660
  * `exportInlineEnums` to `true` to treat inline enums as reusable components.
@@ -6675,19 +6664,17 @@ interface Config$8 extends Plugin.Name<'@hey-api/typescript'> {
6675
6664
  */
6676
6665
  exportInlineEnums?: boolean;
6677
6666
  /**
6678
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6679
- *
6680
6667
  * Defines casing of the identifiers. By default, we use `PascalCase`.
6681
6668
  *
6682
6669
  * @default 'PascalCase'
6683
6670
  */
6684
6671
  identifierCase?: Exclude<StringCase, 'SCREAMING_SNAKE_CASE'>;
6685
6672
  /**
6673
+ * @deprecated
6674
+ *
6686
6675
  * **This feature works only with the legacy parser**
6687
6676
  *
6688
6677
  * Include only types matching regular expression.
6689
- *
6690
- * @deprecated
6691
6678
  */
6692
6679
  include?: string;
6693
6680
  /**
@@ -6697,24 +6684,24 @@ interface Config$8 extends Plugin.Name<'@hey-api/typescript'> {
6697
6684
  */
6698
6685
  output?: string;
6699
6686
  /**
6687
+ * @deprecated
6688
+ *
6700
6689
  * **This feature works only with the legacy parser**
6701
6690
  *
6702
6691
  * Use your preferred naming pattern
6703
6692
  *
6704
6693
  * @default 'preserve'
6705
- *
6706
- * @deprecated
6707
6694
  */
6708
6695
  style?: 'PascalCase' | 'preserve';
6709
6696
  /**
6697
+ * @deprecated
6698
+ *
6710
6699
  * **This feature works only with the legacy parser**
6711
6700
  *
6712
6701
  * Generate a tree of types containing all operations? It will be named
6713
6702
  * $OpenApiTs.
6714
6703
  *
6715
6704
  * @default false
6716
- *
6717
- * @deprecated
6718
6705
  */
6719
6706
  tree?: boolean;
6720
6707
  }
@@ -6910,12 +6897,6 @@ interface ClientConfig {
6910
6897
  * @default false
6911
6898
  */
6912
6899
  dryRun?: boolean;
6913
- /**
6914
- * Opt in to the experimental parser?
6915
- *
6916
- * @default false
6917
- */
6918
- experimentalParser?: boolean;
6919
6900
  /**
6920
6901
  * Path to the OpenAPI specification. This can be either local or remote path.
6921
6902
  * Both JSON and YAML file formats are supported. You can also pass the parsed
@@ -6925,8 +6906,6 @@ interface ClientConfig {
6925
6906
  */
6926
6907
  input: string | Record<string, unknown> | {
6927
6908
  /**
6928
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6929
- *
6930
6909
  * Prevent parts matching the regular expression from being processed.
6931
6910
  * You can select both operations and components by reference within
6932
6911
  * the bundled input. In case of conflicts, `exclude` takes precedence
@@ -6938,8 +6917,6 @@ interface ClientConfig {
6938
6917
  */
6939
6918
  exclude?: string;
6940
6919
  /**
6941
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6942
- *
6943
6920
  * Process only parts matching the regular expression. You can select both
6944
6921
  * operations and components by reference within the bundled input. In
6945
6922
  * case of conflicts, `exclude` takes precedence over `include`.
@@ -6992,8 +6969,6 @@ interface ClientConfig {
6992
6969
  */
6993
6970
  output: string | {
6994
6971
  /**
6995
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6996
- *
6997
6972
  * Defines casing of the output fields. By default, we preserve `input`
6998
6973
  * values as data transforms incur a performance penalty at runtime.
6999
6974
  *
@@ -7035,67 +7010,75 @@ interface ClientConfig {
7035
7010
  */
7036
7011
  plugins?: ReadonlyArray<UserPlugins['name'] | UserPlugins>;
7037
7012
  /**
7038
- * Manually set base in OpenAPI config instead of inferring from server value
7013
+ * Regenerate the client when the input file changes?
7039
7014
  *
7015
+ * @default false
7016
+ */
7017
+ watch?: boolean | number | {
7018
+ /**
7019
+ * Regenerate the client when the input file changes?
7020
+ *
7021
+ * @default false
7022
+ */
7023
+ enabled?: boolean;
7024
+ /**
7025
+ * How often should we attempt to detect the input file change?
7026
+ *
7027
+ * @default 1000
7028
+ */
7029
+ interval?: number;
7030
+ };
7031
+ /**
7040
7032
  * @deprecated
7033
+ *
7034
+ * Manually set base in OpenAPI config instead of inferring from server value
7041
7035
  */
7042
7036
  base?: string;
7043
7037
  /**
7044
- * Generate core client classes?
7038
+ * @deprecated
7045
7039
  *
7040
+ * Opt in to the experimental parser?
7041
+ *
7042
+ * @default true
7043
+ */
7044
+ experimentalParser?: boolean;
7045
+ /**
7046
7046
  * @deprecated
7047
7047
  *
7048
+ * Generate core client classes?
7049
+ *
7048
7050
  * @default true
7049
7051
  */
7050
7052
  exportCore?: boolean;
7051
7053
  /**
7054
+ * @deprecated
7055
+ *
7052
7056
  * Custom client class name. Please note this option is deprecated and
7053
7057
  * will be removed in favor of clients.
7054
7058
  *
7055
7059
  * @link https://heyapi.dev/openapi-ts/migrating.html#deprecated-name
7056
- *
7057
- * @deprecated
7058
7060
  */
7059
7061
  name?: string;
7060
7062
  /**
7063
+ * @deprecated
7064
+ *
7061
7065
  * Path to custom request file. Please note this option is deprecated and
7062
7066
  * will be removed in favor of clients.
7063
7067
  *
7064
7068
  * @link https://heyapi.dev/openapi-ts/migrating.html#deprecated-request
7065
- *
7066
- * @deprecated
7067
7069
  */
7068
7070
  request?: string;
7069
7071
  /**
7072
+ * @deprecated
7073
+ *
7070
7074
  * Use options or arguments functions. Please note this option is deprecated and
7071
7075
  * will be removed in favor of clients.
7072
7076
  *
7073
7077
  * @link https://heyapi.dev/openapi-ts/migrating.html#deprecated-useoptions
7074
7078
  *
7075
- * @deprecated
7076
- *
7077
7079
  * @default true
7078
7080
  */
7079
7081
  useOptions?: boolean;
7080
- /**
7081
- * Regenerate the client when the input file changes?
7082
- *
7083
- * @default false
7084
- */
7085
- watch?: boolean | number | {
7086
- /**
7087
- * Regenerate the client when the input file changes?
7088
- *
7089
- * @default false
7090
- */
7091
- enabled?: boolean;
7092
- /**
7093
- * How often should we attempt to detect the input file change?
7094
- *
7095
- * @default 1000
7096
- */
7097
- interval?: number;
7098
- };
7099
7082
  }
7100
7083
  type UserConfig = ClientConfig;
7101
7084
  type Config = Omit<Required<ClientConfig>, 'base' | 'client' | 'input' | 'logs' | 'name' | 'output' | 'plugins' | 'request' | 'watch'> & Pick<ClientConfig, 'base' | 'name' | 'request'> & {
package/dist/index.d.ts CHANGED
@@ -6394,8 +6394,6 @@ interface PluginContext {
6394
6394
 
6395
6395
  interface BaseConfig {
6396
6396
  /**
6397
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6398
- *
6399
6397
  * Should the exports from the plugin's file be re-exported in the index
6400
6398
  * barrel file?
6401
6399
  */
@@ -6461,8 +6459,9 @@ declare namespace Plugin {
6461
6459
  Pick<Required<BaseConfig>, 'exportFromIndex' | 'output'>;
6462
6460
 
6463
6461
  /**
6464
- * Plugin implementation for legacy parser. Use only if you need to support
6465
- * OpenAPI 2.0 since that isn't supported by the experimental parser yet.
6462
+ * @deprecated
6463
+ *
6464
+ * Plugin implementation for legacy parser.
6466
6465
  */
6467
6466
  export type LegacyHandler<Config extends BaseConfig> = (args: {
6468
6467
  client: Client$1;
@@ -6525,8 +6524,6 @@ interface Config$a extends Plugin.Name<'@hey-api/sdk'> {
6525
6524
  */
6526
6525
  asClass?: boolean;
6527
6526
  /**
6528
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6529
- *
6530
6527
  * Should the generated functions contain auth mechanisms? You may want to
6531
6528
  * disable this option if you're handling auth yourself or defining it
6532
6529
  * globally on the client and want to reduce the size of generated code.
@@ -6535,6 +6532,8 @@ interface Config$a extends Plugin.Name<'@hey-api/sdk'> {
6535
6532
  */
6536
6533
  auth?: boolean;
6537
6534
  /**
6535
+ * @deprecated
6536
+ *
6538
6537
  * **This feature works only with the legacy parser**
6539
6538
  *
6540
6539
  * Filter endpoints to be included in the generated SDK. The provided
@@ -6542,8 +6541,6 @@ interface Config$a extends Plugin.Name<'@hey-api/sdk'> {
6542
6541
  * included in the output. The input pattern this string will be tested
6543
6542
  * against is `{method} {path}`. For example, you can match
6544
6543
  * `POST /api/v1/foo` with `^POST /api/v1/foo$`.
6545
- *
6546
- * @deprecated
6547
6544
  */
6548
6545
  filter?: string;
6549
6546
  /**
@@ -6605,8 +6602,6 @@ interface Config$a extends Plugin.Name<'@hey-api/sdk'> {
6605
6602
  */
6606
6603
  transformer?: '@hey-api/transformers' | boolean;
6607
6604
  /**
6608
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6609
- *
6610
6605
  * Validate response data against schema before returning. This is useful
6611
6606
  * if you want to ensure the response conforms to a desired shape. However,
6612
6607
  * validation adds runtime overhead, so it's not recommended to use unless
@@ -6624,8 +6619,6 @@ interface Config$a extends Plugin.Name<'@hey-api/sdk'> {
6624
6619
 
6625
6620
  interface Config$9 extends Plugin.Name<'@hey-api/transformers'> {
6626
6621
  /**
6627
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6628
- *
6629
6622
  * Convert long integers into BigInt values?
6630
6623
  *
6631
6624
  * @default true
@@ -6655,8 +6648,6 @@ interface Config$8 extends Plugin.Name<'@hey-api/typescript'> {
6655
6648
  */
6656
6649
  enums?: 'javascript' | 'typescript' | 'typescript+namespace' | false;
6657
6650
  /**
6658
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6659
- *
6660
6651
  * Defines casing of the enum keys. By default, we use `SCREAMING_SNAKE_CASE`.
6661
6652
  * This option has effect only when `enums` is defined.
6662
6653
  *
@@ -6664,8 +6655,6 @@ interface Config$8 extends Plugin.Name<'@hey-api/typescript'> {
6664
6655
  */
6665
6656
  enumsCase?: StringCase;
6666
6657
  /**
6667
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6668
- *
6669
6658
  * By default, inline enums (enums not defined as reusable components in
6670
6659
  * the input file) are generated as inlined union types. You can set
6671
6660
  * `exportInlineEnums` to `true` to treat inline enums as reusable components.
@@ -6675,19 +6664,17 @@ interface Config$8 extends Plugin.Name<'@hey-api/typescript'> {
6675
6664
  */
6676
6665
  exportInlineEnums?: boolean;
6677
6666
  /**
6678
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6679
- *
6680
6667
  * Defines casing of the identifiers. By default, we use `PascalCase`.
6681
6668
  *
6682
6669
  * @default 'PascalCase'
6683
6670
  */
6684
6671
  identifierCase?: Exclude<StringCase, 'SCREAMING_SNAKE_CASE'>;
6685
6672
  /**
6673
+ * @deprecated
6674
+ *
6686
6675
  * **This feature works only with the legacy parser**
6687
6676
  *
6688
6677
  * Include only types matching regular expression.
6689
- *
6690
- * @deprecated
6691
6678
  */
6692
6679
  include?: string;
6693
6680
  /**
@@ -6697,24 +6684,24 @@ interface Config$8 extends Plugin.Name<'@hey-api/typescript'> {
6697
6684
  */
6698
6685
  output?: string;
6699
6686
  /**
6687
+ * @deprecated
6688
+ *
6700
6689
  * **This feature works only with the legacy parser**
6701
6690
  *
6702
6691
  * Use your preferred naming pattern
6703
6692
  *
6704
6693
  * @default 'preserve'
6705
- *
6706
- * @deprecated
6707
6694
  */
6708
6695
  style?: 'PascalCase' | 'preserve';
6709
6696
  /**
6697
+ * @deprecated
6698
+ *
6710
6699
  * **This feature works only with the legacy parser**
6711
6700
  *
6712
6701
  * Generate a tree of types containing all operations? It will be named
6713
6702
  * $OpenApiTs.
6714
6703
  *
6715
6704
  * @default false
6716
- *
6717
- * @deprecated
6718
6705
  */
6719
6706
  tree?: boolean;
6720
6707
  }
@@ -6910,12 +6897,6 @@ interface ClientConfig {
6910
6897
  * @default false
6911
6898
  */
6912
6899
  dryRun?: boolean;
6913
- /**
6914
- * Opt in to the experimental parser?
6915
- *
6916
- * @default false
6917
- */
6918
- experimentalParser?: boolean;
6919
6900
  /**
6920
6901
  * Path to the OpenAPI specification. This can be either local or remote path.
6921
6902
  * Both JSON and YAML file formats are supported. You can also pass the parsed
@@ -6925,8 +6906,6 @@ interface ClientConfig {
6925
6906
  */
6926
6907
  input: string | Record<string, unknown> | {
6927
6908
  /**
6928
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6929
- *
6930
6909
  * Prevent parts matching the regular expression from being processed.
6931
6910
  * You can select both operations and components by reference within
6932
6911
  * the bundled input. In case of conflicts, `exclude` takes precedence
@@ -6938,8 +6917,6 @@ interface ClientConfig {
6938
6917
  */
6939
6918
  exclude?: string;
6940
6919
  /**
6941
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6942
- *
6943
6920
  * Process only parts matching the regular expression. You can select both
6944
6921
  * operations and components by reference within the bundled input. In
6945
6922
  * case of conflicts, `exclude` takes precedence over `include`.
@@ -6992,8 +6969,6 @@ interface ClientConfig {
6992
6969
  */
6993
6970
  output: string | {
6994
6971
  /**
6995
- * **This feature works only with the [experimental parser](https://heyapi.dev/openapi-ts/configuration#parser)**
6996
- *
6997
6972
  * Defines casing of the output fields. By default, we preserve `input`
6998
6973
  * values as data transforms incur a performance penalty at runtime.
6999
6974
  *
@@ -7035,67 +7010,75 @@ interface ClientConfig {
7035
7010
  */
7036
7011
  plugins?: ReadonlyArray<UserPlugins['name'] | UserPlugins>;
7037
7012
  /**
7038
- * Manually set base in OpenAPI config instead of inferring from server value
7013
+ * Regenerate the client when the input file changes?
7039
7014
  *
7015
+ * @default false
7016
+ */
7017
+ watch?: boolean | number | {
7018
+ /**
7019
+ * Regenerate the client when the input file changes?
7020
+ *
7021
+ * @default false
7022
+ */
7023
+ enabled?: boolean;
7024
+ /**
7025
+ * How often should we attempt to detect the input file change?
7026
+ *
7027
+ * @default 1000
7028
+ */
7029
+ interval?: number;
7030
+ };
7031
+ /**
7040
7032
  * @deprecated
7033
+ *
7034
+ * Manually set base in OpenAPI config instead of inferring from server value
7041
7035
  */
7042
7036
  base?: string;
7043
7037
  /**
7044
- * Generate core client classes?
7038
+ * @deprecated
7045
7039
  *
7040
+ * Opt in to the experimental parser?
7041
+ *
7042
+ * @default true
7043
+ */
7044
+ experimentalParser?: boolean;
7045
+ /**
7046
7046
  * @deprecated
7047
7047
  *
7048
+ * Generate core client classes?
7049
+ *
7048
7050
  * @default true
7049
7051
  */
7050
7052
  exportCore?: boolean;
7051
7053
  /**
7054
+ * @deprecated
7055
+ *
7052
7056
  * Custom client class name. Please note this option is deprecated and
7053
7057
  * will be removed in favor of clients.
7054
7058
  *
7055
7059
  * @link https://heyapi.dev/openapi-ts/migrating.html#deprecated-name
7056
- *
7057
- * @deprecated
7058
7060
  */
7059
7061
  name?: string;
7060
7062
  /**
7063
+ * @deprecated
7064
+ *
7061
7065
  * Path to custom request file. Please note this option is deprecated and
7062
7066
  * will be removed in favor of clients.
7063
7067
  *
7064
7068
  * @link https://heyapi.dev/openapi-ts/migrating.html#deprecated-request
7065
- *
7066
- * @deprecated
7067
7069
  */
7068
7070
  request?: string;
7069
7071
  /**
7072
+ * @deprecated
7073
+ *
7070
7074
  * Use options or arguments functions. Please note this option is deprecated and
7071
7075
  * will be removed in favor of clients.
7072
7076
  *
7073
7077
  * @link https://heyapi.dev/openapi-ts/migrating.html#deprecated-useoptions
7074
7078
  *
7075
- * @deprecated
7076
- *
7077
7079
  * @default true
7078
7080
  */
7079
7081
  useOptions?: boolean;
7080
- /**
7081
- * Regenerate the client when the input file changes?
7082
- *
7083
- * @default false
7084
- */
7085
- watch?: boolean | number | {
7086
- /**
7087
- * Regenerate the client when the input file changes?
7088
- *
7089
- * @default false
7090
- */
7091
- enabled?: boolean;
7092
- /**
7093
- * How often should we attempt to detect the input file change?
7094
- *
7095
- * @default 1000
7096
- */
7097
- interval?: number;
7098
- };
7099
7082
  }
7100
7083
  type UserConfig = ClientConfig;
7101
7084
  type Config = Omit<Required<ClientConfig>, 'base' | 'client' | 'input' | 'logs' | 'name' | 'output' | 'plugins' | 'request' | 'watch'> & Pick<ClientConfig, 'base' | 'name' | 'request'> & {