@hey-api/openapi-ts 0.78.3 → 0.79.1

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.
@@ -2494,10 +2494,10 @@ type JsonSchemaTypes$1 =
2494
2494
  | 'object'
2495
2495
  | 'string';
2496
2496
 
2497
- interface ImportExportItemObject {
2498
- alias?: string;
2497
+ interface ImportExportItemObject<Name extends string | undefined = string | undefined, Alias extends string | undefined = undefined> {
2498
+ alias?: Alias;
2499
2499
  asType?: boolean;
2500
- name: string;
2500
+ name: Name;
2501
2501
  }
2502
2502
  /**
2503
2503
  * Print a TypeScript node to a string.
@@ -2528,23 +2528,29 @@ type StringCase =
2528
2528
  | 'snake_case'
2529
2529
  | 'SCREAMING_SNAKE_CASE';
2530
2530
 
2531
+ type StringName = string | ((name: string) => string);
2532
+
2531
2533
  interface Identifier {
2532
- /**
2533
- * Did this function add a new property to the file's `identifiers` map?
2534
- */
2535
- created: boolean;
2536
- /**
2537
- * The resolved identifier name. False means the identifier has been blacklisted.
2538
- */
2539
- name: string | false;
2534
+ /**
2535
+ * Did this function add a new property to the file's `identifiers` map?
2536
+ */
2537
+ created: boolean;
2538
+ /**
2539
+ * The resolved identifier name. False means the identifier has been blacklisted.
2540
+ */
2541
+ name: string | false;
2540
2542
  }
2543
+
2541
2544
  type NamespaceEntry = Pick<Identifier, 'name'> & {
2542
- /**
2543
- * Ref to the type in OpenAPI specification.
2544
- */
2545
- $ref: string;
2545
+ /**
2546
+ * Ref to the type in OpenAPI specification.
2547
+ */
2548
+ $ref: string;
2546
2549
  };
2547
- type Identifiers = Record<string, {
2550
+
2551
+ type Identifiers = Record<
2552
+ string,
2553
+ {
2548
2554
  /**
2549
2555
  * TypeScript enum only namespace.
2550
2556
  *
@@ -2574,26 +2580,101 @@ type Identifiers = Record<string, {
2574
2580
  * ```
2575
2581
  */
2576
2582
  value?: Record<string, NamespaceEntry>;
2577
- }>;
2583
+ }
2584
+ >;
2585
+
2578
2586
  type Namespace = keyof Identifiers[keyof Identifiers];
