@hey-api/openapi-ts 0.79.1 → 0.79.2

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.
@@ -1,4 +1,4 @@
1
- import { k as Config, c as IR, U as UserConfig, W as WatchValues } from './types.d-BRYhp7DX.cjs';
1
+ import { k as Config, c as IR, U as UserConfig, W as WatchValues } from './types.d-GwalOH_C.cjs';
2
2
  import { JSONSchema } from '@hey-api/json-schema-ref-parser';
3
3
  import 'node:fs';
4
4
  import 'typescript';
@@ -1,4 +1,4 @@
1
- import { k as Config, c as IR, U as UserConfig, W as WatchValues } from './types.d-BRYhp7DX.js';
1
+ import { k as Config, c as IR, U as UserConfig, W as WatchValues } from './types.d-GwalOH_C.js';
2
2
  import { JSONSchema } from '@hey-api/json-schema-ref-parser';
3
3
  import 'node:fs';
4
4
  import 'typescript';
package/dist/internal.js CHANGED
@@ -1,2 +1,2 @@
1
- import {createRequire}from'module';export{J as getSpec,I as initConfigs,G as parseOpenApiSpec}from'./chunk-H4ADXQ4D.js';createRequire(import.meta.url);//# sourceMappingURL=internal.js.map
1
+ import {createRequire}from'module';export{J as getSpec,I as initConfigs,G as parseOpenApiSpec}from'./chunk-USY42MA2.js';createRequire(import.meta.url);//# sourceMappingURL=internal.js.map
2
2
  //# sourceMappingURL=internal.js.map
@@ -8851,10 +8851,14 @@ type Config$7 = Plugin.Name<'@hey-api/typescript'> & {
8851
8851
  tree: boolean;
8852
8852
  };
8853
8853
 
8854
+ interface PluginState {
8855
+ usedTypeIDs: Set<string>;
8856
+ }
8857
+
8854
8858
  type HeyApiTypeScriptPlugin = DefinePlugin<UserConfig$8, Config$7, Api$2>;
8855
8859
 
8856
8860
  type OnRef = (id: string) => void;
8857
- declare const schemaToType: ({ onRef, plugin, schema, }: {
8861
+ declare const schemaToType: ({ onRef, plugin, schema, state, }: {
8858
8862
  /**
8859
8863
  * Callback that can be used to perform side-effects when we encounter a
8860
8864
  * reference. For example, we might want to import the referenced type.
@@ -8862,6 +8866,7 @@ declare const schemaToType: ({ onRef, plugin, schema, }: {
8862
8866
  onRef: OnRef | undefined;
8863
8867
  plugin: HeyApiTypeScriptPlugin["Instance"];
8864
8868
  schema: IR.SchemaObject;
8869
+ state: PluginState;
8865
8870
  }) => ts__default.TypeNode;
8866
8871
 
8867
8872
  type GetIdArgs$1 = {
@@ -11889,6 +11894,7 @@ interface IRSchemaObject
11889
11894
  | 'pattern'
11890
11895
  | 'required'
11891
11896
  | 'title'
11897
+ | 'example'
11892
11898
  > {
11893
11899
  /**
11894
11900
  * If the schema is intended to be used as an object property, it can be
@@ -8851,10 +8851,14 @@ type Config$7 = Plugin.Name<'@hey-api/typescript'> & {
8851
8851
  tree: boolean;
8852
8852
  };
8853
8853
 
8854
+ interface PluginState {
8855
+ usedTypeIDs: Set<string>;
8856
+ }
8857
+
8854
8858
  type HeyApiTypeScriptPlugin = DefinePlugin<UserConfig$8, Config$7, Api$2>;
8855
8859
 
8856
8860
  type OnRef = (id: string) => void;
8857
- declare const schemaToType: ({ onRef, plugin, schema, }: {
8861
+ declare const schemaToType: ({ onRef, plugin, schema, state, }: {
8858
8862
  /**
8859
8863
  * Callback that can be used to perform side-effects when we encounter a
8860
8864
  * reference. For example, we might want to import the referenced type.
@@ -8862,6 +8866,7 @@ declare const schemaToType: ({ onRef, plugin, schema, }: {
8862
8866
  onRef: OnRef | undefined;
8863
8867
  plugin: HeyApiTypeScriptPlugin["Instance"];
8864
8868
  schema: IR.SchemaObject;
8869
+ state: PluginState;
8865
8870
  }) => ts__default.TypeNode;
8866
8871
 
8867
8872
  type GetIdArgs$1 = {
@@ -11889,6 +11894,7 @@ interface IRSchemaObject
11889
11894
  | 'pattern'
11890
11895
  | 'required'
11891
11896
  | 'title'
11897
+ | 'example'
11892
11898
  > {
11893
11899
  /**
11894
11900
  * If the schema is intended to be used as an object property, it can be
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hey-api/openapi-ts",
3
- "version": "0.79.1",
3
+ "version": "0.79.2",
4
4
  "description": "🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.",
5
5
  "homepage": "https://heyapi.dev/",
6
6
  "repository": {