@hey-api/openapi-ts 0.84.4 → 0.85.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.
@@ -1,5 +1,5 @@
1
- import { l as Config, L as Logger, c as IR, U as UserConfig, W as WatchValues } from './types.d-fB2fiwrL.cjs';
2
- import { JSONSchema } from '@hey-api/json-schema-ref-parser';
1
+ import { m as Config, b as Logger, d as IR, U as UserConfig, n as Input, W as WatchValues } from './types.d-DIu3K5QP.cjs';
2
+ import { getResolvedInput } from '@hey-api/json-schema-ref-parser';
3
3
  import 'semver';
4
4
  import '@hey-api/codegen-core';
5
5
  import 'node:fs';
@@ -17,33 +17,41 @@ declare const parseOpenApiSpec: ({ config, dependencies, logger, spec, }: {
17
17
  spec: unknown;
18
18
  }) => IR.Context | undefined;
19
19
 
20
+ type ConfigResult = {
21
+ config: Config;
22
+ errors: ReadonlyArray<Error>;
23
+ jobIndex: number;
24
+ };
25
+ type Configs = {
26
+ dependencies: Record<string, string>;
27
+ results: ReadonlyArray<ConfigResult>;
28
+ };
20
29
  /**
21
30
  * @internal
22
31
  */
23
- declare const initConfigs: (userConfig: UserConfig | undefined) => Promise<{
24
- dependencies: Record<string, string>;
25
- results: ReadonlyArray<{
26
- config: Config;
27
- errors: ReadonlyArray<Error>;
28
- }>;
29
- }>;
32
+ declare const initConfigs: ({ logger, userConfigs, }: {
33
+ logger: Logger;
34
+ userConfigs: ReadonlyArray<UserConfig>;
35
+ }) => Promise<Configs>;
30
36
 
31
- interface SpecResponse {
32
- data: JSONSchema;
33
- error?: undefined;
34
- response?: undefined;
35
- }
36
- interface SpecError {
37
- data?: undefined;
37
+ type SpecResponse = {
38
+ arrayBuffer: ArrayBuffer | undefined;
39
+ error?: never;
40
+ resolvedInput: ReturnType<typeof getResolvedInput>;
41
+ response?: never;
42
+ };
43
+ type SpecError = {
44
+ arrayBuffer?: never;
38
45
  error: 'not-modified' | 'not-ok';
46
+ resolvedInput?: never;
39
47
  response: Response;
40
- }
48
+ };
41
49
  /**
42
50
  * @internal
43
51
  */
44
52
  declare const getSpec: ({ fetchOptions, inputPath, timeout, watch, }: {
45
53
  fetchOptions?: RequestInit;
46
- inputPath: Config["input"]["path"];
54
+ inputPath: Input["path"];
47
55
  timeout: number | undefined;
48
56
  watch: WatchValues;
49
57
  }) => Promise<SpecResponse | SpecError>;
@@ -1,5 +1,5 @@
1
- import { l as Config, L as Logger, c as IR, U as UserConfig, W as WatchValues } from './types.d-fB2fiwrL.js';
2
- import { JSONSchema } from '@hey-api/json-schema-ref-parser';
1
+ import { m as Config, b as Logger, d as IR, U as UserConfig, n as Input, W as WatchValues } from './types.d-DIu3K5QP.js';
2
+ import { getResolvedInput } from '@hey-api/json-schema-ref-parser';
3
3
  import 'semver';
4
4
  import '@hey-api/codegen-core';
5
5
  import 'node:fs';
@@ -17,33 +17,41 @@ declare const parseOpenApiSpec: ({ config, dependencies, logger, spec, }: {
17
17
  spec: unknown;
18
18
  }) => IR.Context | undefined;
19
19
 
20
+ type ConfigResult = {
21
+ config: Config;
22
+ errors: ReadonlyArray<Error>;
23
+ jobIndex: number;
24
+ };
25
+ type Configs = {
26
+ dependencies: Record<string, string>;
27
+ results: ReadonlyArray<ConfigResult>;
28
+ };
20
29
  /**
21
30
  * @internal
22
31
  */
23
- declare const initConfigs: (userConfig: UserConfig | undefined) => Promise<{
24
- dependencies: Record<string, string>;
25
- results: ReadonlyArray<{
26
- config: Config;
27
- errors: ReadonlyArray<Error>;
28
- }>;
29
- }>;
32
+ declare const initConfigs: ({ logger, userConfigs, }: {
33
+ logger: Logger;
34
+ userConfigs: ReadonlyArray<UserConfig>;
35
+ }) => Promise<Configs>;
30
36
 
