@hey-api/openapi-ts 0.79.0 → 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-BJ8Em-Ol.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-BJ8Em-Ol.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{I as getSpec,H as initConfigs,F as parseOpenApiSpec}from'./chunk-OKLCYIL3.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
@@ -6701,6 +6701,13 @@ interface UserConfig$l {
6701
6701
  | (string & {})
6702
6702
  | (Record<string, unknown> & { path?: never })
6703
6703
  | Input;
6704
+ /**
6705
+ * Show an interactive error reporting tool when the program crashes? You
6706
+ * generally want to keep this disabled (default).
6707
+ *
6708
+ * @default false
6709
+ */
6710
+ interactive?: boolean;
6704
6711
  /**
6705
6712
  * The relative location of the logs folder.
6706
6713
  *
@@ -8844,10 +8851,14 @@ type Config$7 = Plugin.Name<'@hey-api/typescript'> & {
8844
8851
  tree: boolean;
8845
8852
  };
8846
8853
 
8854
+ interface PluginState {
8855
+ usedTypeIDs: Set<string>;
8856
+ }
8857
+
8847
8858
  type HeyApiTypeScriptPlugin = DefinePlugin<UserConfig$8, Config$7, Api$2>;
8848
8859
 
8849
8860
  type OnRef = (id: string) => void;
8850
- declare const schemaToType: ({ onRef, plugin, schema, }: {
8861
+ declare const schemaToType: ({ onRef, plugin, schema, state, }: {
8851
8862
  /**
8852
8863
  * Callback that can be used to perform side-effects when we encounter a
8853
8864
  * reference. For example, we might want to import the referenced type.
@@ -8855,6 +8866,7 @@ declare const schemaToType: ({ onRef, plugin, schema, }: {
8855
8866
  onRef: OnRef | undefined;
8856
8867
  plugin: HeyApiTypeScriptPlugin["Instance"];
8857
8868
  schema: IR.SchemaObject;
8869
+ state: PluginState;
8858
8870
  }) => ts__default.TypeNode;
8859
8871
 
8860
8872
  type GetIdArgs$1 = {
@@ -11882,6 +11894,7 @@ interface IRSchemaObject
11882
11894
  | 'pattern'
11883
11895
  | 'required'
11884
11896
  | 'title'
11897
+ | 'example'
11885
11898
  > {
11886
11899
  /**
11887
11900
  * If the schema is intended to be used as an object property, it can be
@@ -6701,6 +6701,13 @@ interface UserConfig$l {
6701
6701
  | (string & {})
6702
6702
  | (Record<string, unknown> & { path?: never })
6703
6703
  | Input;
6704
+ /**
6705
+ * Show an interactive error reporting tool when the program crashes? You
6706
+ * generally want to keep this disabled (default).
6707
+ *
6708
+ * @default false
6709
+ */
6710
+ interactive?: boolean;
6704
6711
  /**
6705
6712
  * The relative location of the logs folder.
6706
6713
  *
@@ -8844,10 +8851,14 @@ type Config$7 = Plugin.Name<'@hey-api/typescript'> & {
8844
8851
  tree: boolean;
8845
8852
  };
8846
8853
 
8854
+ interface PluginState {
8855
+ usedTypeIDs: Set<string>;
8856
+ }
8857
+
8847
8858
  type HeyApiTypeScriptPlugin = DefinePlugin<UserConfig$8, Config$7, Api$2>;
8848
8859
 
8849
8860
  type OnRef = (id: string) => void;
8850
- declare const schemaToType: ({ onRef, plugin, schema, }: {
8861
+ declare const schemaToType: ({ onRef, plugin, schema, state, }: {
8851
8862
  /**
8852
8863
  * Callback that can be used to perform side-effects when we encounter a
8853
8864
  * reference. For example, we might want to import the referenced type.
@@ -8855,6 +8866,7 @@ declare const schemaToType: ({ onRef, plugin, schema, }: {
8855
8866
  onRef: OnRef | undefined;
8856
8867
  plugin: HeyApiTypeScriptPlugin["Instance"];
8857
8868
  schema: IR.SchemaObject;
8869
+ state: PluginState;
8858
8870
  }) => ts__default.TypeNode;
8859
8871
 
8860
8872
  type GetIdArgs$1 = {
@@ -11882,6 +11894,7 @@ interface IRSchemaObject
11882
11894
  | 'pattern'
11883
11895
  | 'required'
11884
11896
  | 'title'
11897
+ | 'example'
11885
11898
  > {
11886
11899
  /**
11887
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.0",
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": {
@@ -88,6 +88,7 @@
88
88
  "typescript": "^5.5.3"
89
89
  },
90
90
  "devDependencies": {
91
+ "@types/bun": "1.2.19",
91
92
  "@types/cross-spawn": "6.0.6",
92
93
  "@types/express": "4.17.21",
93
94
  "axios": "1.8.2",