@hey-api/openapi-ts 0.69.2 → 0.71.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.
@@ -5050,6 +5050,10 @@ interface XMLObject$1 {
5050
5050
  wrapped?: boolean;
5051
5051
  }
5052
5052
 
5053
+ interface OpenApiV2_0_XTypes {
5054
+ SchemaObject: SchemaObject$1;
5055
+ }
5056
+
5053
5057
  /**
5054
5058
  * This is the root object of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#openapi-description OpenAPI Description}.
5055
5059
  *
@@ -6331,6 +6335,22 @@ type OpenApiSchemaFormats =
6331
6335
 
6332
6336
  type Format = JsonSchemaFormats | OpenApiSchemaFormats | (string & {});
6333
6337
 
6338
+ interface OpenApiV3_0_XTypes {
6339
+ ParameterObject: ParameterObject;
6340
+ ReferenceObject: ReferenceObject;
6341
+ RequestBodyObject: RequestBodyObject;
6342
+ ResponseObject: ResponseObject;
6343
+ SchemaObject: SchemaObject;
6344
+ }
6345
+
6346
+ interface OpenApiV3_1_XTypes {
6347
+ ParameterObject: ParameterObject$2;
6348
+ ReferenceObject: ReferenceObject$2;
6349
+ RequestBodyObject: RequestBodyObject$1;
6350
+ ResponseObject: ResponseObject$2;
6351
+ SchemaObject: SchemaObject$2;
6352
+ }
6353
+
6334
6354
  declare namespace OpenApi {
6335
6355
  export type V2_0_X = OpenApiV2_0_X;
6336
6356
 
@@ -6339,6 +6359,44 @@ declare namespace OpenApi {
6339
6359
  export type V3_1_X = OpenApiV3_1_X;
6340
6360
  }
6341
6361
 
6362
+ declare namespace OpenApiParameterObject {
6363
+ export type V3_0_X =
6364
+ | OpenApiV3_0_XTypes['ParameterObject']
6365
+ | OpenApiV3_0_XTypes['ReferenceObject'];
6366
+
6367
+ export type V3_1_X =
6368
+ | OpenApiV3_1_XTypes['ParameterObject']
6369
+ | OpenApiV3_1_XTypes['ReferenceObject'];
6370
+ }
6371
+
6372
+ declare namespace OpenApiRequestBodyObject {
6373
+ export type V3_0_X =
6374
+ | OpenApiV3_0_XTypes['RequestBodyObject']
6375
+ | OpenApiV3_0_XTypes['ReferenceObject'];
6376
+
6377
+ export type V3_1_X =
6378
+ | OpenApiV3_1_XTypes['RequestBodyObject']
6379
+ | OpenApiV3_1_XTypes['ReferenceObject'];
6380
+ }
6381
+
6382
+ declare namespace OpenApiResponseObject {
6383
+ export type V3_0_X =
6384
+ | OpenApiV3_0_XTypes['ResponseObject']
6385
+ | OpenApiV3_0_XTypes['ReferenceObject'];
6386
+
6387
+ export type V3_1_X =
6388
+ | OpenApiV3_1_XTypes['ResponseObject']
6389
+ | OpenApiV3_1_XTypes['ReferenceObject'];
6390
+ }
6391
+
6392
+ declare namespace OpenApiSchemaObject {
6393
+ export type V2_0_X = OpenApiV2_0_XTypes['SchemaObject'];
6394
+
6395
+ export type V3_0_X = OpenApiV3_0_XTypes['SchemaObject'];
6396
+
6397
+ export type V3_1_X = OpenApiV3_1_XTypes['SchemaObject'];
6398
+ }
6399
+
6342
6400
  interface Operation extends Omit<Operation$1, 'tags'> {
6343
6401
  service: string;
6344
6402
  }
@@ -6676,10 +6734,10 @@ interface Config$c extends Plugin.Name<'@hey-api/schemas'> {
6676
6734
  schema:
6677
6735
  | OpenApiSchema
6678
6736
  | OpenApiSchema$1
6679
- | SchemaObject$1
6680
- | ReferenceObject
6681
- | SchemaObject
6682
- | SchemaObject$2,
6737
+ | OpenApiV2_0_XTypes['SchemaObject']
6738
+ | OpenApiV3_0_XTypes['ReferenceObject']
6739
+ | OpenApiV3_0_XTypes['SchemaObject']
6740
+ | OpenApiV3_1_XTypes['SchemaObject'],
6683
6741
  ) => string);
6684
6742
  /**
6685
6743
  * Name of the generated file.
@@ -6699,9 +6757,9 @@ interface Config$c extends Plugin.Name<'@hey-api/schemas'> {
6699
6757
 
6700
6758
  interface Config$b extends Plugin.Name<'@hey-api/sdk'> {
6701
6759
  /**
6702
- * Group operation methods into classes? When enabled, you can
6703
- * select which classes to export with `sdk.include` and/or
6704
- * transform their names with `sdk.serviceNameBuilder`.
6760
+ * Group operation methods into classes? When enabled, you can select which
6761
+ * classes to export with `sdk.include` and/or transform their names with
6762
+ * `sdk.classNameBuilder`.
6705
6763
  *
6706
6764
  * Note that by enabling this option, your SDKs will **NOT**
6707
6765
  * support {@link https://developer.mozilla.org/docs/Glossary/Tree_shaking tree-shaking}.
@@ -6718,6 +6776,13 @@ interface Config$b extends Plugin.Name<'@hey-api/sdk'> {
6718
6776
  * @default true
6719
6777
  */