31
- interface SpecResponse {
32
- data: JSONSchema;
33
- error?: undefined;
34
- response?: undefined;
35
- }
36
- interface SpecError {
37
- data?: undefined;
37
+ type SpecResponse = {
38
+ arrayBuffer: ArrayBuffer | undefined;
39
+ error?: never;
40
+ resolvedInput: ReturnType<typeof getResolvedInput>;
41
+ response?: never;
42
+ };
43
+ type SpecError = {
44
+ arrayBuffer?: never;
38
45
  error: 'not-modified' | 'not-ok';
46
+ resolvedInput?: never;
39
47
  response: Response;
40
- }
48
+ };
41
49
  /**
42
50
  * @internal
43
51
  */
44
52
  declare const getSpec: ({ fetchOptions, inputPath, timeout, watch, }: {
45
53
  fetchOptions?: RequestInit;
46
- inputPath: Config["input"]["path"];
54
+ inputPath: Input["path"];
47
55
  timeout: number | undefined;
48
56
  watch: WatchValues;
49
57
  }) => Promise<SpecResponse | SpecError>;
package/dist/internal.js CHANGED
@@ -1,2 +1,2 @@
1
- import {createRequire}from'module';export{L as getSpec,K as initConfigs,D as parseOpenApiSpec}from'./chunk-6VWHNSOV.js';createRequire(import.meta.url);//# sourceMappingURL=internal.js.map
1
+ import {createRequire}from'module';export{L as getSpec,K as initConfigs,D as parseOpenApiSpec}from'./chunk-JIKOAZJ5.js';createRequire(import.meta.url);//# sourceMappingURL=internal.js.map
2
2
  //# sourceMappingURL=internal.js.map
@@ -3,6 +3,100 @@ import { IProject, Selector, Symbol, SymbolIn, Project } from '@hey-api/codegen-
3
3
  import fs from 'node:fs';
4
4
  import typescript__default from 'typescript';
5
5
 