2579
- type FileImportResult = Pick<ImportExportItemObject, 'asType' | 'name'>;
2580
- declare class TypeScriptFile {
2587
+
2588
+ type FileImportResult<
2589
+ Name extends string | undefined = string | undefined,
2590
+ Alias extends string | undefined = undefined,
2591
+ > = {
2592
+ asType?: boolean;
2593
+ name: Alias extends string ? Alias : Name;
2594
+ };
2595
+
2596
+ type NodeInfo = {
2597
+ /**
2598
+ * Is this node exported from the file?
2599
+ *
2600
+ * @default false
2601
+ */
2602
+ exported?: boolean;
2603
+ /**
2604
+ * Reference to the node object.
2605
+ */
2606
+ node: ts__default.TypeReferenceNode;
2607
+ };
2608
+
2609
+ type NodeReference<T = void> = {
2610
+ /**
2611
+ * Factory function that creates the node reference.
2612
+ *
2613
+ * @param name Identifier name.
2614
+ * @returns Reference to the node object.
2615
+ */
2616
+ factory: (name: string) => T;
2617
+ /**
2618
+ * Reference to the node object.
2619
+ */
2620
+ node: T;
2621
+ };
2622
+
2623
+ declare class GeneratedFile {
2624
+ private _case;
2581
2625
  /**
2582
2626
  * Should the exports from this file be re-exported in the index barrel file?
2583
2627
  */
2584
2628
  private _exportFromIndex;
2585
2629
  private _headers;
2586
2630
  private _id;
2587
- private _identifierCase;
2588
2631
  private _imports;
2589
2632
  private _items;
2590
2633
  private _name;
2591
2634
  private _path;
2635
+ /** @deprecated use `names` and `nodes` */
2592
2636
  identifiers: Identifiers;
2637
+ /**
2638
+ * Map of node IDs. This can be used to obtain actual node names. Keys are
2639
+ * node IDs which can be any string, values are names. Values are kept in
2640
+ * sync with `nodes`.
2641
+ *
2642
+ * @example
2643
+ * ```json
2644
+ * {
2645
+ * "#/my-id": "final_name",
2646
+ * "anyId": "name"
2647
+ * }
2648
+ * ```
2649
+ */
2650
+ private names;
2651
+ /**
2652
+ * Another approach for named nodes, with proper support for renaming. Keys
2653
+ * are node IDs and values are an array of references for given ID.
2654
+ */
2655
+ private nodeReferences;
2656
+ /**
2657
+ * Text value from node is kept in sync with `names`.
2658
+ *
2659
+ * @deprecated
2660
+ * @example
2661
+ * ```js
2662
+ * {
2663
+ * "#/my-id": {
2664
+ * "node": TypeReferenceNode
2665
+ * },
2666
+ * "anyId": {
2667
+ * "node": TypeReferenceNode
2668
+ * }
2669
+ * }
2670
+ * ```
2671
+ */
2672
+ private nodes;
2593
2673
  /**
2594
2674
  * Path relative to the client output root.
2595
2675
  */
2596
- constructor({ dir, exportFromIndex, header, id, identifierCase, name, }: {
2676
+ constructor({ case: _case, dir, exportFromIndex, header, id, name, }: {
2677
+ case?: StringCase;
2597
2678
  dir: string;
2598
2679
  /**
2599
2680
  * Should the exports from this file be re-exported in the index barrel file?
@@ -2606,10 +2687,14 @@ declare class TypeScriptFile {
2606
2687
  * nested inside another folder.
2607
2688
  */
2608
2689
  id: string;
2609
- identifierCase?: StringCase;
2610
2690
  name: string;
2611
2691
  });
2612
2692
  add(...nodes: Array<ts__default.Node | string>): void;
2693
+ /**
2694
+ * Adds a reference node for a name. This can be used later to rename
2695
+ * identifiers.
2696
+ */
2697
+ addNodeReference<T>(id: string, node: Pick<NodeReference<T>, 'factory'>): T;
2613
2698
  /**
2614
2699
  * Prevents a specific identifier from being created. This is useful for
2615
2700
  * transformers where we know a certain transformer won't be needed, and
@@ -2619,7 +2704,23 @@ declare class TypeScriptFile {
2619
2704
  namespace: Namespace;
2620
2705
  }): Identifier;
2621
2706
  get exportFromIndex(): boolean;
2707
+ /**
2708
+ * Returns an actual node name. If node doesn't exist throws an error.
2709
+ *
2710
+ * @param id Node ID.
2711
+ * @returns Actual node name.
2712
+ */
2713
+ getName(id: string): string | undefined;
2714
+ /**
2715
+ * Returns a node. If node doesn't exist, creates a blank reference.
2716
+ *
2717
+ * @deprecated
2718
+ * @param id Node ID.
2719
+ * @returns Information about the node.
2720
+ */
2721
+ getNode(id: string): NodeInfo;
2622
2722
  get id(): string;
2723
+ /** @deprecated use `names` and `nodes` */
2623
2724
  identifier(args: Pick<EnsureUniqueIdentifierData, '$ref' | 'count' | 'create' | 'nameTransformer'> & {
2624
2725
  case?: StringCase;
2625
2726
  namespace: Namespace;
@@ -2629,9 +2730,9 @@ declare class TypeScriptFile {
2629
2730
  * import. Returns the imported name. If we import an aliased export, `name`
2630
2731
  * will be equal to the specified `alias`.
2631
2732
  */
2632
- import({ module, ...importedItem }: ImportExportItemObject & {
2733
+ import<Name extends string | undefined = string | undefined, Alias extends string | undefined = undefined>({ module, ...importedItem }: ImportExportItemObject<Name, Alias> & {
2633
2734
  module: string;
2634
- }): FileImportResult;
2735
+ }): FileImportResult<Name, Alias>;
2635
2736
  isEmpty(): boolean;
2636
2737
  nameWithoutExtension(): string;
2637
2738
  relativePathToFile({ context, id, }: {
@@ -2641,10 +2742,31 @@ declare class TypeScriptFile {
2641
2742
  remove(options?: Parameters<typeof fs.rmSync>[1]): void;
2642
2743
  /**
2643
2744
  * Removes last node form the stack. Works as undo.
2745
+ *
2746
+ * @deprecated
2644
2747
  */
2645
- removeNode(): void;
2748
+ removeNode_LEGACY(): void;
2646
2749
  private _setName;
2647
2750
  private _toString;
2751
+ /**
2752
+ * Inserts or updates a node.
2753
+ *
2754
+ * @deprecated
2755
+ * @param id Node ID.
2756
+ * @param args Information about the node.
2757
+ * @returns Updated node.
2758
+ */
2759
+ updateNode(id: string, args: Pick<NodeInfo, 'exported'> & {
2760
+ name: string;
2761
+ }): NodeInfo;
2762
+ /**
2763
+ * Updates collected reference nodes for a name with the latest value.
2764
+ *
2765
+ * @param id Node ID.
2766
+ * @param name Updated name for the nodes.
2767
+ * @returns noop
2768
+ */
2769
+ updateNodeReferences(id: string, name: string): void;
2648
2770
  write(separator?: string, tsConfig?: ts__default.ParsedCommandLine | null): void;
2649
2771
  }
2650
2772
  interface EnsureUniqueIdentifierData {
@@ -2661,23 +2783,27 @@ interface EnsureUniqueIdentifierData {
2661
2783
  }
2662
2784
 
2663
2785
  type ObjectType<T> = Extract<T, Record<string, any>> extends never ? Record<string, any> : Extract<T, Record<string, any>>;
2786
+ type NotArray<T> = T extends any[] ? never : T;
2787
+ type NotFunction<T> = T extends (...args: any[]) => any ? never : T;
2788
+ type PlainObject<T> = T extends object ? NotFunction<T> extends never ? never : NotArray<T> extends never ? never : T : never;
2664
2789
  type MappersType<T> = {
2665
2790
  boolean: T extends boolean ? (value: boolean) => Partial<ObjectType<T>> : never;
2791
+ function: T extends (...args: any[]) => any ? (value: (...args: any[]) => any) => Partial<ObjectType<T>> : never;
2666
2792
  number: T extends number ? (value: number) => Partial<ObjectType<T>> : never;
2667
- object?: (value: Partial<ObjectType<T>>) => Partial<ObjectType<T>>;
2793
+ object?: PlainObject<T> extends never ? never : (value: Partial<PlainObject<T>>, defaultValue: PlainObject<T>) => Partial<ObjectType<T>>;
2668
2794
  string: T extends string ? (value: string) => Partial<ObjectType<T>> : never;
2669
2795
  } extends infer U ? {
2670
2796
  [K in keyof U as U[K] extends never ? never : K]: U[K];
2671
2797
  } : never;
2672
- type IsObjectOnly<T> = T extends Record<string, any> | undefined ? Extract<T, string | boolean | number> extends never ? true : false : false;
2673
- type ValueToObject = <T extends undefined | string | boolean | number | Record<string, any>>(args: {
2798
+ type IsObjectOnly<T> = T extends Record<string, any> | undefined ? Extract<T, string | boolean | number | ((...args: any[]) => any)> extends never ? true : false : false;
2799
+ type ValueToObject = <T extends undefined | string | boolean | number | ((...args: any[]) => any) | Record<string, any>>(args: {
2674
2800
  defaultValue: ObjectType<T>;
2675
2801
  value: T;
2676
2802
  } & (IsObjectOnly<T> extends true ? {
2677
2803
  mappers?: MappersType<T>;
2678
2804
  } : {
2679
2805
  mappers: MappersType<T>;
2680
- })) => ObjectType<T>;
2806
+ })) => PlainObject<T>;
2681
2807
 
2682
2808
  type Input = {
2683
2809
  /**
@@ -6063,7 +6189,7 @@ type Parser = {
6063
6189
  *
6064
6190
  * @default '{{name}}Enum'
6065
6191
  */
6066
- name?: string | ((name: string) => string);
6192
+ name?: StringName;
6067
6193
  };
6068
6194
  /**
6069
6195
  * Your schemas might contain read-only or write-only fields. Using such
@@ -6088,10 +6214,14 @@ type Parser = {
6088
6214
  /**
6089
6215
  * Configuration for generated request-specific schemas.
6090
6216
  *
6217
+ * Can be:
6218
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
6219
+ * - `object`: Full configuration object
6220
+ *
6091
6221
  * @default '{{name}}Writable'
6092
6222
  */
6093
6223
  requests?:
6094
- | string
6224
+ | StringName
6095
6225
  | {
6096
6226
  /**
6097
6227
  * The casing convention to use for generated names.
@@ -6105,15 +6235,19 @@ type Parser = {
6105
6235
  *
6106
6236
  * @default '{{name}}Writable'
6107
6237
  */
6108
- name?: string | ((name: string) => string);
6238
+ name?: StringName;
6109
6239
  };
6110
6240
  /**
6111
6241
  * Configuration for generated response-specific schemas.
6112
6242
  *
6243
+ * Can be:
6244
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
6245
+ * - `object`: Full configuration object
6246
+ *
6113
6247
  * @default '{{name}}'
6114
6248
  */
6115
6249
  responses?:
6116
- | string
6250
+ | StringName
6117
6251
  | {
6118
6252
  /**
6119
6253
  * The casing convention to use for generated names.
@@ -6128,7 +6262,7 @@ type Parser = {
6128
6262
  *
6129
6263
  * @default '{{name}}'
6130
6264
  */
6131
- name?: string | ((name: string) => string);
6265
+ name?: StringName;
6132
6266
  };
6133
6267
  };
6134
6268
  };
@@ -6212,7 +6346,7 @@ type ResolvedParser = {
6212
6346
  *
6213
6347
  * @default '{{name}}Enum'
6214
6348
  */
6215
- name: string | ((name: string) => string);
6349
+ name: StringName;
6216
6350
  };
6217
6351
  /**
6218
6352
  * Your schemas might contain read-only or write-only fields. Using such
@@ -6246,7 +6380,7 @@ type ResolvedParser = {
6246
6380
  *
6247
6381
  * @default '{{name}}Writable'
6248
6382
  */
6249
- name: string | ((name: string) => string);
6383
+ name: StringName;
6250
6384
  };
6251
6385
  /**
6252
6386
  * Configuration for generated response-specific schemas.
@@ -6265,7 +6399,7 @@ type ResolvedParser = {
6265
6399
  *
6266
6400
  * @default '{{name}}'
6267
6401
  */
6268
- name: string | ((name: string) => string);
6402
+ name: StringName;
6269
6403
  };
6270
6404
  };
6271
6405
  };
@@ -6543,7 +6677,7 @@ type Patch = {
6543
6677
  version?: string | ((version: string) => string);
6544
6678
  };
6545
6679
 
6546
- interface UserConfig {
6680
+ interface UserConfig$l {
6547
6681
  /**
6548
6682
  * Path to the config file. Set this value if you don't use the default
6549
6683
  * config file name, or it's not located in the project root.
@@ -6567,6 +6701,13 @@ interface UserConfig {
6567
6701
  | (string & {})
6568
6702
  | (Record<string, unknown> & { path?: never })
6569
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;
6570
6711
  /**
6571
6712
  * The relative location of the logs folder.
6572
6713
  *
@@ -6652,8 +6793,8 @@ interface UserConfig {
6652
6793
  watch?: boolean | number | Watch;
6653
6794
  }
6654
6795
 
6655
- type Config$l = Omit<
6656
- Required<UserConfig>,
6796
+ type Config$9 = Omit<
6797
+ Required<UserConfig$l>,
6657
6798
  | 'base'
6658
6799
  | 'input'
6659
6800
  | 'logs'
@@ -6664,13 +6805,13 @@ type Config$l = Omit<
6664
6805
  | 'request'
6665
6806
  | 'watch'
6666
6807
  > &
6667
- Pick<UserConfig, 'base' | 'name' | 'request'> & {
6808
+ Pick<UserConfig$l, 'base' | 'name' | 'request'> & {
6668
6809
  input: Omit<Input, 'path' | 'watch'> &
6669
6810
  Pick<Required<Input>, 'path'> & {
6670
6811
  watch: Extract<Required<Required<Input>['watch']>, object>;
6671
6812
  };
6672
- logs: Extract<Required<UserConfig['logs']>, object>;
6673
- output: Extract<UserConfig['output'], object>;
6813
+ logs: Extract<Required<UserConfig$l['logs']>, object>;
6814
+ output: Extract<UserConfig$l['output'], object>;
6674
6815
  /**
6675
6816
  * Customize how the input is parsed and transformed before it's passed to
6676
6817
  * plugins.
@@ -6921,7 +7062,7 @@ interface Client$2 {
6921
7062
  * Configuration for parsing and generating the output. This
6922
7063
  * is a mix of user-provided and default values.
6923
7064
  */
6924
- config: Config$l;
7065
+ config: Config$9;
6925
7066
  models: Model[];
6926
7067
  operations: Operation$1[];
6927
7068
  server: string;
@@ -7489,7 +7630,7 @@ interface Client$1 extends Omit<Client$2, 'operations'> {
7489
7630
  services: Service[];
7490
7631
  }
7491
7632
 
7492
- type Files = Record<string, TypeScriptFile>;
7633
+ type Files = Record<string, GeneratedFile>;
7493
7634
 
7494
7635
  type WalkEvents =
7495
7636
  | {
@@ -7541,7 +7682,7 @@ declare class PluginInstance<T extends Plugin.Types = Plugin.Types> {
7541
7682
  name: string;
7542
7683
  output: string;
7543
7684
  });
7544
- createFile(file: IR.ContextFile): TypeScriptFile;
7685
+ createFile(file: IR.ContextFile): GeneratedFile;
7545
7686
  /**
7546
7687
  * Iterates over various input elements as specified by the event types, in
7547
7688
  * a specific order: servers, schemas, parameters, request bodies, then
@@ -7675,7 +7816,7 @@ declare namespace Plugin {
7675
7816
  config: Omit<T['config'], 'output'>;
7676
7817
  };
7677
7818
 
7678
- /** @deprecated - use `definePluginConfig()` instead */
7819
+ /** @deprecated use `definePluginConfig()` instead */
7679
7820
  export type DefineConfig<
7680
7821
  Config extends BaseConfig,
7681
7822
  ResolvedConfig extends BaseConfig = Config,
@@ -7735,7 +7876,7 @@ type DefinePlugin<
7735
7876
  Types: Plugin.Types<Config, ResolvedConfig, Api>;
7736
7877
  };
7737
7878
 
7738
- type Config$k = Plugin.Name<'@hey-api/client-fetch'> &
7879
+ type UserConfig$k = Plugin.Name<'@hey-api/client-fetch'> &
7739
7880
  Client.Config & {
7740
7881
  /**
7741
7882
  * Throw an error instead of returning it in the response?
@@ -7745,9 +7886,9 @@ type Config$k = Plugin.Name<'@hey-api/client-fetch'> &
7745
7886
  throwOnError?: boolean;
7746
7887
  };
7747
7888
 
7748
- type HeyApiClientFetchPlugin = DefinePlugin<Config$k>;
7889
+ type HeyApiClientFetchPlugin = DefinePlugin<UserConfig$k>;
7749
7890
 
7750
- type Config$j = Plugin.Name<'@hey-api/client-next'> &
7891
+ type UserConfig$j = Plugin.Name<'@hey-api/client-next'> &
7751
7892
  Client.Config & {
7752
7893
  /**
7753
7894
  * Throw an error instead of returning it in the response?
@@ -7757,11 +7898,11 @@ type Config$j = Plugin.Name<'@hey-api/client-next'> &
7757
7898
  throwOnError?: boolean;
7758
7899
  };
7759
7900
 
7760
- type HeyApiClientNextPlugin = DefinePlugin<Config$j>;
7901
+ type HeyApiClientNextPlugin = DefinePlugin<UserConfig$j>;
7761
7902
 
7762
- type Config$i = Plugin.Name<'@hey-api/client-nuxt'> & Client.Config;
7903
+ type UserConfig$i = Plugin.Name<'@hey-api/client-nuxt'> & Client.Config;
7763
7904
 
7764
- type HeyApiClientNuxtPlugin = DefinePlugin<Config$i>;
7905
+ type HeyApiClientNuxtPlugin = DefinePlugin<UserConfig$i>;
7765
7906
 
7766
7907
  type PluginHandler =
7767
7908
  | HeyApiClientAxiosPlugin['Handler']
@@ -7833,7 +7974,7 @@ declare namespace Client {
7833
7974
  };
7834
7975
  }
7835
7976
 
7836
- type Config$h = Plugin.Name<'@hey-api/client-axios'> &
7977
+ type UserConfig$h = Plugin.Name<'@hey-api/client-axios'> &
7837
7978
  Client.Config & {
7838
7979
  /**
7839
7980
  * Throw an error instead of returning it in the response?
@@ -7843,32 +7984,34 @@ type Config$h = Plugin.Name<'@hey-api/client-axios'> &
7843
7984
  throwOnError?: boolean;
7844
7985
  };
7845
7986
 
7846
- type HeyApiClientAxiosPlugin = DefinePlugin<Config$h>;
7987
+ type HeyApiClientAxiosPlugin = DefinePlugin<UserConfig$h>;
7847
7988
 
7848
- type Config$g = Plugin.Name<'legacy/angular'> &
7989
+ type UserConfig$g = Plugin.Name<'legacy/angular'> &
7849
7990
  Pick<Client.Config, 'output'>;
7850
7991
 
7851
- type HeyApiClientLegacyAngularPlugin = DefinePlugin<Config$g>;
7992
+ type HeyApiClientLegacyAngularPlugin = DefinePlugin<UserConfig$g>;
7852
7993
 
7853
- type Config$f = Plugin.Name<'legacy/axios'> &
7994
+ type UserConfig$f = Plugin.Name<'legacy/axios'> &
7854
7995
  Pick<Client.Config, 'output'>;
7855
7996
 
7856
- type HeyApiClientLegacyAxiosPlugin = DefinePlugin<Config$f>;
7997
+ type HeyApiClientLegacyAxiosPlugin = DefinePlugin<UserConfig$f>;
7857
7998
 
7858
- type Config$e = Plugin.Name<'legacy/fetch'> &
7999
+ type UserConfig$e = Plugin.Name<'legacy/fetch'> &
7859
8000
  Pick<Client.Config, 'output'>;
7860
8001
 
7861
- type HeyApiClientLegacyFetchPlugin = DefinePlugin<Config$e>;
8002
+ type HeyApiClientLegacyFetchPlugin = DefinePlugin<UserConfig$e>;
7862
8003
 
7863
- type Config$d = Plugin.Name<'legacy/node'> & Pick<Client.Config, 'output'>;
8004
+ type UserConfig$d = Plugin.Name<'legacy/node'> &
8005
+ Pick<Client.Config, 'output'>;
7864
8006
 
7865
- type HeyApiClientLegacyNodePlugin = DefinePlugin<Config$d>;
8007
+ type HeyApiClientLegacyNodePlugin = DefinePlugin<UserConfig$d>;
7866
8008
 
7867
- type Config$c = Plugin.Name<'legacy/xhr'> & Pick<Client.Config, 'output'>;
8009
+ type UserConfig$c = Plugin.Name<'legacy/xhr'> &
8010
+ Pick<Client.Config, 'output'>;
7868
8011
 
7869
- type HeyApiClientLegacyXhrPlugin = DefinePlugin<Config$c>;
8012
+ type HeyApiClientLegacyXhrPlugin = DefinePlugin<UserConfig$c>;
7870
8013
 
7871
- type Config$b = Plugin.Name<'@hey-api/schemas'> & {
8014
+ type UserConfig$b = Plugin.Name<'@hey-api/schemas'> & {
7872
8015
  /**
7873
8016
  * Should the exports from the generated files be re-exported in the index
7874
8017
  * barrel file?
@@ -7911,9 +8054,9 @@ type Config$b = Plugin.Name<'@hey-api/schemas'> & {
7911
8054
  type?: 'form' | 'json';
7912
8055
  };
7913
8056
 
7914
- type HeyApiSchemasPlugin = DefinePlugin<Config$b>;
8057
+ type HeyApiSchemasPlugin = DefinePlugin<UserConfig$b>;
7915
8058
 
7916
- type Config$a = Plugin.Name<'@hey-api/sdk'> & {
8059
+ type UserConfig$a = Plugin.Name<'@hey-api/sdk'> & {
7917
8060
  /**
7918
8061
  * Group operation methods into classes? When enabled, you can select which
7919
8062
  * classes to export with `sdk.include` and/or transform their names with
@@ -7940,7 +8083,7 @@ type Config$a = Plugin.Name<'@hey-api/sdk'> & {
7940
8083
  *
7941
8084
  * This option has no effect if `sdk.asClass` is `false`.
7942
8085
  */
7943
- classNameBuilder?: string | ((name: string) => string);
8086
+ classNameBuilder?: StringName;
7944
8087
  /**
7945
8088
  * How should we structure your SDK? By default, we try to infer the ideal
7946
8089
  * structure using `operationId` keywords. If you prefer a flatter structure,
@@ -8000,6 +8143,8 @@ type Config$a = Plugin.Name<'@hey-api/sdk'> & {
8000
8143
  * @default 'sdk'
8001
8144
  */
8002
8145
  output?: string;
8146
+ /** @deprecated - this is an experimental feature, do not use */
8147
+ params_EXPERIMENTAL?: 'default' | 'experiment';
8003
8148
  /**
8004
8149
  * **This feature works only with the Fetch client**
8005
8150
  *
@@ -8086,7 +8231,7 @@ type Config$a = Plugin.Name<'@hey-api/sdk'> & {
8086
8231
  response?: 'body' | 'response';
8087
8232
  };
8088
8233
 
8089
- type ResolvedConfig$8 = Plugin.Name<'@hey-api/sdk'> & {
8234
+ type Config$8 = Plugin.Name<'@hey-api/sdk'> & {
8090
8235
  /**
8091
8236
  * Group operation methods into classes? When enabled, you can select which
8092
8237
  * classes to export with `sdk.include` and/or transform their names with
@@ -8113,7 +8258,7 @@ type ResolvedConfig$8 = Plugin.Name<'@hey-api/sdk'> & {
8113
8258
  *
8114
8259
  * This option has no effect if `sdk.asClass` is `false`.
8115
8260
  */
8116
- classNameBuilder: string | ((name: string) => string);
8261
+ classNameBuilder: StringName;
8117
8262
  /**
8118
8263
  * How should we structure your SDK? By default, we try to infer the ideal
8119
8264
  * structure using `operationId` keywords. If you prefer a flatter structure,
@@ -8173,6 +8318,8 @@ type ResolvedConfig$8 = Plugin.Name<'@hey-api/sdk'> & {
8173
8318
  * @default 'sdk'
8174
8319
  */
8175
8320
  output: string;
8321
+ /** @deprecated - this is an experimental feature, do not use */
8322
+ params_EXPERIMENTAL: 'default' | 'experiment';
8176
8323
  /**
8177
8324
  * **This feature works only with the Fetch client**
8178
8325
  *
@@ -8238,16 +8385,16 @@ type ResolvedConfig$8 = Plugin.Name<'@hey-api/sdk'> & {
8238
8385
  response: 'body' | 'response';
8239
8386
  };
8240
8387
 
8241
- type HeyApiSdkPlugin = DefinePlugin<Config$a, ResolvedConfig$8>;
8388
+ type HeyApiSdkPlugin = DefinePlugin<UserConfig$a, Config$8>;
8242
8389
 
8243
8390
  type ExpressionTransformer = ({ config, dataExpression, file, schema, }: {
8244
- config: Omit<Config$9, 'name'>;
8391
+ config: Omit<UserConfig$9, 'name'>;
8245
8392
  dataExpression?: ts__default.Expression | string;
8246
- file: TypeScriptFile;
8393
+ file: GeneratedFile;
8247
8394
  schema: IR.SchemaObject;
8248
8395
  }) => Array<ts__default.Expression> | undefined;
8249
8396
 
8250
- type Config$9 = Plugin.Name<'@hey-api/transformers'> & {
8397
+ type UserConfig$9 = Plugin.Name<'@hey-api/transformers'> & {
8251
8398
  /**
8252
8399
  * Convert long integers into BigInt values?
8253
8400
  *
@@ -8279,17 +8426,46 @@ type Config$9 = Plugin.Name<'@hey-api/transformers'> & {
8279
8426
  transformers?: ReadonlyArray<ExpressionTransformer>;
8280
8427
  };
8281
8428
 
8282
- type HeyApiTransformersPlugin = DefinePlugin<Config$9>;
8429
+ type HeyApiTransformersPlugin = DefinePlugin<UserConfig$9>;
8283
8430
 
8284
- type EnumsType = 'javascript' | 'typescript' | 'typescript+namespace';
8431
+ type EnumsType = 'javascript' | 'typescript';
8285
8432
 
8286
- type Config$8 = Plugin.Name<'@hey-api/typescript'> & {
8433
+ type UserConfig$8 = Plugin.Name<'@hey-api/typescript'> & {
8287
8434
  /**
8288
8435
  * The casing convention to use for generated names.
8289
8436
  *
8290
8437
  * @default 'PascalCase'
8291
8438
  */
8292
8439
  case?: Exclude<StringCase, 'SCREAMING_SNAKE_CASE'>;
8440
+ /**
8441
+ * Configuration for reusable schema definitions.
8442
+ *
8443
+ * Controls generation of shared types that can be referenced across
8444
+ * requests and responses.
8445
+ *
8446
+ * Can be:
8447
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8448
+ * - `object`: Full configuration object
8449
+ *
8450
+ * @default '{{name}}'
8451
+ */
8452
+ definitions?:
8453
+ | StringName
8454
+ | {
8455
+ /**
8456
+ * The casing convention to use for generated definition names.
8457
+ *
8458
+ * @default 'PascalCase'
8459
+ */
8460
+ case?: StringCase;
8461
+ /**
8462
+ * Custom naming pattern for generated definition names. The name variable
8463
+ * is obtained from the schema name.
8464
+ *
8465
+ * @default '{{name}}'
8466
+ */
8467
+ name?: StringName;
8468
+ };
8293
8469
  /**
8294
8470
  * By default, enums are emitted as types to preserve runtime-free output.
8295
8471
  *
@@ -8331,12 +8507,46 @@ type Config$8 = Plugin.Name<'@hey-api/typescript'> & {
8331
8507
  * Can be:
8332
8508
  * - `javascript`: Generates JavaScript objects
8333
8509
  * - `typescript`: Generates TypeScript enums
8334
- * - `typescript+namespace`: Generates TypeScript enums within a namespace
8335
8510
  *
8336
8511
  * @default 'javascript'
8337
8512
  */
8338
8513
  mode?: EnumsType;
8339
8514
  };
8515
+ /**
8516
+ * Configuration for error-specific types.
8517
+ *
8518
+ * Controls generation of types for error response bodies and status codes.
8519
+ *
8520
+ * Can be:
8521
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8522
+ * - `object`: Full configuration object
8523
+ *
8524
+ * @default '{{name}}Errors'
8525
+ */
8526
+ errors?:
8527
+ | StringName
8528
+ | {
8529
+ /**
8530
+ * The casing convention to use for generated error type names.
8531
+ *
8532
+ * @default 'PascalCase'
8533
+ */
8534
+ case?: StringCase;
8535
+ /**
8536
+ * Custom naming pattern for generated error type names. The name
8537
+ * variable is obtained from the operation name.
8538
+ *
8539
+ * @default '{{name}}Error'
8540
+ */
8541
+ error?: StringName;
8542
+ /**
8543
+ * Custom naming pattern for generated error type names. The name
8544
+ * variable is obtained from the operation name.
8545
+ *
8546
+ * @default '{{name}}Errors'
8547
+ */
8548
+ name?: StringName;
8549
+ };
8340
8550
  /**
8341
8551
  * Should the exports from the generated files be re-exported in the index
8342
8552
  * barrel file?
@@ -8350,6 +8560,70 @@ type Config$8 = Plugin.Name<'@hey-api/typescript'> & {
8350
8560
  * @default 'types'
8351
8561
  */
8352
8562
  output?: string;
8563
+ /**
8564
+ * Configuration for request-specific types.
8565
+ *
8566
+ * Controls generation of types for request bodies, query parameters, path
8567
+ * parameters, and headers.
8568
+ *
8569
+ * Can be:
8570
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8571
+ * - `object`: Full configuration object
8572
+ *
8573
+ * @default '{{name}}Data'
8574
+ */
8575
+ requests?:
8576
+ | StringName
8577
+ | {
8578
+ /**
8579
+ * The casing convention to use for generated request type names.
8580
+ *
8581
+ * @default 'PascalCase'
8582
+ */
8583
+ case?: StringCase;
8584
+ /**
8585
+ * Custom naming pattern for generated request type names. The name
8586
+ * variable is obtained from the operation name.
8587
+ *
8588
+ * @default '{{name}}Data'
8589
+ */
8590
+ name?: StringName;
8591
+ };
8592
+ /**
8593
+ * Configuration for response-specific types.
8594
+ *
8595
+ * Controls generation of types for response bodies and status codes.
8596
+ *
8597
+ * Can be:
8598
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8599
+ * - `object`: Full configuration object
8600
+ *
8601
+ * @default '{{name}}Responses'
8602
+ */
8603
+ responses?:
8604
+ | StringName
8605
+ | {
8606
+ /**
8607
+ * The casing convention to use for generated response type names.
8608
+ *
8609
+ * @default 'PascalCase'
8610
+ */
8611
+ case?: StringCase;
8612
+ /**
8613
+ * Custom naming pattern for generated response type names. The name
8614
+ * variable is obtained from the operation name.
8615
+ *
8616
+ * @default '{{name}}Responses'
8617
+ */
8618
+ name?: StringName;
8619
+ /**
8620
+ * Custom naming pattern for generated response type names. The name
8621
+ * variable is obtained from the operation name.
8622
+ *
8623
+ * @default '{{name}}Response'
8624
+ */
8625
+ response?: StringName;
8626
+ };
8353
8627
 
8354
8628
  // DEPRECATED OPTIONS BELOW
8355
8629
 
@@ -8383,13 +8657,34 @@ type Config$8 = Plugin.Name<'@hey-api/typescript'> & {
8383
8657
  tree?: boolean;
8384
8658
  };
8385
8659
 
8386
- type ResolvedConfig$7 = Plugin.Name<'@hey-api/typescript'> & {
8660
+ type Config$7 = Plugin.Name<'@hey-api/typescript'> & {
8387
8661
  /**
8388
8662
  * The casing convention to use for generated names.
8389
8663
  *
8390
8664
  * @default 'PascalCase'
8391
8665
  */
8392
8666
  case: Exclude<StringCase, 'SCREAMING_SNAKE_CASE'>;
8667
+ /**
8668
+ * Configuration for reusable schema definitions.
8669
+ *
8670
+ * Controls generation of shared types that can be referenced across
8671
+ * requests and responses.
8672
+ */
8673
+ definitions: {
8674
+ /**
8675
+ * The casing convention to use for generated definition names.
8676
+ *
8677
+ * @default 'PascalCase'
8678
+ */
8679
+ case: StringCase;
8680
+ /**
8681
+ * Custom naming pattern for generated definition names. The name variable
8682
+ * is obtained from the schema name.
8683
+ *
8684
+ * @default '{{name}}'
8685
+ */
8686
+ name: StringName;
8687
+ };
8393
8688
  /**
8394
8689
  * By default, enums are emitted as types to preserve runtime-free output.
8395
8690
  *
@@ -8426,12 +8721,42 @@ type ResolvedConfig$7 = Plugin.Name<'@hey-api/typescript'> & {
8426
8721
  * Can be:
8427
8722
  * - `javascript`: Generates JavaScript objects
8428
8723
  * - `typescript`: Generates TypeScript enums
8429
- * - `typescript+namespace`: Generates TypeScript enums within a namespace
8430
8724
  *
8431
8725
  * @default 'javascript'
8432
8726
  */
8433
8727
  mode: EnumsType;
8434
8728
  };
8729
+ /**
8730
+ * Configuration for error-specific types.
8731
+ *
8732
+ * Controls generation of types for error response bodies and status codes.
8733
+ *
8734
+ * Can be:
8735
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8736
+ * - `object`: Full configuration object
8737
+ */
8738
+ errors: {
8739
+ /**
8740
+ * The casing convention to use for generated error type names.
8741
+ *
8742
+ * @default 'PascalCase'
8743
+ */
8744
+ case: StringCase;
8745
+ /**
8746
+ * Custom naming pattern for generated error type names. The name
8747
+ * variable is obtained from the operation name.
8748
+ *
8749
+ * @default '{{name}}Error'
8750
+ */
8751
+ error: StringName;
8752
+ /**
8753
+ * Custom naming pattern for generated error type names. The name
8754
+ * variable is obtained from the operation name.
8755
+ *
8756
+ * @default '{{name}}Errors'
8757
+ */
8758
+ name: StringName;
8759
+ };
8435
8760
  /**
8436
8761
  * Should the exports from the generated files be re-exported in the index
8437
8762
  * barrel file?
@@ -8445,6 +8770,54 @@ type ResolvedConfig$7 = Plugin.Name<'@hey-api/typescript'> & {
8445
8770
  * @default 'types'
8446
8771
  */
8447
8772
  output: string;
8773
+ /**
8774
+ * Configuration for request-specific types.
8775
+ *
8776
+ * Controls generation of types for request bodies, query parameters, path
8777
+ * parameters, and headers.
8778
+ */
8779
+ requests: {
8780
+ /**
8781
+ * The casing convention to use for generated request type names.
8782
+ *
8783
+ * @default 'PascalCase'
8784
+ */
8785
+ case: StringCase;
8786
+ /**
8787
+ * Custom naming pattern for generated request type names. The name
8788
+ * variable is obtained from the operation name.
8789
+ *
8790
+ * @default '{{name}}Data'
8791
+ */
8792
+ name: StringName;
8793
+ };
8794
+ /**
8795
+ * Configuration for response-specific types.
8796
+ *
8797
+ * Controls generation of types for response bodies and status codes.
8798
+ */
8799
+ responses: {
8800
+ /**
8801
+ * The casing convention to use for generated response type names.
8802
+ *
8803
+ * @default 'PascalCase'
8804
+ */
8805
+ case: StringCase;
8806
+ /**
8807
+ * Custom naming pattern for generated response type names. The name
8808
+ * variable is obtained from the operation name.
8809
+ *
8810
+ * @default '{{name}}Responses'
8811
+ */
8812
+ name: StringName;
8813
+ /**
8814
+ * Custom naming pattern for generated response type names. The name
8815
+ * variable is obtained from the operation name.
8816
+ *
8817
+ * @default '{{name}}Response'
8818
+ */
8819
+ response: StringName;
8820
+ };
8448
8821
 
8449
8822
  // DEPRECATED OPTIONS BELOW
8450
8823
 
@@ -8478,9 +8851,34 @@ type ResolvedConfig$7 = Plugin.Name<'@hey-api/typescript'> & {
8478
8851
  tree: boolean;
8479
8852
  };
8480
8853
 
8481
- type HeyApiTypeScriptPlugin = DefinePlugin<Config$8, ResolvedConfig$7>;
8854
+ type HeyApiTypeScriptPlugin = DefinePlugin<UserConfig$8, Config$7, Api$2>;
8855
+
8856
+ type OnRef = (id: string) => void;
8857
+ declare const schemaToType: ({ onRef, plugin, schema, }: {
8858
+ /**
8859
+ * Callback that can be used to perform side-effects when we encounter a
8860
+ * reference. For example, we might want to import the referenced type.
8861
+ */
8862
+ onRef: OnRef | undefined;
8863
+ plugin: HeyApiTypeScriptPlugin["Instance"];
8864
+ schema: IR.SchemaObject;
8865
+ }) => ts__default.TypeNode;
8866
+
8867
+ type GetIdArgs$1 = {
8868
+ type: 'ClientOptions';
8869
+ } | {
8870
+ operation: IR.OperationObject;
8871
+ type: 'data' | 'error' | 'errors' | 'response' | 'responses';
8872
+ } | {
8873
+ type: 'ref';
8874
+ value: string;
8875
+ };
8876
+ type Api$2 = {
8877
+ getId: (args: GetIdArgs$1) => string;
8878
+ schemaToType: (args: Omit<Parameters<typeof schemaToType>[0], 'onRef'> & Pick<Partial<Parameters<typeof schemaToType>[0]>, 'onRef'>) => ts__default.TypeNode;
8879
+ };
8482
8880
 
8483
- type Config$7 = Plugin.Name<'@tanstack/angular-query-experimental'> & {
8881
+ type UserConfig$7 = Plugin.Name<'@tanstack/angular-query-experimental'> & {
8484
8882
  /**
8485
8883
  * The casing convention to use for generated names.
8486
8884
  *
@@ -8503,40 +8901,112 @@ type Config$7 = Plugin.Name<'@tanstack/angular-query-experimental'> & {
8503
8901
  * Configuration for generated infinite query key helpers.
8504
8902
  *
8505
8903
  * See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions}
8904
+ *
8905
+ * Can be:
8906
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
8907
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8908
+ * - `object`: Full configuration object
8909
+ *
8910
+ * @default true
8506
8911
  */
8507
8912
  infiniteQueryKeys?:
8508
8913
  | boolean
8509
- | string
8914
+ | StringName
8510
8915
  | {
8916
+ /**
8917
+ * The casing convention to use for generated names.
8918
+ *
8919
+ * @default 'camelCase'
8920
+ */
8511
8921
  case?: StringCase;
8922
+ /**
8923
+ * Whether to generate infinite query key helpers.
8924
+ *
8925
+ * @default true
8926
+ */
8512
8927
  enabled?: boolean;
8513
- name?: string | ((name: string) => string);
8928
+ /**
8929
+ * Custom naming pattern for generated infinite query key names. The name variable is
8930
+ * obtained from the SDK function name.
8931
+ *
8932
+ * @default '{{name}}InfiniteQueryKey'
8933
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions
8934
+ */
8935
+ name?: StringName;
8514
8936
  };
8515
8937
  /**
8516
8938
  * Configuration for generated infinite query options helpers.
8517
8939
  *
8518
8940
  * See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions}
8941
+ *
8942
+ * Can be:
8943
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
8944
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8945
+ * - `object`: Full configuration object
8946
+ *
8947
+ * @default true
8519
8948
  */
8520
8949
  infiniteQueryOptions?:
8521
8950
  | boolean
8522
- | string
8951
+ | StringName
8523
8952
  | {
8953
+ /**
8954
+ * The casing convention to use for generated names.
8955
+ *
8956
+ * @default 'camelCase'
8957
+ */
8524
8958
  case?: StringCase;
8959
+ /**
8960
+ * Whether to generate infinite query options helpers.
8961
+ *
8962
+ * @default true
8963
+ */
8525
8964
  enabled?: boolean;
8526
- name?: string | ((name: string) => string);
8965
+ /**
8966
+ * Custom naming pattern for generated infinite query options names. The name variable is
8967
+ * obtained from the SDK function name.
8968
+ *
8969
+ * @default '{{name}}InfiniteOptions'
8970
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions
8971
+ */
8972
+ name?: StringName;
8527
8973
  };
8528
8974
  /**
8529
8975
  * Configuration for generated mutation options helpers.
8530
8976
  *
8531
8977
  * See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/useMutation}
8978
+ *
8979
+ * Can be:
8980
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
8981
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8982
+ * - `object`: Full configuration object
8983
+ *
8984
+ * @default true
8532
8985
  */
8533
8986
  mutationOptions?:
8534
8987
  | boolean
8535
- | string
8988
+ | StringName
8536
8989
  | {
8990
+ /**
8991
+ * The casing convention to use for generated names.
8992
+ *
8993
+ * @default 'camelCase'
8994
+ */
8537
8995
  case?: StringCase;
8996
+ /**
8997
+ * Whether to generate mutation options helpers.
8998
+ *
8999
+ * @default true
9000
+ */
8538
9001
  enabled?: boolean;
8539
- name?: string | ((name: string) => string);
9002
+ /**
9003
+ * Custom naming pattern for generated mutation options names. The name variable is
9004
+ * obtained from the SDK function name.
9005
+ *
9006
+ * @default '{{name}}Mutation'
9007
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/useMutation
9008
+ */
9009
+ name?: StringName;
8540
9010
  };
8541
9011
  /**
8542
9012
  * Name of the generated file.
@@ -8548,32 +9018,103 @@ type Config$7 = Plugin.Name<'@tanstack/angular-query-experimental'> & {
8548
9018
  * Configuration for generated query keys.
8549
9019
  *
8550
9020
  * See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/queryKey}
9021
+ *
9022
+ * Can be:
9023
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9024
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9025
+ * - `object`: Full configuration object
9026
+ *
9027
+ * @default true
8551
9028
  */
8552
9029
  queryKeys?:
8553
9030
  | boolean
8554
- | string
9031
+ | StringName
8555
9032
  | {
9033
+ /**
9034
+ * The casing convention to use for generated names.
9035
+ *
9036
+ * @default 'camelCase'
9037
+ */
8556
9038
  case?: StringCase;
9039
+ /**
9040
+ * Whether to generate query keys.
9041
+ *
9042
+ * @default true
9043
+ */
8557
9044
  enabled?: boolean;
8558
- name?: string | ((name: string) => string);
9045
+ /**
9046
+ * Custom naming pattern for generated query key names. The name variable is
9047
+ * obtained from the SDK function name.
9048
+ *
9049
+ * @default '{{name}}QueryKey'
9050
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/queryKey
9051
+ */
9052
+ name?: StringName;
8559
9053
  };
8560
9054
  /**
8561
9055
  * Configuration for generated query options helpers.
8562
9056
  *
8563
9057
  * See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/queryOptions}
9058
+ *
9059
+ * Can be:
9060
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9061
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9062
+ * - `object`: Full configuration object
9063
+ *
9064
+ * @default true
8564
9065
  */
8565
9066
  queryOptions?:
8566
9067
  | boolean
8567
- | string
9068
+ | StringName
8568
9069
  | {
9070
+ /**
9071
+ * The casing convention to use for generated names.
9072
+ *
9073
+ * @default 'camelCase'
9074
+ */
8569
9075
  case?: StringCase;
9076
+ /**
9077
+ * Whether to generate query options helpers.
9078
+ *
9079
+ * @default true
9080
+ */
8570
9081
  enabled?: boolean;
8571
- name?: string | ((name: string) => string);
9082
+ /**
9083
+ * Custom naming pattern for generated query options names. The name variable is
9084
+ * obtained from the SDK function name.
9085
+ *
9086
+ * @default '{{name}}Options'
9087
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/queryOptions
9088
+ */
9089
+ name?: StringName;
8572
9090
  };
8573
9091
  };
8574
9092
 
8575
- type ResolvedConfig$6 =
8576
- Plugin.Name<'@tanstack/angular-query-experimental'> & {
9093
+ type Config$6 = Plugin.Name<'@tanstack/angular-query-experimental'> & {
9094
+ /**
9095
+ * The casing convention to use for generated names.
9096
+ *
9097
+ * @default 'camelCase'
9098
+ */
9099
+ case: StringCase;
9100
+ /**
9101
+ * Add comments from SDK functions to the generated TanStack Query code?
9102
+ *
9103
+ * @default true
9104
+ */
9105
+ comments: boolean;
9106
+ /**
9107
+ * Should the exports from the generated files be re-exported in the index barrel file?
9108
+ *
9109
+ * @default false
9110
+ */
9111
+ exportFromIndex: boolean;
9112
+ /**
9113
+ * Resolved configuration for generated infinite query key helpers.
9114
+ *
9115
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions
9116
+ */
9117
+ infiniteQueryKeys: {
8577
9118
  /**
8578
9119
  * The casing convention to use for generated names.
8579
9120
  *
@@ -8581,78 +9122,139 @@ type ResolvedConfig$6 =
8581
9122
  */
8582
9123
  case: StringCase;
8583
9124
  /**
8584
- * Add comments from SDK functions to the generated TanStack Query code?
9125
+ * Whether to generate infinite query key helpers.
8585
9126
  *
8586
9127
  * @default true
8587
9128
  */
8588
- comments: boolean;
9129
+ enabled: boolean;
8589
9130
  /**
8590
- * Should the exports from the generated files be re-exported in the index barrel file?
9131
+ * Custom naming pattern for generated infinite query key names. The name variable is
9132
+ * obtained from the SDK function name.
8591
9133
  *
8592
- * @default false
9134
+ * @default '{{name}}InfiniteQueryKey'
9135
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions
8593
9136
  */
8594
- exportFromIndex: boolean;
9137
+ name: StringName;
9138
+ };
9139
+ /**
9140
+ * Resolved configuration for generated infinite query options helpers.
9141
+ *
9142
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions
9143
+ */
9144
+ infiniteQueryOptions: {
8595
9145
  /**
8596
- * Resolved configuration for generated infinite query key helpers.
9146
+ * The casing convention to use for generated names.
8597
9147
  *
8598
- * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions
9148
+ * @default 'camelCase'
8599
9149
  */
8600
- infiniteQueryKeys: {
8601
- case: StringCase;
8602
- enabled: boolean;
8603
- name: string | ((name: string) => string);
8604
- };
9150
+ case: StringCase;
9151
+ /**
9152
+ * Whether to generate infinite query options helpers.
9153
+ *
9154
+ * @default true
9155
+ */
9156
+ enabled: boolean;
8605
9157
  /**
8606
- * Resolved configuration for generated infinite query options helpers.
9158
+ * Custom naming pattern for generated infinite query options names. The name variable is
9159
+ * obtained from the SDK function name.
8607
9160
  *
9161
+ * @default '{{name}}InfiniteOptions'
8608
9162
  * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions
8609
9163
  */
8610
- infiniteQueryOptions: {
8611
- case: StringCase;
8612
- enabled: boolean;
8613
- name: string | ((name: string) => string);
8614
- };
9164
+ name: StringName;
9165
+ };
9166
+ /**
9167
+ * Resolved configuration for generated mutation options helpers.
9168
+ *
9169
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/useMutation
9170
+ */
9171
+ mutationOptions: {
9172
+ /**
9173
+ * The casing convention to use for generated names.
9174
+ *
9175
+ * @default 'camelCase'
9176
+ */
9177
+ case: StringCase;
9178
+ /**
9179
+ * Whether to generate mutation options helpers.
9180
+ *
9181
+ * @default true
9182
+ */
9183
+ enabled: boolean;
8615
9184
  /**
8616
- * Resolved configuration for generated mutation options helpers.
9185
+ * Custom naming pattern for generated mutation options names. The name variable is
9186
+ * obtained from the SDK function name.
8617
9187
  *
9188
+ * @default '{{name}}Mutation'
8618
9189
  * @see https://tanstack.com/query/v5/docs/framework/angular/reference/useMutation
8619
9190
  */
8620
- mutationOptions: {
8621
- case: StringCase;
8622
- enabled: boolean;
8623
- name: string | ((name: string) => string);
8624
- };
9191
+ name: StringName;
9192
+ };
9193
+ /**
9194
+ * Name of the generated file.
9195
+ *
9196
+ * @default '@tanstack/angular-query-experimental'
9197
+ */
9198
+ output: string;
9199
+ /**
9200
+ * Resolved configuration for generated query keys.
9201
+ *
9202
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/queryKey
9203
+ */
9204
+ queryKeys: {
8625
9205
  /**
8626
- * Name of the generated file.
9206
+ * The casing convention to use for generated names.
9207
+ *
9208
+ * @default 'camelCase'
9209
+ */
9210
+ case: StringCase;
9211
+ /**
9212
+ * Whether to generate query keys.
8627
9213
  *
8628
- * @default '@tanstack/angular-query-experimental'
9214
+ * @default true
8629
9215
  */
8630
- output: string;
9216
+ enabled: boolean;
8631
9217
  /**
8632
- * Resolved configuration for generated query keys.
9218
+ * Custom naming pattern for generated query key names. The name variable is
9219
+ * obtained from the SDK function name.
8633
9220
  *
9221
+ * @default '{{name}}QueryKey'
8634
9222
  * @see https://tanstack.com/query/v5/docs/framework/angular/reference/queryKey
8635
9223
  */
8636
- queryKeys: {
8637
- case: StringCase;
8638
- enabled: boolean;
8639
- name: string | ((name: string) => string);
8640
- };
9224
+ name: StringName;
9225
+ };
9226
+ /**
9227
+ * Resolved configuration for generated query options helpers.
9228
+ *
9229
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/queryOptions
9230
+ */
9231
+ queryOptions: {
9232
+ /**
9233
+ * The casing convention to use for generated names.
9234
+ *
9235
+ * @default 'camelCase'
9236
+ */
9237
+ case: StringCase;
9238
+ /**
9239
+ * Whether to generate query options helpers.
9240
+ *
9241
+ * @default true
9242
+ */
9243
+ enabled: boolean;
8641
9244
  /**
8642
- * Resolved configuration for generated query options helpers.
9245
+ * Custom naming pattern for generated query options names. The name variable is
9246
+ * obtained from the SDK function name.
8643
9247
  *
9248
+ * @default '{{name}}Options'
8644
9249
  * @see https://tanstack.com/query/v5/docs/framework/angular/reference/queryOptions
8645
9250
  */
8646
- queryOptions: {
8647
- case: StringCase;
8648
- enabled: boolean;
8649
- name: string | ((name: string) => string);
8650
- };
9251
+ name: StringName;
8651
9252
  };
9253
+ };
8652
9254
 
8653
- type TanStackAngularQueryPlugin = DefinePlugin<Config$7, ResolvedConfig$6>;
9255
+ type TanStackAngularQueryPlugin = DefinePlugin<UserConfig$7, Config$6>;
8654
9256
 
8655
- type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
9257
+ type UserConfig$6 = Plugin.Name<'@tanstack/react-query'> & {
8656
9258
  /**
8657
9259
  * The casing convention to use for generated names.
8658
9260
  *
@@ -8683,12 +9285,14 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8683
9285
  *
8684
9286
  * Can be:
8685
9287
  * - `boolean`: Shorthand for `{ enabled: boolean }`
8686
- * - `string`: Shorthand for `{ enabled: true; name: string }`
9288
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8687
9289
  * - `object`: Full configuration object
9290
+ *
9291
+ * @default true
8688
9292
  */
8689
9293
  infiniteQueryKeys?:
8690
9294
  | boolean
8691
- | string
9295
+ | StringName
8692
9296
  | {
8693
9297
  /**
8694
9298
  * The casing convention to use for generated names.
@@ -8709,7 +9313,7 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8709
9313
  * @default '{{name}}InfiniteQueryKey'
8710
9314
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions
8711
9315
  */
8712
- name?: string | ((name: string) => string);
9316
+ name?: StringName;
8713
9317
  };
8714
9318
  /**
8715
9319
  * Configuration for generated infinite query options helpers.
@@ -8718,12 +9322,14 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8718
9322
  *
8719
9323
  * Can be:
8720
9324
  * - `boolean`: Shorthand for `{ enabled: boolean }`
8721
- * - `string`: Shorthand for `{ enabled: true; name: string }`
9325
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8722
9326
  * - `object`: Full configuration object
9327
+ *
9328
+ * @default true
8723
9329
  */
8724
9330
  infiniteQueryOptions?:
8725
9331
  | boolean
8726
- | string
9332
+ | StringName
8727
9333
  | {
8728
9334
  /**
8729
9335
  * The casing convention to use for generated names.
@@ -8744,7 +9350,7 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8744
9350
  * @default '{{name}}InfiniteOptions'
8745
9351
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions
8746
9352
  */
8747
- name?: string | ((name: string) => string);
9353
+ name?: StringName;
8748
9354
  };
8749
9355
  /**
8750
9356
  * Configuration for generated mutation options helpers.
@@ -8753,12 +9359,14 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8753
9359
  *
8754
9360
  * Can be:
8755
9361
  * - `boolean`: Shorthand for `{ enabled: boolean }`
8756
- * - `string`: Shorthand for `{ enabled: true; name: string }`
9362
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8757
9363
  * - `object`: Full configuration object
9364
+ *
9365
+ * @default true
8758
9366
  */
8759
9367
  mutationOptions?:
8760
9368
  | boolean
8761
- | string
9369
+ | StringName
8762
9370
  | {
8763
9371
  /**
8764
9372
  * The casing convention to use for generated names.
@@ -8779,7 +9387,7 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8779
9387
  * @default '{{name}}Mutation'
8780
9388
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/useMutation
8781
9389
  */
8782
- name?: string | ((name: string) => string);
9390
+ name?: StringName;
8783
9391
  };
8784
9392
  /**
8785
9393
  * Name of the generated file.
@@ -8794,12 +9402,14 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8794
9402
  *
8795
9403
  * Can be:
8796
9404
  * - `boolean`: Shorthand for `{ enabled: boolean }`
8797
- * - `string`: Shorthand for `{ enabled: true; name: string }`
9405
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8798
9406
  * - `object`: Full configuration object
9407
+ *
9408
+ * @default true
8799
9409
  */
8800
9410
  queryKeys?:
8801
9411
  | boolean
8802
- | string
9412
+ | StringName
8803
9413
  | {
8804
9414
  /**
8805
9415
  * The casing convention to use for generated names.
@@ -8820,7 +9430,7 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8820
9430
  * @default '{{name}}QueryKey'
8821
9431
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/queryKey
8822
9432
  */
8823
- name?: string | ((name: string) => string);
9433
+ name?: StringName;
8824
9434
  };
8825
9435
  /**
8826
9436
  * Configuration for generated query options helpers.
@@ -8829,12 +9439,14 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8829
9439
  *
8830
9440
  * Can be:
8831
9441
  * - `boolean`: Shorthand for `{ enabled: boolean }`
8832
- * - `string`: Shorthand for `{ enabled: true; name: string }`
9442
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8833
9443
  * - `object`: Full configuration object
9444
+ *
9445
+ * @default true
8834
9446
  */
8835
9447
  queryOptions?:
8836
9448
  | boolean
8837
- | string
9449
+ | StringName
8838
9450
  | {
8839
9451
  /**
8840
9452
  * The casing convention to use for generated names.
@@ -8855,11 +9467,11 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8855
9467
  * @default '{{name}}Options'
8856
9468
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions
8857
9469
  */
8858
- name?: string | ((name: string) => string);
9470
+ name?: StringName;
8859
9471
  };
8860
9472
  };
8861
9473
 
8862
- type ResolvedConfig$5 = Plugin.Name<'@tanstack/react-query'> & {
9474
+ type Config$5 = Plugin.Name<'@tanstack/react-query'> & {
8863
9475
  /**
8864
9476
  * The casing convention to use for generated names.
8865
9477
  *
@@ -8902,7 +9514,7 @@ type ResolvedConfig$5 = Plugin.Name<'@tanstack/react-query'> & {
8902
9514
  * @default '{{name}}InfiniteQueryKey'
8903
9515
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions
8904
9516
  */
8905
- name: string | ((name: string) => string);
9517
+ name: StringName;
8906
9518
  };
8907
9519
  /**
8908
9520
  * Resolved configuration for generated infinite query options helpers.
@@ -8928,7 +9540,7 @@ type ResolvedConfig$5 = Plugin.Name<'@tanstack/react-query'> & {
8928
9540
  * @default '{{name}}InfiniteOptions'
8929
9541
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions
8930
9542
  */
8931
- name: string | ((name: string) => string);
9543
+ name: StringName;
8932
9544
  };
8933
9545
  /**
8934
9546
  * Resolved configuration for generated mutation options helpers.
@@ -8954,7 +9566,7 @@ type ResolvedConfig$5 = Plugin.Name<'@tanstack/react-query'> & {
8954
9566
  * @default '{{name}}Mutation'
8955
9567
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/useMutation
8956
9568
  */
8957
- name: string | ((name: string) => string);
9569
+ name: StringName;
8958
9570
  };
8959
9571
  /**
8960
9572
  * Name of the generated file.
@@ -8986,7 +9598,7 @@ type ResolvedConfig$5 = Plugin.Name<'@tanstack/react-query'> & {
8986
9598
  * @default '{{name}}QueryKey'
8987
9599
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/queryKey
8988
9600
  */
8989
- name: string | ((name: string) => string);
9601
+ name: StringName;
8990
9602
  };
8991
9603
  /**
8992
9604
  * Resolved configuration for generated query options helpers.
@@ -9012,13 +9624,13 @@ type ResolvedConfig$5 = Plugin.Name<'@tanstack/react-query'> & {
9012
9624
  * @default '{{name}}Options'
9013
9625
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions
9014
9626
  */
9015
- name: string | ((name: string) => string);
9627
+ name: StringName;
9016
9628
  };
9017
9629
  };
9018
9630
 
9019
- type TanStackReactQueryPlugin = DefinePlugin<Config$6, ResolvedConfig$5>;
9631
+ type TanStackReactQueryPlugin = DefinePlugin<UserConfig$6, Config$5>;
9020
9632
 
9021
- type Config$5 = Plugin.Name<'@tanstack/solid-query'> & {
9633
+ type UserConfig$5 = Plugin.Name<'@tanstack/solid-query'> & {
9022
9634
  /**
9023
9635
  * The casing convention to use for generated names.
9024
9636
  *
@@ -9041,40 +9653,112 @@ type Config$5 = Plugin.Name<'@tanstack/solid-query'> & {
9041
9653
  * Configuration for generated infinite query key helpers.
9042
9654
  *
9043
9655
  * See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery}
9656
+ *
9657
+ * Can be:
9658
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9659
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9660
+ * - `object`: Full configuration object
9661
+ *
9662
+ * @default true
9044
9663
  */
9045
9664
  infiniteQueryKeys?:
9046
9665
  | boolean
9047
- | string
9666
+ | StringName
9048
9667
  | {
9668
+ /**
9669
+ * The casing convention to use for generated names.
9670
+ *
9671
+ * @default 'camelCase'
9672
+ */
9049
9673
  case?: StringCase;
9674
+ /**
9675
+ * Whether to generate infinite query key helpers.
9676
+ *
9677
+ * @default true
9678
+ */
9050
9679
  enabled?: boolean;
9051
- name?: string | ((name: string) => string);
9680
+ /**
9681
+ * Custom naming pattern for generated infinite query key names. The name variable is
9682
+ * obtained from the SDK function name.
9683
+ *
9684
+ * @default '{{name}}InfiniteQueryKey'
9685
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery
9686
+ */
9687
+ name?: StringName;
9052
9688
  };
9053
9689
  /**
9054
9690
  * Configuration for generated infinite query options helpers.
9055
9691
  *
9056
9692
  * See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery}
9693
+ *
9694
+ * Can be:
9695
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9696
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9697
+ * - `object`: Full configuration object
9698
+ *
9699
+ * @default true
9057
9700
  */
9058
9701
  infiniteQueryOptions?:
9059
9702
  | boolean
9060
- | string
9703
+ | StringName
9061
9704
  | {
9062
- case?: StringCase;
9063
- enabled?: boolean;
9064
- name?: string | ((name: string) => string);
9065
- };
9066
- /**
9705
+ /**
9706
+ * The casing convention to use for generated names.
9707
+ *
9708
+ * @default 'camelCase'
9709
+ */
9710
+ case?: StringCase;
9711
+ /**
9712
+ * Whether to generate infinite query options helpers.
9713
+ *
9714
+ * @default true
9715
+ */
9716
+ enabled?: boolean;
9717
+ /**
9718
+ * Custom naming pattern for generated infinite query options names. The name variable is
9719
+ * obtained from the SDK function name.
9720
+ *
9721
+ * @default '{{name}}InfiniteOptions'
9722
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery
9723
+ */
9724
+ name?: StringName;
9725
+ };
9726
+ /**
9067
9727
  * Configuration for generated mutation options helpers.
9068
9728
  *
9069
9729
  * See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation}
9730
+ *
9731
+ * Can be:
9732
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9733
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9734
+ * - `object`: Full configuration object
9735
+ *
9736
+ * @default true
9070
9737
  */
9071
9738
  mutationOptions?:
9072
9739
  | boolean
9073
- | string
9740
+ | StringName
9074
9741
  | {
9742
+ /**
9743
+ * The casing convention to use for generated names.
9744
+ *
9745
+ * @default 'camelCase'
9746
+ */
9075
9747
  case?: StringCase;
9748
+ /**
9749
+ * Whether to generate mutation options helpers.
9750
+ *
9751
+ * @default true
9752
+ */
9076
9753
  enabled?: boolean;
9077
- name?: string | ((name: string) => string);
9754
+ /**
9755
+ * Custom naming pattern for generated mutation options names. The name variable is
9756
+ * obtained from the SDK function name.
9757
+ *
9758
+ * @default '{{name}}Mutation'
9759
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation
9760
+ */
9761
+ name?: StringName;
9078
9762
  };
9079
9763
  /**
9080
9764
  * Name of the generated file.
@@ -9086,31 +9770,79 @@ type Config$5 = Plugin.Name<'@tanstack/solid-query'> & {
9086
9770
  * Configuration for generated query keys.
9087
9771
  *
9088
9772
  * See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/queryKey}
9773
+ *
9774
+ * Can be:
9775
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9776
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9777
+ * - `object`: Full configuration object
9778
+ *
9779
+ * @default true
9089
9780
  */
9090
9781
  queryKeys?:
9091
9782
  | boolean
9092
- | string
9783
+ | StringName
9093
9784
  | {
9785
+ /**
9786
+ * The casing convention to use for generated names.
9787
+ *
9788
+ * @default 'camelCase'
9789
+ */
9094
9790
  case?: StringCase;
9791
+ /**
9792
+ * Whether to generate query keys.
9793
+ *
9794
+ * @default true
9795
+ */
9095
9796
  enabled?: boolean;
9096
- name?: string | ((name: string) => string);
9797
+ /**
9798
+ * Custom naming pattern for generated query key names. The name variable is
9799
+ * obtained from the SDK function name.
9800
+ *
9801
+ * @default '{{name}}QueryKey'
9802
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/queryKey
9803
+ */
9804
+ name?: StringName;
9097
9805
  };
9098
9806
  /**
9099
9807
  * Configuration for generated query options helpers.
9100
9808
  *
9101
9809
  * See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createQuery}
9810
+ *
9811
+ * Can be:
9812
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9813
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9814
+ * - `object`: Full configuration object
9815
+ *
9816
+ * @default true
9102
9817
  */
9103
9818
  queryOptions?:
9104
9819
  | boolean
9105
- | string
9820
+ | StringName
9106
9821
  | {
9822
+ /**
9823
+ * The casing convention to use for generated names.
9824
+ *
9825
+ * @default 'camelCase'
9826
+ */
9107
9827
  case?: StringCase;
9828
+ /**
9829
+ * Whether to generate query options helpers.
9830
+ *
9831
+ * @default true
9832
+ */
9108
9833
  enabled?: boolean;
9109
- name?: string | ((name: string) => string);
9834
+ /**
9835
+ * Custom naming pattern for generated query options names. The name variable is
9836
+ * obtained from the SDK function name.
9837
+ *
9838
+ * @default '{{name}}Options'
9839
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createQuery
9840
+ */
9841
+ name?: StringName;
9110
9842
  };
9111
9843
  };
9112
9844
 
9113
- type ResolvedConfig$4 = Plugin.Name<'@tanstack/solid-query'> & {
9845
+ type Config$4 = Plugin.Name<'@tanstack/solid-query'> & {
9114
9846
  /**
9115
9847
  * The casing convention to use for generated names.
9116
9848
  *
@@ -9135,9 +9867,26 @@ type ResolvedConfig$4 = Plugin.Name<'@tanstack/solid-query'> & {
9135
9867
  * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery
9136
9868
  */
9137
9869
  infiniteQueryKeys: {
9870
+ /**
9871
+ * The casing convention to use for generated names.
9872
+ *
9873
+ * @default 'camelCase'
9874
+ */
9138
9875
  case: StringCase;
9876
+ /**
9877
+ * Whether to generate infinite query key helpers.
9878
+ *
9879
+ * @default true
9880
+ */
9139
9881
  enabled: boolean;
9140
- name: string | ((name: string) => string);
9882
+ /**
9883
+ * Custom naming pattern for generated infinite query key names. The name variable is
9884
+ * obtained from the SDK function name.
9885
+ *
9886
+ * @default '{{name}}InfiniteQueryKey'
9887
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery
9888
+ */
9889
+ name: StringName;
9141
9890
  };
9142
9891
  /**
9143
9892
  * Resolved configuration for generated infinite query options helpers.
@@ -9145,9 +9894,26 @@ type ResolvedConfig$4 = Plugin.Name<'@tanstack/solid-query'> & {
9145
9894
  * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery
9146
9895
  */
9147
9896
  infiniteQueryOptions: {
9897
+ /**
9898
+ * The casing convention to use for generated names.
9899
+ *
9900
+ * @default 'camelCase'
9901
+ */
9148
9902
  case: StringCase;
9903
+ /**
9904
+ * Whether to generate infinite query options helpers.
9905
+ *
9906
+ * @default true
9907
+ */
9149
9908
  enabled: boolean;
9150
- name: string | ((name: string) => string);
9909
+ /**
9910
+ * Custom naming pattern for generated infinite query options names. The name variable is
9911
+ * obtained from the SDK function name.
9912
+ *
9913
+ * @default '{{name}}InfiniteOptions'
9914
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery
9915
+ */
9916
+ name: StringName;
9151
9917
  };
9152
9918
  /**
9153
9919
  * Resolved configuration for generated mutation options helpers.
@@ -9155,9 +9921,26 @@ type ResolvedConfig$4 = Plugin.Name<'@tanstack/solid-query'> & {
9155
9921
  * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation
9156
9922
  */
9157
9923
  mutationOptions: {
9924
+ /**
9925
+ * The casing convention to use for generated names.
9926
+ *
9927
+ * @default 'camelCase'
9928
+ */
9158
9929
  case: StringCase;
9930
+ /**
9931
+ * Whether to generate mutation options helpers.
9932
+ *
9933
+ * @default true
9934
+ */
9159
9935
  enabled: boolean;
9160
- name: string | ((name: string) => string);
9936
+ /**
9937
+ * Custom naming pattern for generated mutation options names. The name variable is
9938
+ * obtained from the SDK function name.
9939
+ *
9940
+ * @default '{{name}}Mutation'
9941
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation
9942
+ */
9943
+ name: StringName;
9161
9944
  };
9162
9945
  /**
9163
9946
  * Name of the generated file.
@@ -9171,9 +9954,26 @@ type ResolvedConfig$4 = Plugin.Name<'@tanstack/solid-query'> & {
9171
9954
  * @see https://tanstack.com/query/v5/docs/framework/solid/reference/queryKey
9172
9955
  */
9173
9956
  queryKeys: {
9957
+ /**
9958
+ * The casing convention to use for generated names.
9959
+ *
9960
+ * @default 'camelCase'
9961
+ */
9174
9962
  case: StringCase;
9963
+ /**
9964
+ * Whether to generate query keys.
9965
+ *
9966
+ * @default true
9967
+ */
9175
9968
  enabled: boolean;
9176
- name: string | ((name: string) => string);
9969
+ /**
9970
+ * Custom naming pattern for generated query key names. The name variable is
9971
+ * obtained from the SDK function name.
9972
+ *
9973
+ * @default '{{name}}QueryKey'
9974
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/queryKey
9975
+ */
9976
+ name: StringName;
9177
9977
  };
9178
9978
  /**
9179
9979
  * Resolved configuration for generated query options helpers.
@@ -9181,15 +9981,32 @@ type ResolvedConfig$4 = Plugin.Name<'@tanstack/solid-query'> & {
9181
9981
  * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createQuery
9182
9982
  */
9183
9983
  queryOptions: {
9984
+ /**
9985
+ * The casing convention to use for generated names.
9986
+ *
9987
+ * @default 'camelCase'
9988
+ */
9184
9989
  case: StringCase;
9990
+ /**
9991
+ * Whether to generate query options helpers.
9992
+ *
9993
+ * @default true
9994
+ */
9185
9995
  enabled: boolean;
9186
- name: string | ((name: string) => string);
9996
+ /**
9997
+ * Custom naming pattern for generated query options names. The name variable is
9998
+ * obtained from the SDK function name.
9999
+ *
10000
+ * @default '{{name}}Options'
10001
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createQuery
10002
+ */
10003
+ name: StringName;
9187
10004
  };
9188
10005
  };
9189
10006
 
9190
- type TanStackSolidQueryPlugin = DefinePlugin<Config$5, ResolvedConfig$4>;
10007
+ type TanStackSolidQueryPlugin = DefinePlugin<UserConfig$5, Config$4>;
9191
10008
 
9192
- type Config$4 = Plugin.Name<'@tanstack/svelte-query'> & {
10009
+ type UserConfig$4 = Plugin.Name<'@tanstack/svelte-query'> & {
9193
10010
  /**
9194
10011
  * The casing convention to use for generated names.
9195
10012
  *
@@ -9212,40 +10029,112 @@ type Config$4 = Plugin.Name<'@tanstack/svelte-query'> & {
9212
10029
  * Configuration for generated infinite query key helpers.
9213
10030
  *
9214
10031
  * See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery}
10032
+ *
10033
+ * Can be:
10034
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10035
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10036
+ * - `object`: Full configuration object
10037
+ *
10038
+ * @default true
9215
10039
  */
9216
10040
  infiniteQueryKeys?:
9217
10041
  | boolean
9218
- | string
10042
+ | StringName
9219
10043
  | {
10044
+ /**
10045
+ * The casing convention to use for generated names.
10046
+ *
10047
+ * @default 'camelCase'
10048
+ */
9220
10049
  case?: StringCase;
10050
+ /**
10051
+ * Whether to generate infinite query key helpers.
10052
+ *
10053
+ * @default true
10054
+ */
9221
10055
  enabled?: boolean;
9222
- name?: string | ((name: string) => string);
10056
+ /**
10057
+ * Custom naming pattern for generated infinite query key names. The name variable is
10058
+ * obtained from the SDK function name.
10059
+ *
10060
+ * @default '{{name}}InfiniteQueryKey'
10061
+ * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery
10062
+ */
10063
+ name?: StringName;
9223
10064
  };
9224
10065
  /**
9225
10066
  * Configuration for generated infinite query options helpers.
9226
10067
  *
9227
10068
  * See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery}
10069
+ *
10070
+ * Can be:
10071
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10072
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10073
+ * - `object`: Full configuration object
10074
+ *
10075
+ * @default true
9228
10076
  */
9229
10077
  infiniteQueryOptions?:
9230
10078
  | boolean
9231
- | string
10079
+ | StringName
9232
10080
  | {
10081
+ /**
10082
+ * The casing convention to use for generated names.
10083
+ *
10084
+ * @default 'camelCase'
10085
+ */
9233
10086
  case?: StringCase;
10087
+ /**
10088
+ * Whether to generate infinite query options helpers.
10089
+ *
10090
+ * @default true
10091
+ */
9234
10092
  enabled?: boolean;
9235
- name?: string | ((name: string) => string);
10093
+ /**
10094
+ * Custom naming pattern for generated infinite query options names. The name variable is
10095
+ * obtained from the SDK function name.
10096
+ *
10097
+ * @default '{{name}}InfiniteOptions'
10098
+ * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery
10099
+ */
10100
+ name?: StringName;
9236
10101
  };
9237
10102
  /**
9238
10103
  * Configuration for generated mutation options helpers.
9239
10104
  *
9240
- * See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/createMutation}
10105
+ * See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation}
10106
+ *
10107
+ * Can be:
10108
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10109
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10110
+ * - `object`: Full configuration object
10111
+ *
10112
+ * @default true
9241
10113
  */
9242
10114
  mutationOptions?:
9243
10115
  | boolean
9244
- | string
10116
+ | StringName
9245
10117
  | {
10118
+ /**
10119
+ * The casing convention to use for generated names.
10120
+ *
10121
+ * @default 'camelCase'
10122
+ */
9246
10123
  case?: StringCase;
10124
+ /**
10125
+ * Whether to generate mutation options helpers.
10126
+ *
10127
+ * @default true
10128
+ */
9247
10129
  enabled?: boolean;
9248
- name?: string | ((name: string) => string);
10130
+ /**
10131
+ * Custom naming pattern for generated mutation options names. The name variable is
10132
+ * obtained from the SDK function name.
10133
+ *
10134
+ * @default '{{name}}Mutation'
10135
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation
10136
+ */
10137
+ name?: StringName;
9249
10138
  };
9250
10139
  /**
9251
10140
  * Name of the generated file.
@@ -9257,31 +10146,79 @@ type Config$4 = Plugin.Name<'@tanstack/svelte-query'> & {
9257
10146
  * Configuration for generated query keys.
9258
10147
  *
9259
10148
  * See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/queryKey}
10149
+ *
10150
+ * Can be:
10151
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10152
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10153
+ * - `object`: Full configuration object
10154
+ *
10155
+ * @default true
9260
10156
  */
9261
10157
  queryKeys?:
9262
10158
  | boolean
9263
- | string
10159
+ | StringName
9264
10160
  | {
10161
+ /**
10162
+ * The casing convention to use for generated names.
10163
+ *
10164
+ * @default 'camelCase'
10165
+ */
9265
10166
  case?: StringCase;
10167
+ /**
10168
+ * Whether to generate query keys.
10169
+ *
10170
+ * @default true
10171
+ */
9266
10172
  enabled?: boolean;
9267
- name?: string | ((name: string) => string);
10173
+ /**
10174
+ * Custom naming pattern for generated query key names. The name variable is
10175
+ * obtained from the SDK function name.
10176
+ *
10177
+ * @default '{{name}}QueryKey'
10178
+ * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/queryKey
10179
+ */
10180
+ name?: StringName;
9268
10181
  };
9269
10182
  /**
9270
10183
  * Configuration for generated query options helpers.
9271
10184
  *
9272
10185
  * See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/createQuery}
10186
+ *
10187
+ * Can be:
10188
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10189
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10190
+ * - `object`: Full configuration object
10191
+ *
10192
+ * @default true
9273
10193
  */
9274
10194
  queryOptions?:
9275
10195
  | boolean
9276
- | string
10196
+ | StringName
9277
10197
  | {
10198
+ /**
10199
+ * The casing convention to use for generated names.
10200
+ *
10201
+ * @default 'camelCase'
10202
+ */
9278
10203
  case?: StringCase;
10204
+ /**
10205
+ * Whether to generate query options helpers.
10206
+ *
10207
+ * @default true
10208
+ */
9279
10209
  enabled?: boolean;
9280
- name?: string | ((name: string) => string);
10210
+ /**
10211
+ * Custom naming pattern for generated query options names. The name variable is
10212
+ * obtained from the SDK function name.
10213
+ *
10214
+ * @default '{{name}}Options'
10215
+ * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createQuery
10216
+ */
10217
+ name?: StringName;
9281
10218
  };
9282
10219
  };
9283
10220
 
9284
- type ResolvedConfig$3 = Plugin.Name<'@tanstack/svelte-query'> & {
10221
+ type Config$3 = Plugin.Name<'@tanstack/svelte-query'> & {
9285
10222
  /**
9286
10223
  * The casing convention to use for generated names.
9287
10224
  *
@@ -9306,9 +10243,26 @@ type ResolvedConfig$3 = Plugin.Name<'@tanstack/svelte-query'> & {
9306
10243
  * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery
9307
10244
  */
9308
10245
  infiniteQueryKeys: {
10246
+ /**
10247
+ * The casing convention to use for generated names.
10248
+ *
10249
+ * @default 'camelCase'
10250
+ */
9309
10251
  case: StringCase;
10252
+ /**
10253
+ * Whether to generate infinite query key helpers.
10254
+ *
10255
+ * @default true
10256
+ */
9310
10257
  enabled: boolean;
9311
- name: string | ((name: string) => string);
10258
+ /**
10259
+ * Custom naming pattern for generated infinite query key names. The name variable is
10260
+ * obtained from the SDK function name.
10261
+ *
10262
+ * @default '{{name}}InfiniteQueryKey'
10263
+ * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery
10264
+ */
10265
+ name: StringName;
9312
10266
  };
9313
10267
  /**
9314
10268
  * Resolved configuration for generated infinite query options helpers.
@@ -9316,9 +10270,26 @@ type ResolvedConfig$3 = Plugin.Name<'@tanstack/svelte-query'> & {
9316
10270
  * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery
9317
10271
  */
9318
10272
  infiniteQueryOptions: {
10273
+ /**
10274
+ * The casing convention to use for generated names.
10275
+ *
10276
+ * @default 'camelCase'
10277
+ */
9319
10278
  case: StringCase;
10279
+ /**
10280
+ * Whether to generate infinite query options helpers.
10281
+ *
10282
+ * @default true
10283
+ */
9320
10284
  enabled: boolean;
9321
- name: string | ((name: string) => string);
10285
+ /**
10286
+ * Custom naming pattern for generated infinite query options names. The name variable is
10287
+ * obtained from the SDK function name.
10288
+ *
10289
+ * @default '{{name}}InfiniteOptions'
10290
+ * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery
10291
+ */
10292
+ name: StringName;
9322
10293
  };
9323
10294
  /**
9324
10295
  * Resolved configuration for generated mutation options helpers.
@@ -9326,9 +10297,26 @@ type ResolvedConfig$3 = Plugin.Name<'@tanstack/svelte-query'> & {
9326
10297
  * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createMutation
9327
10298
  */
9328
10299
  mutationOptions: {
10300
+ /**
10301
+ * The casing convention to use for generated names.
10302
+ *
10303
+ * @default 'camelCase'
10304
+ */
9329
10305
  case: StringCase;
10306
+ /**
10307
+ * Whether to generate mutation options helpers.
10308
+ *
10309
+ * @default true
10310
+ */
9330
10311
  enabled: boolean;
9331
- name: string | ((name: string) => string);
10312
+ /**
10313
+ * Custom naming pattern for generated mutation options names. The name variable is
10314
+ * obtained from the SDK function name.
10315
+ *
10316
+ * @default '{{name}}Mutation'
10317
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation
10318
+ */
10319
+ name: StringName;
9332
10320
  };
9333
10321
  /**
9334
10322
  * Name of the generated file.
@@ -9342,9 +10330,26 @@ type ResolvedConfig$3 = Plugin.Name<'@tanstack/svelte-query'> & {
9342
10330
  * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/queryKey
9343
10331
  */
9344
10332
  queryKeys: {
10333
+ /**
10334
+ * The casing convention to use for generated names.
10335
+ *
10336
+ * @default 'camelCase'
10337
+ */
9345
10338
  case: StringCase;
10339
+ /**
10340
+ * Whether to generate query keys.
10341
+ *
10342
+ * @default true
10343
+ */
9346
10344
  enabled: boolean;
9347
- name: string | ((name: string) => string);
10345
+ /**
10346
+ * Custom naming pattern for generated query key names. The name variable is
10347
+ * obtained from the SDK function name.
10348
+ *
10349
+ * @default '{{name}}QueryKey'
10350
+ * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/queryKey
10351
+ */
10352
+ name: StringName;
9348
10353
  };
9349
10354
  /**
9350
10355
  * Resolved configuration for generated query options helpers.
@@ -9352,15 +10357,32 @@ type ResolvedConfig$3 = Plugin.Name<'@tanstack/svelte-query'> & {
9352
10357
  * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createQuery
9353
10358
  */
9354
10359
  queryOptions: {
10360
+ /**
10361
+ * The casing convention to use for generated names.
10362
+ *
10363
+ * @default 'camelCase'
10364
+ */
9355
10365
  case: StringCase;
10366
+ /**
10367
+ * Whether to generate query options helpers.
10368
+ *
10369
+ * @default true
10370
+ */
9356
10371
  enabled: boolean;
9357
- name: string | ((name: string) => string);
10372
+ /**
10373
+ * Custom naming pattern for generated query options names. The name variable is
10374
+ * obtained from the SDK function name.
10375
+ *
10376
+ * @default '{{name}}Options'
10377
+ * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createQuery
10378
+ */
10379
+ name: StringName;
9358
10380
  };
9359
10381
  };
9360
10382
 
9361
- type TanStackSvelteQueryPlugin = DefinePlugin<Config$4, ResolvedConfig$3>;
10383
+ type TanStackSvelteQueryPlugin = DefinePlugin<UserConfig$4, Config$3>;
9362
10384
 
9363
- type Config$3 = Plugin.Name<'@tanstack/vue-query'> & {
10385
+ type UserConfig$3 = Plugin.Name<'@tanstack/vue-query'> & {
9364
10386
  /**
9365
10387
  * The casing convention to use for generated names.
9366
10388
  *
@@ -9383,40 +10405,112 @@ type Config$3 = Plugin.Name<'@tanstack/vue-query'> & {
9383
10405
  * Configuration for generated infinite query key helpers.
9384
10406
  *
9385
10407
  * See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions}
10408
+ *
10409
+ * Can be:
10410
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10411
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10412
+ * - `object`: Full configuration object
10413
+ *
10414
+ * @default true
9386
10415
  */
9387
10416
  infiniteQueryKeys?:
9388
10417
  | boolean
9389
- | string
10418
+ | StringName
9390
10419
  | {
10420
+ /**
10421
+ * The casing convention to use for generated names.
10422
+ *
10423
+ * @default 'camelCase'
10424
+ */
9391
10425
  case?: StringCase;
10426
+ /**
10427
+ * Whether to generate infinite query key helpers.
10428
+ *
10429
+ * @default true
10430
+ */
9392
10431
  enabled?: boolean;
9393
- name?: string | ((name: string) => string);
10432
+ /**
10433
+ * Custom naming pattern for generated infinite query key names. The name variable is
10434
+ * obtained from the SDK function name.
10435
+ *
10436
+ * @default '{{name}}InfiniteQueryKey'
10437
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions
10438
+ */
10439
+ name?: StringName;
9394
10440
  };
9395
10441
  /**
9396
10442
  * Configuration for generated infinite query options helpers.
9397
10443
  *
9398
10444
  * See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions}
10445
+ *
10446
+ * Can be:
10447
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10448
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10449
+ * - `object`: Full configuration object
10450
+ *
10451
+ * @default true
9399
10452
  */
9400
10453
  infiniteQueryOptions?:
9401
10454
  | boolean
9402
- | string
10455
+ | StringName
9403
10456
  | {
10457
+ /**
10458
+ * The casing convention to use for generated names.
10459
+ *
10460
+ * @default 'camelCase'
10461
+ */
9404
10462
  case?: StringCase;
10463
+ /**
10464
+ * Whether to generate infinite query options helpers.
10465
+ *
10466
+ * @default true
10467
+ */
9405
10468
  enabled?: boolean;
9406
- name?: string | ((name: string) => string);
10469
+ /**
10470
+ * Custom naming pattern for generated infinite query options names. The name variable is
10471
+ * obtained from the SDK function name.
10472
+ *
10473
+ * @default '{{name}}InfiniteOptions'
10474
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions
10475
+ */
10476
+ name?: StringName;
9407
10477
  };
9408
10478
  /**
9409
10479
  * Configuration for generated mutation options helpers.
9410
10480
  *
9411
10481
  * See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/useMutation}
10482
+ *
10483
+ * Can be:
10484
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10485
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10486
+ * - `object`: Full configuration object
10487
+ *
10488
+ * @default true
9412
10489
  */
9413
10490
  mutationOptions?:
9414
10491
  | boolean
9415
- | string
10492
+ | StringName
9416
10493
  | {
10494
+ /**
10495
+ * The casing convention to use for generated names.
10496
+ *
10497
+ * @default 'camelCase'
10498
+ */
9417
10499
  case?: StringCase;
10500
+ /**
10501
+ * Whether to generate mutation options helpers.
10502
+ *
10503
+ * @default true
10504
+ */
9418
10505
  enabled?: boolean;
9419
- name?: string | ((name: string) => string);
10506
+ /**
10507
+ * Custom naming pattern for generated mutation options names. The name variable is
10508
+ * obtained from the SDK function name.
10509
+ *
10510
+ * @default '{{name}}Mutation'
10511
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/useMutation
10512
+ */
10513
+ name?: StringName;
9420
10514
  };
9421
10515
  /**
9422
10516
  * Name of the generated file.
@@ -9428,31 +10522,79 @@ type Config$3 = Plugin.Name<'@tanstack/vue-query'> & {
9428
10522
  * Configuration for generated query keys.
9429
10523
  *
9430
10524
  * See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/queryKey}
10525
+ *
10526
+ * Can be:
10527
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10528
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10529
+ * - `object`: Full configuration object
10530
+ *
10531
+ * @default true
9431
10532
  */
9432
10533
  queryKeys?:
9433
10534
  | boolean
9434
- | string
10535
+ | StringName
9435
10536
  | {
10537
+ /**
10538
+ * The casing convention to use for generated names.
10539
+ *
10540
+ * @default 'camelCase'
10541
+ */
9436
10542
  case?: StringCase;
10543
+ /**
10544
+ * Whether to generate query keys.
10545
+ *
10546
+ * @default true
10547
+ */
9437
10548
  enabled?: boolean;
9438
- name?: string | ((name: string) => string);
10549
+ /**
10550
+ * Custom naming pattern for generated query key names. The name variable is
10551
+ * obtained from the SDK function name.
10552
+ *
10553
+ * @default '{{name}}QueryKey'
10554
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/queryKey
10555
+ */
10556
+ name?: StringName;
9439
10557
  };
9440
10558
  /**
9441
10559
  * Configuration for generated query options helpers.
9442
10560
  *
9443
10561
  * See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/queryOptions}
10562
+ *
10563
+ * Can be:
10564
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10565
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10566
+ * - `object`: Full configuration object
10567
+ *
10568
+ * @default true
9444
10569
  */
9445
10570
  queryOptions?:
9446
10571
  | boolean
9447
- | string
10572
+ | StringName
9448
10573
  | {
10574
+ /**
10575
+ * The casing convention to use for generated names.
10576
+ *
10577
+ * @default 'camelCase'
10578
+ */
9449
10579
  case?: StringCase;
10580
+ /**
10581
+ * Whether to generate query options helpers.
10582
+ *
10583
+ * @default true
10584
+ */
9450
10585
  enabled?: boolean;
9451
- name?: string | ((name: string) => string);
10586
+ /**
10587
+ * Custom naming pattern for generated query options names. The name variable is
10588
+ * obtained from the SDK function name.
10589
+ *
10590
+ * @default '{{name}}Options'
10591
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/queryOptions
10592
+ */
10593
+ name?: StringName;
9452
10594
  };
9453
10595
  };
9454
10596
 
9455
- type ResolvedConfig$2 = Plugin.Name<'@tanstack/vue-query'> & {
10597
+ type Config$2 = Plugin.Name<'@tanstack/vue-query'> & {
9456
10598
  /**
9457
10599
  * The casing convention to use for generated names.
9458
10600
  *
@@ -9477,9 +10619,26 @@ type ResolvedConfig$2 = Plugin.Name<'@tanstack/vue-query'> & {
9477
10619
  * @see https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions
9478
10620
  */
9479
10621
  infiniteQueryKeys: {
10622
+ /**
10623
+ * The casing convention to use for generated names.
10624
+ *
10625
+ * @default 'camelCase'
10626
+ */
9480
10627
  case: StringCase;
10628
+ /**
10629
+ * Whether to generate infinite query key helpers.
10630
+ *
10631
+ * @default true
10632
+ */
9481
10633
  enabled: boolean;
9482
- name: string | ((name: string) => string);
10634
+ /**
10635
+ * Custom naming pattern for generated infinite query key names. The name variable is
10636
+ * obtained from the SDK function name.
10637
+ *
10638
+ * @default '{{name}}InfiniteQueryKey'
10639
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions
10640
+ */
10641
+ name: StringName;
9483
10642
  };
9484
10643
  /**
9485
10644
  * Resolved configuration for generated infinite query options helpers.
@@ -9487,9 +10646,26 @@ type ResolvedConfig$2 = Plugin.Name<'@tanstack/vue-query'> & {
9487
10646
  * @see https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions
9488
10647
  */
9489
10648
  infiniteQueryOptions: {
10649
+ /**
10650
+ * The casing convention to use for generated names.
10651
+ *
10652
+ * @default 'camelCase'
10653
+ */
9490
10654
  case: StringCase;
10655
+ /**
10656
+ * Whether to generate infinite query options helpers.
10657
+ *
10658
+ * @default true
10659
+ */
9491
10660
  enabled: boolean;
9492
- name: string | ((name: string) => string);
10661
+ /**
10662
+ * Custom naming pattern for generated infinite query options names. The name variable is
10663
+ * obtained from the SDK function name.
10664
+ *
10665
+ * @default '{{name}}InfiniteOptions'
10666
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions
10667
+ */
10668
+ name: StringName;
9493
10669
  };
9494
10670
  /**
9495
10671
  * Resolved configuration for generated mutation options helpers.
@@ -9497,9 +10673,26 @@ type ResolvedConfig$2 = Plugin.Name<'@tanstack/vue-query'> & {
9497
10673
  * @see https://tanstack.com/query/v5/docs/framework/vue/reference/useMutation
9498
10674
  */
9499
10675
  mutationOptions: {
10676
+ /**
10677
+ * The casing convention to use for generated names.
10678
+ *
10679
+ * @default 'camelCase'
10680
+ */
9500
10681
  case: StringCase;
10682
+ /**
10683
+ * Whether to generate mutation options helpers.
10684
+ *
10685
+ * @default true
10686
+ */
9501
10687
  enabled: boolean;
9502
- name: string | ((name: string) => string);
10688
+ /**
10689
+ * Custom naming pattern for generated mutation options names. The name variable is
10690
+ * obtained from the SDK function name.
10691
+ *
10692
+ * @default '{{name}}Mutation'
10693
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/useMutation
10694
+ */
10695
+ name: StringName;
9503
10696
  };
9504
10697
  /**
9505
10698
  * Name of the generated file.
@@ -9513,9 +10706,26 @@ type ResolvedConfig$2 = Plugin.Name<'@tanstack/vue-query'> & {
9513
10706
  * @see https://tanstack.com/query/v5/docs/framework/vue/reference/queryKey
9514
10707
  */
9515
10708
  queryKeys: {
10709
+ /**
10710
+ * The casing convention to use for generated names.
10711
+ *
10712
+ * @default 'camelCase'
10713
+ */
9516
10714
  case: StringCase;
10715
+ /**
10716
+ * Whether to generate query keys.
10717
+ *
10718
+ * @default true
10719
+ */
9517
10720
  enabled: boolean;
9518
- name: string | ((name: string) => string);
10721
+ /**
10722
+ * Custom naming pattern for generated query key names. The name variable is
10723
+ * obtained from the SDK function name.
10724
+ *
10725
+ * @default '{{name}}QueryKey'
10726
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/queryKey
10727
+ */
10728
+ name: StringName;
9519
10729
  };
9520
10730
  /**
9521
10731
  * Resolved configuration for generated query options helpers.
@@ -9523,15 +10733,32 @@ type ResolvedConfig$2 = Plugin.Name<'@tanstack/vue-query'> & {
9523
10733
  * @see https://tanstack.com/query/v5/docs/framework/vue/reference/queryOptions
9524
10734
  */
9525
10735
  queryOptions: {
10736
+ /**
10737
+ * The casing convention to use for generated names.
10738
+ *
10739
+ * @default 'camelCase'
10740
+ */
9526
10741
  case: StringCase;
10742
+ /**
10743
+ * Whether to generate query options helpers.
10744
+ *
10745
+ * @default true
10746
+ */
9527
10747
  enabled: boolean;
9528
- name: string | ((name: string) => string);
10748
+ /**
10749
+ * Custom naming pattern for generated query options names. The name variable is
10750
+ * obtained from the SDK function name.
10751
+ *
10752
+ * @default '{{name}}Options'
10753
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/queryOptions
10754
+ */
10755
+ name: StringName;
9529
10756
  };
9530
10757
  };
9531
10758
 
9532
- type TanStackVueQueryPlugin = DefinePlugin<Config$3, ResolvedConfig$2>;
10759
+ type TanStackVueQueryPlugin = DefinePlugin<UserConfig$3, Config$2>;
9533
10760
 
9534
- type Config$2 = Plugin.Name<'fastify'> & {
10761
+ type UserConfig$2 = Plugin.Name<'fastify'> & {
9535
10762
  /**
9536
10763
  * Should the exports from the generated files be re-exported in the index
9537
10764
  * barrel file?
@@ -9547,9 +10774,9 @@ type Config$2 = Plugin.Name<'fastify'> & {
9547
10774
  output?: string;
9548
10775
  };
9549
10776
 
9550
- type FastifyPlugin = DefinePlugin<Config$2>;
10777
+ type FastifyPlugin = DefinePlugin<UserConfig$2>;
9551
10778
 
9552
- type Config$1 = Plugin.Name<'valibot'> & {
10779
+ type UserConfig$1 = Plugin.Name<'valibot'> & {
9553
10780
  /**
9554
10781
  * The casing convention to use for generated names.
9555
10782
  *
@@ -9570,12 +10797,12 @@ type Config$1 = Plugin.Name<'valibot'> & {
9570
10797
  *
9571
10798
  * Can be:
9572
10799
  * - `boolean`: Shorthand for `{ enabled: boolean }`
9573
- * - `string`: Shorthand for `{ enabled: true; name: string }`
10800
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9574
10801
  * - `object`: Full configuration object
9575
10802
  */
9576
10803
  definitions?:
9577
10804
  | boolean
9578
- | string
10805
+ | StringName
9579
10806
  | {
9580
10807
  /**
9581
10808
  * The casing convention to use for generated names.
@@ -9595,7 +10822,7 @@ type Config$1 = Plugin.Name<'valibot'> & {
9595
10822
  *
9596
10823
  * @default 'v{{name}}'
9597
10824
  */
9598
- name?: string | ((name: string) => string);
10825
+ name?: StringName;
9599
10826
  };
9600
10827
  /**
9601
10828
  * Should the exports from the generated files be re-exported in the index
@@ -9626,12 +10853,12 @@ type Config$1 = Plugin.Name<'valibot'> & {
9626
10853
  *
9627
10854
  * Can be:
9628
10855
  * - `boolean`: Shorthand for `{ enabled: boolean }`
9629
- * - `string`: Shorthand for `{ enabled: true; name: string }`
10856
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9630
10857
  * - `object`: Full configuration object
9631
10858
  */
9632
10859
  requests?:
9633
10860
  | boolean
9634
- | string
10861
+ | StringName
9635
10862
  | {
9636
10863
  /**
9637
10864
  * The casing convention to use for generated names.
@@ -9651,7 +10878,7 @@ type Config$1 = Plugin.Name<'valibot'> & {
9651
10878
  *
9652
10879
  * @default 'v{{name}}Data'
9653
10880
  */
9654
- name?: string | ((name: string) => string);
10881
+ name?: StringName;
9655
10882
  };
9656
10883
  /**
9657
10884
  * Configuration for response-specific Valibot schemas.
@@ -9661,12 +10888,12 @@ type Config$1 = Plugin.Name<'valibot'> & {
9661
10888
  *
9662
10889
  * Can be:
9663
10890
  * - `boolean`: Shorthand for `{ enabled: boolean }`
9664
- * - `string`: Shorthand for `{ enabled: true; name: string }`
10891
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9665
10892
  * - `object`: Full configuration object
9666
10893
  */
9667
10894
  responses?:
9668
10895
  | boolean
9669
- | string
10896
+ | StringName
9670
10897
  | {
9671
10898
  /**
9672
10899
  * The casing convention to use for generated names.
@@ -9686,11 +10913,11 @@ type Config$1 = Plugin.Name<'valibot'> & {
9686
10913
  *
9687
10914
  * @default 'v{{name}}Response'
9688
10915
  */
9689
- name?: string | ((name: string) => string);
10916
+ name?: StringName;
9690
10917
  };
9691
10918
  };
9692
10919
 
9693
- type ResolvedConfig$1 = Plugin.Name<'valibot'> & {
10920
+ type Config$1 = Plugin.Name<'valibot'> & {
9694
10921
  /**
9695
10922
  * The casing convention to use for generated names.
9696
10923
  *
@@ -9728,7 +10955,7 @@ type ResolvedConfig$1 = Plugin.Name<'valibot'> & {
9728
10955
  *
9729
10956
  * @default 'v{{name}}'
9730
10957
  */
9731
- name: string | ((name: string) => string);
10958
+ name: StringName;
9732
10959
  };
9733
10960
  /**
9734
10961
  * Should the exports from the generated files be re-exported in the index
@@ -9776,7 +11003,7 @@ type ResolvedConfig$1 = Plugin.Name<'valibot'> & {
9776
11003
  *
9777
11004
  * @default 'v{{name}}Data'
9778
11005
  */
9779
- name: string | ((name: string) => string);
11006
+ name: StringName;
9780
11007
  };
9781
11008
  /**
9782
11009
  * Configuration for response-specific Valibot schemas.
@@ -9803,26 +11030,26 @@ type ResolvedConfig$1 = Plugin.Name<'valibot'> & {
9803
11030
  *
9804
11031
  * @default 'v{{name}}Response'
9805
11032
  */
9806
- name: string | ((name: string) => string);
11033
+ name: StringName;
9807
11034
  };
9808
11035
  };
9809
11036
 
9810
- type ValibotPlugin = DefinePlugin<Config$1, ResolvedConfig$1, Api$1>;
11037
+ type ValibotPlugin = DefinePlugin<UserConfig$1, Config$1, Api$1>;
9811
11038
 
9812
11039
  type Api$1 = {
9813
11040
  createRequestValidator: (args: {
9814
- file: TypeScriptFile;
11041
+ file: GeneratedFile;
9815
11042
  operation: IR.OperationObject;
9816
11043
  plugin: ValibotPlugin['Instance'];
9817
11044
  }) => ts__default.ArrowFunction | undefined;
9818
11045
  createResponseValidator: (args: {
9819
- file: TypeScriptFile;
11046
+ file: GeneratedFile;
9820
11047
  operation: IR.OperationObject;
9821
11048
  plugin: ValibotPlugin['Instance'];
9822
11049
  }) => ts__default.ArrowFunction | undefined;
9823
11050
  };
9824
11051
 
9825
- type Config = Plugin.Name<'zod'> & {
11052
+ type UserConfig = Plugin.Name<'zod'> & {
9826
11053
  /**
9827
11054
  * The casing convention to use for generated names.
9828
11055
  *
@@ -9860,12 +11087,14 @@ type Config = Plugin.Name<'zod'> & {
9860
11087
  *
9861
11088
  * Can be:
9862
11089
  * - `boolean`: Shorthand for `{ enabled: boolean }`
9863
- * - `string`: Shorthand for `{ enabled: true; name: string }`
11090
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9864
11091
  * - `object`: Full configuration object
11092
+ *
11093
+ * @default true
9865
11094
  */
9866
11095
  definitions?:
9867
11096
  | boolean
9868
- | string
11097
+ | StringName
9869
11098
  | {
9870
11099
  /**
9871
11100
  * The casing convention to use for generated names.
@@ -9880,12 +11109,53 @@ type Config = Plugin.Name<'zod'> & {
9880
11109
  */
9881
11110
  enabled?: boolean;
9882
11111
  /**
9883
- * Custom naming pattern for generated schema names. The name variable is
9884
- * obtained from the schema name.
11112
+ * Custom naming pattern for generated schema names. The name variable
11113
+ * is obtained from the schema name.
9885
11114
  *
9886
11115
  * @default 'z{{name}}'
9887
11116
  */
9888
- name?: string | ((name: string) => string);
11117
+ name?: StringName;
11118
+ /**
11119
+ * Configuration for TypeScript type generation from Zod schemas.
11120
+ *
11121
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11122
+ */
11123
+ types?: {
11124
+ /**
11125
+ * Configuration for `z.infer` types.
11126
+ *
11127
+ * Can be:
11128
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
11129
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
11130
+ * - `object`: Full configuration object
11131
+ *
11132
+ * @default false
11133
+ */
11134
+ infer?:
11135
+ | boolean
11136
+ | StringName
11137
+ | {
11138
+ /**
11139
+ * The casing convention to use for generated type names.
11140
+ *
11141
+ * @default 'PascalCase'
11142
+ */
11143
+ case?: StringCase;
11144
+ /**
11145
+ * Whether to generate TypeScript types from Zod schemas.
11146
+ *
11147
+ * @default true
11148
+ */
11149
+ enabled?: boolean;
11150
+ /**
11151
+ * Custom naming pattern for generated type names. The name variable is
11152
+ * obtained from the Zod schema name.
11153
+ *
11154
+ * @default '{{name}}ZodType'
11155
+ */
11156
+ name?: StringName;
11157
+ };
11158
+ };
9889
11159
  };
9890
11160
  /**
9891
11161
  * Should the exports from the generated files be re-exported in the index
@@ -9916,12 +11186,14 @@ type Config = Plugin.Name<'zod'> & {
9916
11186
  *
9917
11187
  * Can be:
9918
11188
  * - `boolean`: Shorthand for `{ enabled: boolean }`
9919
- * - `string`: Shorthand for `{ enabled: true; name: string }`
11189
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9920
11190
  * - `object`: Full configuration object
11191
+ *
11192
+ * @default true
9921
11193
  */
9922
11194
  requests?:
9923
11195
  | boolean
9924
- | string
11196
+ | StringName
9925
11197
  | {
9926
11198
  /**
9927
11199
  * The casing convention to use for generated names.
@@ -9936,12 +11208,53 @@ type Config = Plugin.Name<'zod'> & {
9936
11208
  */
9937
11209
  enabled?: boolean;
9938
11210
  /**
9939
- * Custom naming pattern for generated schema names. The name variable is
9940
- * obtained from the operation name.
11211
+ * Custom naming pattern for generated schema names. The name variable
11212
+ * is obtained from the operation name.
9941
11213
  *
9942
11214
  * @default 'z{{name}}Data'
9943
11215
  */
9944
- name?: string | ((name: string) => string);
11216
+ name?: StringName;
11217
+ /**
11218
+ * Configuration for TypeScript type generation from Zod schemas.
11219
+ *
11220
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11221
+ */
11222
+ types?: {
11223
+ /**
11224
+ * Configuration for `z.infer` types.
11225
+ *
11226
+ * Can be:
11227
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
11228
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
11229
+ * - `object`: Full configuration object
11230
+ *
11231
+ * @default false
11232
+ */
11233
+ infer?:
11234
+ | boolean
11235
+ | StringName
11236
+ | {
11237
+ /**
11238
+ * The casing convention to use for generated type names.
11239
+ *
11240
+ * @default 'PascalCase'
11241
+ */
11242
+ case?: StringCase;
11243
+ /**
11244
+ * Whether to generate TypeScript types from Zod schemas.
11245
+ *
11246
+ * @default true
11247
+ */
11248
+ enabled?: boolean;
11249
+ /**
11250
+ * Custom naming pattern for generated type names. The name variable is
11251
+ * obtained from the Zod schema name.
11252
+ *
11253
+ * @default '{{name}}DataZodType'
11254
+ */
11255
+ name?: StringName;
11256
+ };
11257
+ };
9945
11258
  };
9946
11259
  /**
9947
11260
  * Configuration for response-specific Zod schemas.
@@ -9951,12 +11264,14 @@ type Config = Plugin.Name<'zod'> & {
9951
11264
  *
9952
11265
  * Can be:
9953
11266
  * - `boolean`: Shorthand for `{ enabled: boolean }`
9954
- * - `string`: Shorthand for `{ enabled: true; name: string }`
11267
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9955
11268
  * - `object`: Full configuration object
11269
+ *
11270
+ * @default true
9956
11271
  */
9957
11272
  responses?:
9958
11273
  | boolean
9959
- | string
11274
+ | StringName
9960
11275
  | {
9961
11276
  /**
9962
11277
  * The casing convention to use for generated names.
@@ -9971,16 +11286,91 @@ type Config = Plugin.Name<'zod'> & {
9971
11286
  */
9972
11287
  enabled?: boolean;
9973
11288
  /**
9974
- * Custom naming pattern for generated schema names. The name variable is
9975
- * obtained from the operation name.
11289
+ * Custom naming pattern for generated schema names. The name variable
11290
+ * is obtained from the operation name.
9976
11291
  *
9977
11292
  * @default 'z{{name}}Response'
9978
11293
  */
9979
- name?: string | ((name: string) => string);
11294
+ name?: StringName;
11295
+ /**
11296
+ * Configuration for TypeScript type generation from Zod schemas.
11297
+ *
11298
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11299
+ */
11300
+ types?: {
11301
+ /**
11302
+ * Configuration for `z.infer` types.
11303
+ *
11304
+ * Can be:
11305
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
11306
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
11307
+ * - `object`: Full configuration object
11308
+ *
11309
+ * @default false
11310
+ */
11311
+ infer?:
11312
+ | boolean
11313
+ | StringName
11314
+ | {
11315
+ /**
11316
+ * The casing convention to use for generated type names.
11317
+ *
11318
+ * @default 'PascalCase'
11319
+ */
11320
+ case?: StringCase;
11321
+ /**
11322
+ * Whether to generate TypeScript types from Zod schemas.
11323
+ *
11324
+ * @default true
11325
+ */
11326
+ enabled?: boolean;
11327
+ /**
11328
+ * Custom naming pattern for generated type names. The name variable is
11329
+ * obtained from the Zod schema name.
11330
+ *
11331
+ * @default '{{name}}ResponseZodType'
11332
+ */
11333
+ name?: StringName;
11334
+ };
11335
+ };
9980
11336
  };
11337
+ /**
11338
+ * Configuration for TypeScript type generation from Zod schemas.
11339
+ *
11340
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11341
+ */
11342
+ types?: {
11343
+ /**
11344
+ * Configuration for `z.infer` types.
11345
+ *
11346
+ * Can be:
11347
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
11348
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
11349
+ * - `object`: Full configuration object
11350
+ *
11351
+ * @default false
11352
+ */
11353
+ infer?:
11354
+ | boolean
11355
+ | StringName
11356
+ | {
11357
+ /**
11358
+ * The casing convention to use for generated type names.
11359
+ *
11360
+ * @default 'PascalCase'
11361
+ */
11362
+ case?: StringCase;
11363
+ /**
11364
+ * Whether to generate TypeScript types from Zod schemas.
11365
+ *
11366
+ * @default true
11367
+ */
11368
+ enabled?: boolean;
11369
+ };
11370
+ };
9981
11371
  };
9982
11372
 
9983
- type ResolvedConfig = Plugin.Name<'zod'> & {
11373
+ type Config = Plugin.Name<'zod'> & {
9984
11374
  /**
9985
11375
  * The casing convention to use for generated names.
9986
11376
  *
@@ -10035,7 +11425,38 @@ type ResolvedConfig = Plugin.Name<'zod'> & {
10035
11425
  *
10036
11426
  * @default 'z{{name}}'
10037
11427
  */
10038
- name: string | ((name: string) => string);
11428
+ name: StringName;
11429
+ /**
11430
+ * Configuration for TypeScript type generation from Zod schemas.
11431
+ *
11432
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11433
+ */
11434
+ types: {
11435
+ /**
11436
+ * Configuration for `z.infer` types.
11437
+ */
11438
+ infer: {
11439
+ /**
11440
+ * The casing convention to use for generated type names.
11441
+ *
11442
+ * @default 'PascalCase'
11443
+ */
11444
+ case: StringCase;
11445
+ /**
11446
+ * Whether to generate TypeScript types from Zod schemas.
11447
+ *
11448
+ * @default true
11449
+ */
11450
+ enabled: boolean;
11451
+ /**
11452
+ * Custom naming pattern for generated type names. The name variable is
11453
+ * obtained from the Zod schema name.
11454
+ *
11455
+ * @default '{{name}}ZodType'
11456
+ */
11457
+ name: StringName;
11458
+ };
11459
+ };
10039
11460
  };
10040
11461
  /**
10041
11462
  * Should the exports from the generated files be re-exported in the index
@@ -10083,7 +11504,38 @@ type ResolvedConfig = Plugin.Name<'zod'> & {
10083
11504
  *
10084
11505
  * @default 'z{{name}}Data'
10085
11506
  */
10086
- name: string | ((name: string) => string);
11507
+ name: StringName;
11508
+ /**
11509
+ * Configuration for TypeScript type generation from Zod schemas.
11510
+ *
11511
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11512
+ */
11513
+ types: {
11514
+ /**
11515
+ * Configuration for `z.infer` types.
11516
+ */
11517
+ infer: {
11518
+ /**
11519
+ * The casing convention to use for generated type names.
11520
+ *
11521
+ * @default 'PascalCase'
11522
+ */
11523
+ case: StringCase;
11524
+ /**
11525
+ * Whether to generate TypeScript types from Zod schemas.
11526
+ *
11527
+ * @default true
11528
+ */
11529
+ enabled: boolean;
11530
+ /**
11531
+ * Custom naming pattern for generated type names. The name variable is
11532
+ * obtained from the Zod schema name.
11533
+ *
11534
+ * @default '{{name}}DataZodType'
11535
+ */
11536
+ name: StringName;
11537
+ };
11538
+ };
10087
11539
  };
10088
11540
  /**
10089
11541
  * Configuration for response-specific Zod schemas.
@@ -10110,23 +11562,86 @@ type ResolvedConfig = Plugin.Name<'zod'> & {
10110
11562
  *
10111
11563
  * @default 'z{{name}}Response'
10112
11564
  */
10113
- name: string | ((name: string) => string);
11565
+ name: StringName;
11566
+ /**
11567
+ * Configuration for TypeScript type generation from Zod schemas.
11568
+ *
11569
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11570
+ */
11571
+ types: {
11572
+ /**
11573
+ * Configuration for `z.infer` types.
11574
+ */
11575
+ infer: {
11576
+ /**
11577
+ * The casing convention to use for generated type names.
11578
+ *
11579
+ * @default 'PascalCase'
11580
+ */
11581
+ case: StringCase;
11582
+ /**
11583
+ * Whether to generate TypeScript types from Zod schemas.
11584
+ *
11585
+ * @default true
11586
+ */
11587
+ enabled: boolean;
11588
+ /**
11589
+ * Custom naming pattern for generated type names. The name variable is
11590
+ * obtained from the Zod schema name.
11591
+ *
11592
+ * @default '{{name}}ResponseZodType'
11593
+ */
11594
+ name: StringName;
11595
+ };
11596
+ };
11597
+ };
11598
+ /**
11599
+ * Configuration for TypeScript type generation from Zod schemas.
11600
+ *
11601
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11602
+ */
11603
+ types: {
11604
+ /**
11605
+ * Configuration for `z.infer` types.
11606
+ */
11607
+ infer: {
11608
+ /**
11609
+ * The casing convention to use for generated type names.
11610
+ *
11611
+ * @default 'PascalCase'
11612
+ */
11613
+ case: StringCase;
11614
+ /**
11615
+ * Whether to generate TypeScript types from Zod schemas.
11616
+ *
11617
+ * @default true
11618
+ */
11619
+ enabled: boolean;
11620
+ };
10114
11621
  };
10115
11622
  };
10116
11623
 
10117
- type ZodPlugin = DefinePlugin<Config, ResolvedConfig, Api>;
11624
+ type ZodPlugin = DefinePlugin<UserConfig, Config, Api>;
10118
11625
 
11626
+ type GetIdArgs = {
11627
+ operation: IR.OperationObject;
11628
+ type: 'data' | 'responses' | 'type-infer-data' | 'type-infer-responses';
11629
+ } | {
11630
+ type: 'ref' | 'type-infer-ref';
11631
+ value: string;
11632
+ };
10119
11633
  type Api = {
10120
11634
  createRequestValidator: (args: {
10121
- file: TypeScriptFile;
11635
+ file: GeneratedFile;
10122
11636
  operation: IR.OperationObject;
10123
11637
  plugin: ZodPlugin['Instance'];
10124
11638
  }) => ts__default.ArrowFunction | undefined;
10125
11639
  createResponseValidator: (args: {
10126
- file: TypeScriptFile;
11640
+ file: GeneratedFile;
10127
11641
  operation: IR.OperationObject;
10128
11642
  plugin: ZodPlugin['Instance'];
10129
11643
  }) => ts__default.ArrowFunction | undefined;
11644
+ getId: (args: GetIdArgs) => string;
10130
11645
  };
10131
11646
 
10132
11647
  interface PluginConfigMap {
@@ -10154,6 +11669,10 @@ interface PluginConfigMap {
10154
11669
  }
10155
11670
 
10156
11671
  interface ContextFile {
11672
+ /**
11673
+ * Define casing for identifiers in this file.
11674
+ */
11675
+ case?: StringCase;
10157
11676
  /**
10158
11677
  * Should the exports from this file be re-exported in the index barrel file?
10159
11678
  */
@@ -10162,10 +11681,6 @@ interface ContextFile {
10162
11681
  * Unique file identifier.
10163
11682
  */
10164
11683
  id: string;
10165
- /**
10166
- * Define casing for identifiers in this file.
10167
- */
10168
- identifierCase?: StringCase;
10169
11684
  /**
10170
11685
  * Relative file path to the output path.
10171
11686
  *
@@ -10179,7 +11694,7 @@ declare class IRContext<Spec extends Record<string, any> = any> {
10179
11694
  * Configuration for parsing and generating the output. This
10180
11695
  * is a mix of user-provided and default values.
10181
11696
  */
10182
- config: Config$l;
11697
+ config: Config$9;
10183
11698
  /**
10184
11699
  * A map of files that will be generated from `spec`.
10185
11700
  */
@@ -10199,14 +11714,14 @@ declare class IRContext<Spec extends Record<string, any> = any> {
10199
11714
  */
10200
11715
  spec: Spec;
10201
11716
  constructor({ config, spec }: {
10202
- config: Config$l;
11717
+ config: Config$9;
10203
11718
  spec: Spec;
10204
11719
  });
10205
11720
  /**
10206
11721
  * Create and return a new TypeScript file. Also set the current file context
10207
11722
  * to the newly created file.
10208
11723
  */
10209
- createFile(file: ContextFile): TypeScriptFile;
11724
+ createFile(file: ContextFile): GeneratedFile;
10210
11725
  /**
10211
11726
  * Returns a resolved and dereferenced schema from `spec`.
10212
11727
  */
@@ -10216,7 +11731,7 @@ declare class IRContext<Spec extends Record<string, any> = any> {
10216
11731
  /**
10217
11732
  * Returns a specific file by ID from `files`.
10218
11733
  */
10219
- file({ id }: Pick<ContextFile, 'id'>): TypeScriptFile | undefined;
11734
+ file({ id }: Pick<ContextFile, 'id'>): GeneratedFile | undefined;
10220
11735
  /**
10221
11736
  * Registers a new plugin to the global context.
10222
11737
  *
@@ -10489,4 +12004,4 @@ interface WatchValues {
10489
12004
  lastValue?: string;
10490
12005
  }
10491
12006
 
10492
- export { type Comments as C, type DefinePlugin as D, type ExpressionTransformer as E, type ImportExportItemObject as I, LegacyIR as L, OpenApi$3 as O, type PluginHandler as P, type StringCase as S, type UserConfig as U, type WatchValues as W, Plugin as a, type Client$1 as b, IR as c, OpenApiMetaObject as d, OpenApiOperationObject as e, OpenApiParameterObject as f, OpenApiRequestBodyObject as g, OpenApiResponseObject as h, OpenApiSchemaObject as i, Client as j, type Config$l as k, stringToTsNodes as s, tsNodeToString as t };
12007
+ export { type Comments as C, type DefinePlugin as D, type ExpressionTransformer as E, type ImportExportItemObject as I, LegacyIR as L, OpenApi$3 as O, type PluginHandler as P, type StringCase as S, type UserConfig$l as U, type WatchValues as W, Plugin as a, type Client$1 as b, IR as c, OpenApiMetaObject as d, OpenApiOperationObject as e, OpenApiParameterObject as f, OpenApiRequestBodyObject as g, OpenApiResponseObject as h, OpenApiSchemaObject as i, Client as j, type Config$9 as k, stringToTsNodes as s, tsNodeToString as t };