6720
6778
  auth?: boolean;
6779
+ /**
6780
+ * Customize the generated class names. The name variable is obtained from
6781
+ * your OpenAPI specification tags or `instance` value.
6782
+ *
6783
+ * This option has no effect if `sdk.asClass` is `false`.
6784
+ */
6785
+ classNameBuilder?: string | ((name: string) => string);
6721
6786
  /**
6722
6787
  * Use an internal client instance to send HTTP requests? This is useful if
6723
6788
  * you don't want to manually pass the client to each SDK function.
@@ -6743,6 +6808,14 @@ interface Config$b extends Plugin.Name<'@hey-api/sdk'> {
6743
6808
  * This option has no effect if `sdk.asClass` is `false`.
6744
6809
  */
6745
6810
  include?: string;
6811
+ /**
6812
+ * Set `instance` to create an instantiable SDK. Using `true` will use the
6813
+ * default instance name; in practice, you want to define your own by passing
6814
+ * a string value.
6815
+ *
6816
+ * @default false
6817
+ */
6818
+ instance?: string | boolean;
6746
6819
  /**
6747
6820
  * Customise the name of methods within the service. By default, {@link IR.OperationObject.id} or {@link Operation.name} is used.
6748
6821
  */
@@ -6761,14 +6834,13 @@ interface Config$b extends Plugin.Name<'@hey-api/sdk'> {
6761
6834
  */
6762
6835
  output?: string;
6763
6836
  /**
6764
- * Customize the generated service class names. The name variable is
6765
- * obtained from your OpenAPI specification tags.
6837
+ * **This feature works only with the Fetch client**
6766
6838
  *
6767
- * This option has no effect if `sdk.asClass` is `false`.
6839
+ * Should we return only data or multiple fields (data, error, response, etc.)?
6768
6840
  *
6769
- * @default '{{name}}Service'
6841
+ * @default 'fields'
6770
6842
  */
6771
- serviceNameBuilder?: string | ((name: string) => string);
6843
+ responseStyle?: 'data' | 'fields';
6772
6844
  /**
6773
6845
  * Transform response data before returning. This is useful if you want to
6774
6846
  * convert for example ISO strings into Date objects. However, transformation
@@ -7216,38 +7288,6 @@ type UserPlugins = Plugin.UserConfig<Config$i> | Plugin.UserConfig<Config$l> | P
7216
7288
  */
7217
7289
  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$4> | Plugin.Config<Config$8> | Plugin.Config<Config$7> | Plugin.Config<Config$6> | Plugin.Config<Config$5> | Plugin.Config<Config$3> | Plugin.Config<Config$2> | Plugin.Config<Config$1>;
7218
7290
 
7219
- type Formatters = 'biome' | 'prettier';
7220
-
7221
- type Linters = 'biome' | 'eslint' | 'oxlint';
7222
-
7223
- type StringCase =
7224
- | 'camelCase'
7225
- | 'PascalCase'
7226
- | 'preserve'
7227
- | 'snake_case'
7228
- | 'SCREAMING_SNAKE_CASE';
7229
-
7230
- interface Watch {
7231
- /**
7232
- * Regenerate the client when the input file changes?
7233
- *
7234
- * @default false
7235
- */
7236
- enabled?: boolean;
7237
- /**
7238
- * How often should we attempt to detect the input file change? (in ms)
7239
- *
7240
- * @default 1000
7241
- */
7242
- interval?: number;
7243
- /**
7244
- * How long will we wait before the request times out?
7245
- *
7246
- * @default 60_000
7247
- */
7248
- timeout?: number;
7249
- }
7250
-
7251
7291
  interface Input {
7252
7292
  /**
7253
7293
  * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
@@ -7283,136 +7323,7 @@ interface Input {
7283
7323
  * Filters can be used to select a subset of your input before it's processed
7284
7324
  * by plugins.
7285
7325
  */
7286
- filters?: {
7287
- /**
7288
- * Include deprecated resources in the output?
7289
- *
7290
- * @default true
7291
- */
7292
- deprecated?: boolean;
7293
- operations?: {
7294
- /**
7295
- * Prevent operations matching the `exclude` filters from being processed.
7296
- *
7297
- * In case of conflicts, `exclude` takes precedence over `include`.
7298
- *
7299
- * @example ['GET /api/v1/foo']
7300
- */
7301
- exclude?: ReadonlyArray<string>;
7302
- /**
7303
- * Process only operations matching the `include` filters.
7304
- *
7305
- * In case of conflicts, `exclude` takes precedence over `include`.
7306
- *
7307
- * @example ['GET /api/v1/foo']
7308
- */
7309
- include?: ReadonlyArray<string>;
7310
- };
7311
- /**
7312
- * Keep reusable components without any references in the output? By
7313
- * default, we exclude orphaned resources.
7314
- *
7315
- * @default false
7316
- */
7317
- orphans?: boolean;
7318
- parameters?: {
7319
- /**
7320
- * Prevent parameters matching the `exclude` filters from being processed.
7321
- *
7322
- * In case of conflicts, `exclude` takes precedence over `include`.
7323
- *
7324
- * @example ['QueryParam']
7325
- */
7326
- exclude?: ReadonlyArray<string>;
7327
- /**
7328
- * Process only parameters matching the `include` filters.
7329
- *
7330
- * In case of conflicts, `exclude` takes precedence over `include`.
7331
- *
7332
- * @example ['QueryParam']
7333
- */
7334
- include?: ReadonlyArray<string>;
7335
- };
7336
- /**
7337
- * Should we preserve the key order when overwriting your input? This
7338
- * option is disabled by default to improve performance.
7339
- *
7340
- * @default false
7341
- */
7342
- preserveOrder?: boolean;
7343
- requestBodies?: {
7344
- /**
7345
- * Prevent request bodies matching the `exclude` filters from being processed.
7346
- *
7347
- * In case of conflicts, `exclude` takes precedence over `include`.
7348
- *
7349
- * @example ['Foo']
7350
- */
7351
- exclude?: ReadonlyArray<string>;
7352
- /**
7353
- * Process only request bodies matching the `include` filters.
7354
- *
7355
- * In case of conflicts, `exclude` takes precedence over `include`.
7356
- *
7357
- * @example ['Foo']
7358
- */
7359
- include?: ReadonlyArray<string>;
7360
- };
7361
- responses?: {
7362
- /**
7363
- * Prevent responses matching the `exclude` filters from being processed.
7364
- *
7365
- * In case of conflicts, `exclude` takes precedence over `include`.
7366
- *
7367
- * @example ['Foo']
7368
- */
7369
- exclude?: ReadonlyArray<string>;
7370
- /**
7371
- * Process only responses matching the `include` filters.
7372
- *
7373
- * In case of conflicts, `exclude` takes precedence over `include`.
7374
- *
7375
- * @example ['Foo']
7376
- */
7377
- include?: ReadonlyArray<string>;
7378
- };
7379
- schemas?: {
7380
- /**
7381
- * Prevent schemas matching the `exclude` filters from being processed.
7382
- *
7383
- * In case of conflicts, `exclude` takes precedence over `include`.
7384
- *
7385
- * @example ['Foo']
7386
- */
7387
- exclude?: ReadonlyArray<string>;
7388
- /**
7389
- * Process only schemas matching the `include` filters.
7390
- *
7391
- * In case of conflicts, `exclude` takes precedence over `include`.
7392
- *
7393
- * @example ['Foo']
7394
- */
7395
- include?: ReadonlyArray<string>;
7396
- };
7397
- tags?: {
7398
- /**
7399
- * Prevent tags matching the `exclude` filters from being processed.
7400
- *
7401
- * In case of conflicts, `exclude` takes precedence over `include`.
7402
- *
7403
- * @example ['foo']
7404
- */
7405
- exclude?: ReadonlyArray<string>;
7406
- /**
7407
- * Process only tags matching the `include` filters.
7408
- *
7409
- * In case of conflicts, `exclude` takes precedence over `include`.
7410
- *
7411
- * @example ['foo']
7412
- */
7413
- include?: ReadonlyArray<string>;
7414
- };
7415
- };
7326
+ filters?: Filters;
7416
7327
  /**
7417
7328
  * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
7418
7329
  *
@@ -7420,7 +7331,7 @@ interface Input {
7420
7331
  */
7421
7332
  organization?: string;
7422
7333
  /**
7423
- * Pagination configuration
7334
+ * Pagination configuration.
7424
7335
  */
7425
7336
  pagination?: {
7426
7337
  /**
@@ -7431,6 +7342,11 @@ interface Input {
7431
7342
  */
7432
7343
  keywords?: ReadonlyArray<string>;
7433
7344
  };
7345
+ /**
7346
+ * Custom input transformations to execute before parsing. This allows you
7347
+ * to modify, fix, or enhance input definitions before code generation.
7348
+ */
7349
+ patch?: Patch;
7434
7350
  /**
7435
7351
  * Path to the OpenAPI specification. This can be either local or remote path.
7436
7352
  * Both JSON and YAML file formats are supported. You can also pass the parsed
@@ -7480,6 +7396,229 @@ interface Input {
7480
7396
  watch?: boolean | number | Watch;
7481
7397
  }
7482
7398
 
7399
+ interface Filters {
7400
+ /**
7401
+ * Include deprecated resources in the output?
7402
+ *
7403
+ * @default true
7404
+ */
7405
+ deprecated?: boolean;
7406
+ operations?: {
7407
+ /**
7408
+ * Prevent operations matching the `exclude` filters from being processed.
7409
+ *
7410
+ * In case of conflicts, `exclude` takes precedence over `include`.
7411
+ *
7412
+ * @example ['GET /api/v1/foo']
7413
+ */
7414
+ exclude?: ReadonlyArray<string>;
7415
+ /**
7416
+ * Process only operations matching the `include` filters.
7417
+ *
7418
+ * In case of conflicts, `exclude` takes precedence over `include`.
7419
+ *
7420
+ * @example ['GET /api/v1/foo']
7421
+ */
7422
+ include?: ReadonlyArray<string>;
7423
+ };
7424
+ /**
7425
+ * Keep reusable components without any references in the output? By
7426
+ * default, we exclude orphaned resources.
7427
+ *
7428
+ * @default false
7429
+ */
7430
+ orphans?: boolean;
7431
+ parameters?: {
7432
+ /**
7433
+ * Prevent parameters matching the `exclude` filters from being processed.
7434
+ *
7435
+ * In case of conflicts, `exclude` takes precedence over `include`.
7436
+ *
7437
+ * @example ['QueryParam']
7438
+ */
7439
+ exclude?: ReadonlyArray<string>;
7440
+ /**
7441
+ * Process only parameters matching the `include` filters.
7442
+ *
7443
+ * In case of conflicts, `exclude` takes precedence over `include`.
7444
+ *
7445
+ * @example ['QueryParam']
7446
+ */
7447
+ include?: ReadonlyArray<string>;
7448
+ };
7449
+ /**
7450
+ * Should we preserve the key order when overwriting your input? This
7451
+ * option is disabled by default to improve performance.
7452
+ *
7453
+ * @default false
7454
+ */
7455
+ preserveOrder?: boolean;
7456
+ requestBodies?: {
7457
+ /**
7458
+ * Prevent request bodies matching the `exclude` filters from being processed.
7459
+ *
7460
+ * In case of conflicts, `exclude` takes precedence over `include`.
7461
+ *
7462
+ * @example ['Foo']
7463
+ */
7464
+ exclude?: ReadonlyArray<string>;
7465
+ /**
7466
+ * Process only request bodies matching the `include` filters.
7467
+ *
7468
+ * In case of conflicts, `exclude` takes precedence over `include`.
7469
+ *
7470
+ * @example ['Foo']
7471
+ */
7472
+ include?: ReadonlyArray<string>;
7473
+ };
7474
+ responses?: {
7475
+ /**
7476
+ * Prevent responses matching the `exclude` filters from being processed.
7477
+ *
7478
+ * In case of conflicts, `exclude` takes precedence over `include`.
7479
+ *
7480
+ * @example ['Foo']
7481
+ */
7482
+ exclude?: ReadonlyArray<string>;
7483
+ /**
7484
+ * Process only responses matching the `include` filters.
7485
+ *
7486
+ * In case of conflicts, `exclude` takes precedence over `include`.
7487
+ *
7488
+ * @example ['Foo']
7489
+ */
7490
+ include?: ReadonlyArray<string>;
7491
+ };
7492
+ schemas?: {
7493
+ /**
7494
+ * Prevent schemas matching the `exclude` filters from being processed.
7495
+ *
7496
+ * In case of conflicts, `exclude` takes precedence over `include`.
7497
+ *
7498
+ * @example ['Foo']
7499
+ */
7500
+ exclude?: ReadonlyArray<string>;
7501
+ /**
7502
+ * Process only schemas matching the `include` filters.
7503
+ *
7504
+ * In case of conflicts, `exclude` takes precedence over `include`.
7505
+ *
7506
+ * @example ['Foo']
7507
+ */
7508
+ include?: ReadonlyArray<string>;
7509
+ };
7510
+ tags?: {
7511
+ /**
7512
+ * Prevent tags matching the `exclude` filters from being processed.
7513
+ *
7514
+ * In case of conflicts, `exclude` takes precedence over `include`.
7515
+ *
7516
+ * @example ['foo']
7517
+ */
7518
+ exclude?: ReadonlyArray<string>;
7519
+ /**
7520
+ * Process only tags matching the `include` filters.
7521
+ *
7522
+ * In case of conflicts, `exclude` takes precedence over `include`.
7523
+ *
7524
+ * @example ['foo']
7525
+ */
7526
+ include?: ReadonlyArray<string>;
7527
+ };
7528
+ }
7529
+
7530
+ interface Patch {
7531
+ parameters?: Record<
7532
+ string,
7533
+ (
7534
+ parameter: OpenApiParameterObject.V3_0_X | OpenApiParameterObject.V3_1_X,
7535
+ ) => void
7536
+ >;
7537
+ requestBodies?: Record<
7538
+ string,
7539
+ (
7540
+ requestBody:
7541
+ | OpenApiRequestBodyObject.V3_0_X
7542
+ | OpenApiRequestBodyObject.V3_1_X,
7543
+ ) => void
7544
+ >;
7545
+ responses?: Record<
7546
+ string,
7547
+ (
7548
+ response: OpenApiResponseObject.V3_0_X | OpenApiResponseObject.V3_1_X,
7549
+ ) => void
7550
+ >;
7551
+ /**
7552
+ * Each function receives the schema object to be modified in place. Common
7553
+ * use cases include fixing incorrect data types, removing unwanted
7554
+ * properties, adding missing fields, or standardizing date/time formats.
7555
+ *
7556
+ * @example
7557
+ * ```js
7558
+ * schemas: {
7559
+ * Foo: (schema) => {
7560
+ * // convert date-time format to timestamp
7561
+ * delete schema.properties.updatedAt.format;
7562
+ * schema.properties.updatedAt.type = 'number';
7563
+ * },
7564
+ * Bar: (schema) => {
7565
+ * // add missing property
7566
+ * schema.properties.metadata = {
7567
+ * additionalProperties: true,
7568
+ * type: 'object',
7569
+ * };
7570
+ * schema.required = ['metadata'];
7571
+ * },
7572
+ * Baz: (schema) => {
7573
+ * // remove property
7574
+ * delete schema.properties.internalField;
7575
+ * }
7576
+ * }
7577
+ * ```
7578
+ */
7579
+ schemas?: Record<
7580
+ string,
7581
+ (
7582
+ schema:
7583
+ | OpenApiSchemaObject.V2_0_X
7584
+ | OpenApiSchemaObject.V3_0_X
7585
+ | OpenApiSchemaObject.V3_1_X,
7586
+ ) => void
7587
+ >;
7588
+ }
7589
+
7590
+ interface Watch {
7591
+ /**
7592
+ * Regenerate the client when the input file changes?
7593
+ *
7594
+ * @default false
7595
+ */
7596
+ enabled?: boolean;
7597
+ /**
7598
+ * How often should we attempt to detect the input file change? (in ms)
7599
+ *
7600
+ * @default 1000
7601
+ */
7602
+ interval?: number;
7603
+ /**
7604
+ * How long will we wait before the request times out?
7605
+ *
7606
+ * @default 60_000
7607
+ */
7608
+ timeout?: number;
7609
+ }
7610
+
7611
+ type Formatters = 'biome' | 'prettier';
7612
+
7613
+ type Linters = 'biome' | 'eslint' | 'oxlint';
7614
+
7615
+ type StringCase =
7616
+ | 'camelCase'
7617
+ | 'PascalCase'
7618
+ | 'preserve'
7619
+ | 'snake_case'
7620
+ | 'SCREAMING_SNAKE_CASE';
7621
+
7483
7622
  interface UserConfig {
7484
7623
  /**
7485
7624
  * Path to the config file. Set this value if you don't use the default
@@ -7703,30 +7842,44 @@ interface Identifier {
7703
7842
  */
7704
7843
  name: string | false;
7705
7844
  }
7706
- type Namespace = Record<string, Pick<Identifier, 'name'> & {
7845
+ type NamespaceEntry = Pick<Identifier, 'name'> & {
7707
7846
  /**
7708
7847
  * Ref to the type in OpenAPI specification.
7709
7848
  */
7710
7849
  $ref: string;
7711
- }>;
7712
- interface Namespaces {
7850
+ };
7851
+ type Identifiers = Record<string, {
7852
+ /**
7853
+ * TypeScript enum only namespace.
7854
+ *
7855
+ * @example
7856
+ * ```ts
7857
+ * export enum Foo = {
7858
+ * FOO = 'foo'
7859
+ * }
7860
+ * ```
7861
+ */
7862
+ enum?: Record<string, NamespaceEntry>;
7713
7863
  /**
7714
7864
  * Type namespace. Types, interfaces, and type aliases exist here.
7865
+ *
7715
7866
  * @example
7716
7867
  * ```ts
7717
7868
  * export type Foo = string;
7718
7869
  * ```
7719
7870
  */
7720
- type: Namespace;
7871
+ type?: Record<string, NamespaceEntry>;
7721
7872
  /**
7722
7873
  * Value namespace. Variables, functions, classes, and constants exist here.
7874
+ *
7723
7875
  * @example
7724
7876
  * ```js
7725
7877
  * export const foo = '';
7726
7878
  * ```
7727
7879
  */
7728
- value: Namespace;
7729
- }
7880
+ value?: Record<string, NamespaceEntry>;
7881
+ }>;
7882
+ type Namespace = keyof Identifiers[keyof Identifiers];
7730
7883
  type FileImportResult = Pick<ImportExportItemObject, 'asType' | 'name'>;
7731
7884
  declare class TypeScriptFile {
7732
7885
  /**
@@ -7740,7 +7893,7 @@ declare class TypeScriptFile {
7740
7893
  private _items;
7741
7894
  private _name;
7742
7895
  private _path;
7743
- namespaces: Namespaces;
7896
+ identifiers: Identifiers;
7744
7897
  /**
7745
7898
  * Path relative to the client output root.
7746
7899
  */
@@ -7767,12 +7920,12 @@ declare class TypeScriptFile {
7767
7920
  * we want to avoid attempting to create since we know it won't happen.
7768
7921
  */
7769
7922
  blockIdentifier({ $ref, namespace, }: Pick<EnsureUniqueIdentifierData, '$ref'> & {
7770
- namespace: keyof Namespaces;
7923
+ namespace: Namespace;
7771
7924
  }): Identifier;
7772
7925
  get exportFromIndex(): boolean;
7773
7926
  get id(): string;
7774
- identifier({ namespace, ...args }: Omit<EnsureUniqueIdentifierData, 'case' | 'namespace'> & {
7775
- namespace: keyof Namespaces;
7927
+ identifier(args: Pick<EnsureUniqueIdentifierData, '$ref' | 'count' | 'create' | 'nameTransformer'> & {
7928
+ namespace: Namespace;
7776
7929
  }): Identifier;
7777
7930
  /**
7778
7931
  * Adds an import to the provided module. Handles duplication, returns added
@@ -7802,6 +7955,7 @@ interface EnsureUniqueIdentifierData {
7802
7955
  case: StringCase | undefined;
7803
7956
  count?: number;
7804
7957
  create?: boolean;
7958
+ identifiers: Identifiers;
7805
7959
  /**
7806
7960
  * Transforms name obtained from `$ref` before it's passed to `stringCase()`.
7807
7961
  */
@@ -8168,4 +8322,4 @@ interface WatchValues {
8168
8322
  lastValue?: string;
8169
8323
  }
8170
8324
 
8171
- export { type Client$1 as C, IR as I, LegacyIR as L, OpenApi as O, type PluginHandler as P, type StringCase as S, type UserConfig as U, type WatchValues as W, Client as a, Plugin as b, type Config as c, defaultPlugins as d, initConfigs as i };
8325
+ export { type Client$1 as C, IR as I, LegacyIR as L, OpenApi as O, type PluginHandler as P, type StringCase as S, type UserConfig as U, type WatchValues as W, OpenApiSchemaObject as a, Client as b, Plugin as c, defaultPlugins as d, type Config as e, initConfigs as i };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hey-api/openapi-ts",
3
- "version": "0.69.2",
3
+ "version": "0.71.0",
4
4
  "description": "🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.",
5
5
  "homepage": "https://heyapi.dev/",
6
6
  "repository": {