6
+ interface ImportExportItemObject<Name extends string | undefined = string | undefined, Alias extends string | undefined = undefined> {
7
+ alias?: Alias;
8
+ asType?: boolean;
9
+ name: Name;
10
+ }
11
+ /**
12
+ * Print a TypeScript node to a string.
13
+ * @param node the node to print
14
+ * @returns string
15
+ */
16
+ declare function tsNodeToString({ node, unescape, }: {
17
+ node: typescript__default.Node;
18
+ unescape?: boolean;
19
+ }): string;
20
+ type CommentLines = Array<string | null | false | undefined>;
21
+ type CommentObject = {
22
+ jsdoc?: boolean;
23
+ lines: CommentLines;
24
+ };
25
+ type Comments = CommentLines | Array<CommentObject>;
26
+
27
+ type FileImportResult<Name extends string | undefined = string | undefined, Alias extends string | undefined = undefined> = {
28
+ asType?: boolean;
29
+ name: Alias extends string ? Alias : Name;
30
+ };
31
+ /**
32
+ * TODO: remove, it's used by legacy plugins
33
+ *
34
+ * @deprecated
35
+ */
36
+ declare class GeneratedFile {
37
+ /**
38
+ * Should the exports from this file be re-exported in the index barrel file?
39
+ */
40
+ private _exportFromIndex;
41
+ private _headers;
42
+ private _id;
43
+ private _imports;
44
+ private _items;
45
+ private _name;
46
+ private _path;
47
+ constructor({ dir, exportFromIndex, header, id, name, }: {
48
+ dir: string;
49
+ /**
50
+ * Should the exports from this file be re-exported in the index barrel file?
51
+ */
52
+ exportFromIndex?: boolean;
53
+ header?: boolean;
54
+ /**
55
+ * Unique file ID. Used to generate correct relative paths to the file.
56
+ * This should be refactored later as it's basically the file name unless
57
+ * nested inside another folder.
58
+ */
59
+ id: string;
60
+ name: string;
61
+ });
62
+ add(...nodes: Array<typescript__default.Node | string>): void;
63
+ get exportFromIndex(): boolean;
64
+ get id(): string;
65
+ /**
66
+ * Adds an import to the provided module. Handles duplication, returns added
67
+ * import. Returns the imported name. If we import an aliased export, `name`
68
+ * will be equal to the specified `alias`.
69
+ */
70
+ import<Name extends string | undefined = string | undefined, Alias extends string | undefined = undefined>({ module, ...importedItem }: ImportExportItemObject<Name, Alias> & {
71
+ module: string;
72
+ }): FileImportResult<Name, Alias>;
73
+ isEmpty(): boolean;
74
+ nameWithoutExtension(): string;
75
+ remove(options?: Parameters<typeof fs.rmSync>[1]): void;
76
+ /**
77
+ * Removes last node form the stack. Works as undo.
78
+ *
79
+ * @deprecated
80
+ */
81
+ removeNode_LEGACY(): void;
82
+ private _setName;
83
+ private _toString;
84
+ write(separator?: string, tsConfig?: typescript__default.ParsedCommandLine | null): void;
85
+ }
86
+
87
+ /** @deprecated */
88
+ type Files = Record<string, GeneratedFile>;
89
+
90
+ /**
91
+ * Accepts a value, a function returning a value, or a function returning a promise of a value.
92
+ */
93
+ type LazyOrAsync<T> = T | (() => T) | (() => Promise<T>);
94
+
95
+ /**
96
+ * Accepts a value or a readonly array of values of type T.
97
+ */
98
+ type MaybeArray<T> = T | ReadonlyArray<T>;
99
+
6
100
  interface EnumExtensions {
7
101
  /**
8
102
  * `x-enum-descriptions` are {@link https://stackoverflow.com/a/66471626 supported} by OpenAPI Generator.
@@ -2278,7 +2372,7 @@ interface JsonSchemaDraft2020_12
2278
2372
  /**
2279
2373
  * If it is an array, it must be an array of strings, where each string is the name of one of the basic types, and each element is unique. In this case, the JSON snippet is valid if it matches any of the given types.
2280
2374
  */
2281
- type?: JsonSchemaTypes$1 | ReadonlyArray<JsonSchemaTypes$1>;
2375
+ type?: MaybeArray<JsonSchemaTypes$1>;
2282
2376
  /**
2283
2377
  * The boolean keywords `readOnly` and `writeOnly` are typically used in an API context. `readOnly` indicates that a value should not be modified. It could be used to indicate that a `PUT` request that changes a value would result in a `400 Bad Request` response. `writeOnly` indicates that a value may be set, but will remain hidden. In could be used to indicate you can set a value with a `PUT` request, but it would not be included when retrieving that record with a `GET` request.
2284
2378
  */
@@ -2541,7 +2635,16 @@ type ValueToObject = <T extends undefined | string | boolean | number | ((...arg
2541
2635
  mappers: MappersType<T>;
2542
2636
  })) => PlainObject<T>;
2543
2637
 
2544
- type Input = {
2638
+ type JsonSchema = Record<string, unknown>;
2639
+
2640
+ type ApiRegistryShorthands =
2641
+ | `https://get.heyapi.dev/${string}/${string}`
2642
+ | `${string}/${string}`
2643
+ | `readme:@${string}/${string}#${string}`
2644
+ | `readme:${string}`
2645
+ | `scalar:@${string}/${string}`;
2646
+
2647
+ type UserInput = {
2545
2648
  /**
2546
2649
  * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
2547
2650
  *
@@ -2587,14 +2690,7 @@ type Input = {
2587
2690
  * Both JSON and YAML file formats are supported. You can also pass the parsed
2588
2691
  * object directly if you're fetching the file yourself.
2589
2692
  */
2590
- path?:
2591
- | `https://get.heyapi.dev/${string}/${string}`
2592
- | `${string}/${string}`
2593
- | `readme:@${string}/${string}#${string}`
2594
- | `readme:${string}`
2595
- | `scalar:@${string}/${string}`
2596
- | (string & {})
2597
- | Record<string, unknown>;
2693
+ path?: ApiRegistryShorthands | (string & {}) | JsonSchema;
2598
2694
  /**
2599
2695
  * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
2600
2696
  *
@@ -2626,6 +2722,89 @@ type Input = {
2626
2722
  watch?: boolean | number | Watch;
2627
2723
  };
2628
2724
 
2725
+ type Input = {
2726
+ /**
2727
+ * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
2728
+ *
2729
+ * Projects are private by default, you will need to be authenticated
2730
+ * to download OpenAPI specifications. We recommend using project API
2731
+ * keys in CI workflows and personal API keys for local development.
2732
+ *
2733
+ * API key isn't required for public projects. You can also omit this
2734
+ * parameter and provide an environment variable `HEY_API_TOKEN`.
2735
+ */
2736
+ api_key?: string;
2737
+ /**
2738
+ * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
2739
+ *
2740
+ * You can fetch the last build from branch by providing the branch
2741
+ * name.
2742
+ */
2743
+ branch?: string;
2744
+ /**
2745
+ * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
2746
+ *
2747
+ * You can fetch an exact specification by providing a commit sha.
2748
+ * This will always return the same file.
2749
+ */
2750
+ commit_sha?: string;
2751
+ /**
2752
+ * You can pass any valid Fetch API options to the request for fetching your
2753
+ * specification. This is useful if your file is behind auth for example.
2754
+ */
2755
+ fetch?: RequestInit;
2756
+ /**
2757
+ * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
2758
+ *
2759
+ * Organization created in Hey API Platform.
2760
+ */
2761
+ organization?: string;
2762
+ /**
2763
+ * Path to the OpenAPI specification. This can be:
2764
+ * - path
2765
+ * - URL
2766
+ * - API registry shorthand
2767
+ *
2768
+ * Both JSON and YAML file formats are supported. You can also pass the parsed
2769
+ * object directly if you're fetching the file yourself.
2770
+ */
2771
+ path: ApiRegistryShorthands | (string & {}) | JsonSchema;
2772
+ /**
2773
+ * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
2774
+ *
2775
+ * Project created in Hey API Platform.
2776
+ */
2777
+ project?: string;
2778
+ /**
2779
+ * If input path was resolved to a registry, this contains the registry
2780
+ * identifier so we don't need to parse it again.
2781
+ *
2782
+ * @default undefined
2783
+ */
2784
+ registry?: 'hey-api' | 'readme' | 'scalar';
2785
+ /**
2786
+ * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
2787
+ *
2788
+ * If you're tagging your specifications with custom tags, you can use
2789
+ * them to filter the results. When you provide multiple tags, only
2790
+ * the first match will be returned.
2791
+ */
2792
+ tags?: ReadonlyArray<string>;
2793
+ /**
2794
+ * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
2795
+ *
2796
+ * Every OpenAPI document contains a required version field. You can
2797
+ * use this value to fetch the last uploaded specification matching
2798
+ * the value.
2799
+ */
2800
+ version?: string;
2801
+ /**
2802
+ * Regenerate the client when the input file changes? You can alternatively
2803
+ * pass a numeric value for the interval in ms.
2804
+ */
2805
+ watch: Watch;
2806
+ };
2807
+
2629
2808
  type Watch = {
2630
2809
  /**
2631
2810
  * Regenerate the client when the input file changes?
@@ -2693,6 +2872,8 @@ type Formatters = 'biome' | 'prettier';
2693
2872
 
2694
2873
  type Linters = 'biome' | 'eslint' | 'oxlint';
2695
2874
 
2875
+ type ImportFileExtensions = '.js' | '.ts';
2876
+
2696
2877
  type UserOutput = {
2697
2878
  /**
2698
2879
  * Defines casing of the output fields. By default, we preserve `input`
@@ -2700,7 +2881,7 @@ type UserOutput = {
2700
2881
  *
2701
2882
  * @default undefined
2702
2883
  */
2703
- case?: Exclude<StringCase, 'SCREAMING_SNAKE_CASE'>;
2884
+ case?: StringCase;
2704
2885
  /**
2705
2886
  * Clean the `output` folder on every run? If disabled, this folder may
2706
2887
  * be used to store additional files. The default option is `true` to
@@ -2746,11 +2927,20 @@ type UserOutput = {
2746
2927
  suffix?: string | null;
2747
2928
  };
2748
2929
  /**
2749
- * Process output folder with formatter?
2930
+ * Which formatter to use to process output folder?
2750
2931
  *
2751
- * @default false
2932
+ * @default null
2933
+ */
2934
+ format?: Formatters | null;
2935
+ /**
2936
+ * If specified, this will be the file extension used when importing
2937
+ * other modules. By default, we don't add a file extension and let the
2938
+ * runtime resolve it. If you're using moduleResolution `nodenext`, we
2939
+ * default to `.js`.
2940
+ *
2941
+ * @default undefined
2752
2942
  */
2753
- format?: Formatters | false;
2943
+ importFileExtension?: ImportFileExtensions | (string & {}) | null;
2754
2944
  /**
2755
2945
  * Should the exports from plugin files be re-exported in the index
2756
2946
  * barrel file? By default, this is enabled and only default plugins
@@ -2760,11 +2950,11 @@ type UserOutput = {
2760
2950
  */
2761
2951
  indexFile?: boolean;
2762
2952
  /**
2763
- * Process output folder with linter?
2953
+ * Which linter to use to process output folder?
2764
2954
  *
2765
- * @default false
2955
+ * @default null
2766
2956
  */
2767
- lint?: Linters | false;
2957
+ lint?: Linters | null;
2768
2958
  /**
2769
2959
  * The absolute path to the output folder.
2770
2960
  */
@@ -2775,9 +2965,9 @@ type UserOutput = {
2775
2965
  * attempt to find one starting from the location of the
2776
2966
  * `@hey-api/openapi-ts` configuration file and traversing up.
2777
2967
  *
2778
- * @default ''
2968
+ * @default undefined
2779
2969
  */
2780
- tsConfigPath?: 'off' | (string & {});
2970
+ tsConfigPath?: (string & {}) | null;
2781
2971
  };
2782
2972
 
2783
2973
  type Output = {
@@ -2787,7 +2977,7 @@ type Output = {
2787
2977
  *
2788
2978
  * @default undefined
2789
2979
  */
2790
- case?: Exclude<StringCase, 'SCREAMING_SNAKE_CASE'>;
2980
+ case?: StringCase;
2791
2981
  /**
2792
2982
  * Clean the `output` folder on every run? If disabled, this folder may
2793
2983
  * be used to store additional files. The default option is `true` to
@@ -2830,11 +3020,20 @@ type Output = {
2830
3020
  suffix: string | null;
2831
3021
  };
2832
3022
  /**
2833
- * Process output folder with formatter?
3023
+ * Which formatter to use to process output folder?
2834
3024
  *
2835
- * @default false
3025
+ * @default null
3026
+ */
3027
+ format: Formatters | null;
3028
+ /**
3029
+ * If specified, this will be the file extension used when importing
3030
+ * other modules. By default, we don't add a file extension and let the
3031
+ * runtime resolve it. If you're using moduleResolution `nodenext`, we
3032
+ * default to `.js`.
3033
+ *
3034
+ * @default undefined
2836
3035
  */
2837
- format: Formatters | false;
3036
+ importFileExtension: ImportFileExtensions | (string & {}) | null | undefined;
2838
3037
  /**
2839
3038
  * Should the exports from plugin files be re-exported in the index
2840
3039
  * barrel file? By default, this is enabled and only default plugins
@@ -2844,24 +3043,29 @@ type Output = {
2844
3043
  */
2845
3044
  indexFile: boolean;
2846
3045
  /**
2847
- * Process output folder with linter?
3046
+ * Which linter to use to process output folder?
2848
3047
  *
2849
- * @default false
3048
+ * @default null
2850
3049
  */
2851
- lint: Linters | false;
3050
+ lint: Linters | null;
2852
3051
  /**
2853
3052
  * The absolute path to the output folder.
2854
3053
  */
2855
3054
  path: string;
3055
+ /**
3056
+ * The parsed TypeScript configuration used to generate the output.
3057
+ * If no `tsconfig` file path was provided or found, this will be `null`.
3058
+ */
3059
+ tsConfig: typescript__default.ParsedCommandLine | null;
2856
3060
  /**
2857
3061
  * Relative or absolute path to the tsconfig file we should use to
2858
3062
  * generate the output. If a path to tsconfig file is not provided, we
2859
3063
  * attempt to find one starting from the location of the
2860
3064
  * `@hey-api/openapi-ts` configuration file and traversing up.
2861
3065
  *
2862
- * @default ''
3066
+ * @default undefined
2863
3067
  */
2864
- tsConfigPath: 'off' | (string & {});
3068
+ tsConfigPath: (string & {}) | null | undefined;
2865
3069
  };
2866
3070
 
2867
3071
  interface JsonSchemaDraft4 extends EnumExtensions {
@@ -6613,16 +6817,12 @@ interface UserConfig$p {
6613
6817
  * object directly if you're fetching the file yourself.
6614
6818
  *
6615
6819
  * Alternatively, you can define a configuration object with more options.
6820
+ *
6821
+ * If you define an array, we will generate a single output from multiple
6822
+ * inputs. If you define an array of outputs with the same length, we will
6823
+ * generate multiple outputs, one for each input.
6616
6824
  */
6617
- input:
6618
- | `https://get.heyapi.dev/${string}/${string}`
6619
- | `${string}/${string}`
6620
- | `readme:@${string}/${string}#${string}`
6621
- | `readme:${string}`
6622
- | `scalar:@${string}/${string}`
6623
- | (string & {})
6624
- | (Record<string, unknown> & { path?: never })
6625
- | Input;
6825
+ input: MaybeArray<UserInput | Required<UserInput>['path']>;
6626
6826
  /**
6627
6827
  * Show an interactive error reporting tool when the program crashes? You
6628
6828
  * generally want to keep this disabled (default).
@@ -6638,8 +6838,11 @@ interface UserConfig$p {
6638
6838
  logs?: string | Logs;
6639
6839
  /**
6640
6840
  * Path to the output folder.
6841
+ *
6842
+ * If you define an array of outputs with the same length as inputs, we will
6843
+ * generate multiple outputs, one for each input.
6641
6844
  */
6642
- output: string | UserOutput;
6845
+ output: MaybeArray<string | UserOutput>;
6643
6846
  /**
6644
6847
  * Customize how the input is parsed and transformed before it's passed to
6645
6848
  * plugins.
@@ -6728,9 +6931,14 @@ type Config$c = Omit<
6728
6931
  | 'watch'
6729
6932
  > &
6730
6933
  Pick<UserConfig$p, 'base' | 'name' | 'request'> & {
6731
- input: Omit<Input, 'path' | 'watch'> &
6732
- Pick<Required<Input>, 'path'> & { watch: Watch };
6934
+ /**
6935
+ * Path to the input specification.
6936
+ */
6937
+ input: ReadonlyArray<Input>;
6733
6938
  logs: Logs;
6939
+ /**
6940
+ * Path to the output folder.
6941
+ */
6734
6942
  output: Output;
6735
6943
  /**
6736
6944
  * Customize how the input is parsed and transformed before it's passed to
@@ -7563,89 +7771,6 @@ interface Client$1 extends Omit<Client$2, 'operations'> {
7563
7771
  services: Service[];
7564
7772
  }
7565
7773
 
7566
- interface ImportExportItemObject<Name extends string | undefined = string | undefined, Alias extends string | undefined = undefined> {
7567
- alias?: Alias;
7568
- asType?: boolean;
7569
- name: Name;
7570
- }
7571
- /**
7572
- * Print a TypeScript node to a string.
7573
- * @param node the node to print
7574
- * @returns string
7575
- */
7576
- declare function tsNodeToString({ node, unescape, }: {
7577
- node: typescript__default.Node;
7578
- unescape?: boolean;
7579
- }): string;
7580
- type CommentLines = Array<string | null | false | undefined>;
7581
- type CommentObject = {
7582
- jsdoc?: boolean;
7583
- lines: CommentLines;
7584
- };
7585
- type Comments = CommentLines | Array<CommentObject>;
7586
-
7587
- type FileImportResult<Name extends string | undefined = string | undefined, Alias extends string | undefined = undefined> = {
7588
- asType?: boolean;
7589
- name: Alias extends string ? Alias : Name;
7590
- };
7591
- /**
7592
- * TODO: remove, it's used by legacy plugins
7593
- *
7594
- * @deprecated
7595
- */
7596
- declare class GeneratedFile {
7597
- /**
7598
- * Should the exports from this file be re-exported in the index barrel file?
7599
- */
7600
- private _exportFromIndex;
7601
- private _headers;
7602
- private _id;
7603
- private _imports;
7604
- private _items;
7605
- private _name;
7606
- private _path;
7607
- constructor({ dir, exportFromIndex, header, id, name, }: {
7608
- dir: string;
7609
- /**
7610
- * Should the exports from this file be re-exported in the index barrel file?
7611
- */
7612
- exportFromIndex?: boolean;
7613
- header?: boolean;
7614
- /**
7615
- * Unique file ID. Used to generate correct relative paths to the file.
7616
- * This should be refactored later as it's basically the file name unless
7617
- * nested inside another folder.
7618
- */
7619
- id: string;
7620
- name: string;
7621
- });
7622
- add(...nodes: Array<typescript__default.Node | string>): void;
7623
- get exportFromIndex(): boolean;
7624
- get id(): string;
7625
- /**
7626
- * Adds an import to the provided module. Handles duplication, returns added
7627
- * import. Returns the imported name. If we import an aliased export, `name`
7628
- * will be equal to the specified `alias`.
7629
- */
7630
- import<Name extends string | undefined = string | undefined, Alias extends string | undefined = undefined>({ module, ...importedItem }: ImportExportItemObject<Name, Alias> & {
7631
- module: string;
7632
- }): FileImportResult<Name, Alias>;
7633
- isEmpty(): boolean;
7634
- nameWithoutExtension(): string;
7635
- remove(options?: Parameters<typeof fs.rmSync>[1]): void;
7636
- /**
7637
- * Removes last node form the stack. Works as undo.
7638
- *
7639
- * @deprecated
7640
- */
7641
- removeNode_LEGACY(): void;
7642
- private _setName;
7643
- private _toString;
7644
- write(separator?: string, tsConfig?: typescript__default.ParsedCommandLine | null): void;
7645
- }
7646
-
7647
- type Files = Record<string, GeneratedFile>;
7648
-
7649
7774
  type WalkEvents =
7650
7775
  | {
7651
7776
  method: keyof IR$1.PathItemObject;
@@ -9347,7 +9472,7 @@ type IApi$9 = {
9347
9472
  schemaToType: (args: Parameters<typeof schemaToType>[0]) => typescript__default.TypeNode;
9348
9473
  };
9349
9474
 
9350
- type SelectorType$8 = '_JSONValue' | 'AxiosError' | 'createQueryKey' | 'queryOptionsFn' | 'QueryKey' | 'UseMutationOptions' | 'UseQueryOptions';
9475
+ type SelectorType$8 = '_JSONValue' | 'AxiosError' | 'createQueryKey' | 'defineQueryOptions' | 'QueryKey' | 'queryOptionsFn' | 'serializeQueryKeyValue' | 'UseMutationOptions' | 'UseQueryOptions';
9351
9476
  type IApi$8 = {
9352
9477
  /**
9353
9478
  * @param type Selector type.
@@ -9355,8 +9480,10 @@ type IApi$8 = {
9355
9480
  * - `_JSONValue`: never
9356
9481
  * - `AxiosError`: never
9357
9482
  * - `createQueryKey`: never
9358
- * - `queryOptionsFn`: `operation.id` string
9483
+ * - `defineQueryOptions`: never
9359
9484
  * - `QueryKey`: never
9485
+ * - `queryOptionsFn`: `operation.id` string
9486
+ * - `serializeQueryKeyValue`: never
9360
9487
  * - `UseMutationOptions`: never
9361
9488
  * - `UseQueryOptions`: never
9362
9489
  * @returns Selector array
@@ -14190,4 +14317,4 @@ interface WatchValues {
14190
14317
  lastValue?: string;
14191
14318
  }
14192
14319
 
14193
- export { type Comments as C, type DefinePlugin as D, type ExpressionTransformer as E, type ImportExportItemObject as I, Logger as L, OpenApi$3 as O, type PluginHandler as P, type StringCase as S, type TypeTransformer as T, type UserConfig$p as U, type WatchValues as W, Plugin as a, type Client$1 as b, IR$1 as c, OpenApiMetaObject as d, OpenApiOperationObject as e, OpenApiParameterObject as f, OpenApiRequestBodyObject as g, OpenApiResponseObject as h, OpenApiSchemaObject as i, Client as j, LegacyIR as k, type Config$c as l, tsNodeToString as t };
14320
+ export { type Comments as C, type DefinePlugin as D, type ExpressionTransformer as E, type ImportExportItemObject as I, type LazyOrAsync as L, type MaybeArray as M, OpenApi$3 as O, type PluginHandler as P, type StringCase as S, type TypeTransformer as T, type UserConfig$p as U, type WatchValues as W, Plugin as a, Logger as b, type Client$1 as c, IR$1 as d, OpenApiMetaObject as e, OpenApiOperationObject as f, OpenApiParameterObject as g, OpenApiRequestBodyObject as h, OpenApiResponseObject as i, OpenApiSchemaObject as j, Client as k, LegacyIR as l, type Config$c as m, type Input as n, tsNodeToString as t };