@hey-api/openapi-ts 0.78.3 → 0.79.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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.
@@ -6652,8 +6786,8 @@ interface UserConfig {
6652
6786
  watch?: boolean | number | Watch;
6653
6787
  }
6654
6788
 
6655
- type Config$l = Omit<
6656
- Required<UserConfig>,
6789
+ type Config$9 = Omit<
6790
+ Required<UserConfig$l>,
6657
6791
  | 'base'
6658
6792
  | 'input'
6659
6793
  | 'logs'
@@ -6664,13 +6798,13 @@ type Config$l = Omit<
6664
6798
  | 'request'
6665
6799
  | 'watch'
6666
6800
  > &
6667
- Pick<UserConfig, 'base' | 'name' | 'request'> & {
6801
+ Pick<UserConfig$l, 'base' | 'name' | 'request'> & {
6668
6802
  input: Omit<Input, 'path' | 'watch'> &
6669
6803
  Pick<Required<Input>, 'path'> & {
6670
6804
  watch: Extract<Required<Required<Input>['watch']>, object>;
6671
6805
  };
6672
- logs: Extract<Required<UserConfig['logs']>, object>;
6673
- output: Extract<UserConfig['output'], object>;
6806
+ logs: Extract<Required<UserConfig$l['logs']>, object>;
6807
+ output: Extract<UserConfig$l['output'], object>;
6674
6808
  /**
6675
6809
  * Customize how the input is parsed and transformed before it's passed to
6676
6810
  * plugins.
@@ -6921,7 +7055,7 @@ interface Client$2 {
6921
7055
  * Configuration for parsing and generating the output. This
6922
7056
  * is a mix of user-provided and default values.
6923
7057
  */
6924
- config: Config$l;
7058
+ config: Config$9;
6925
7059
  models: Model[];
6926
7060
  operations: Operation$1[];
6927
7061
  server: string;
@@ -7489,7 +7623,7 @@ interface Client$1 extends Omit<Client$2, 'operations'> {
7489
7623
  services: Service[];
7490
7624
  }
7491
7625
 
7492
- type Files = Record<string, TypeScriptFile>;
7626
+ type Files = Record<string, GeneratedFile>;
7493
7627
 
7494
7628
  type WalkEvents =
7495
7629
  | {
@@ -7541,7 +7675,7 @@ declare class PluginInstance<T extends Plugin.Types = Plugin.Types> {
7541
7675
  name: string;
7542
7676
  output: string;
7543
7677
  });
7544
- createFile(file: IR.ContextFile): TypeScriptFile;
7678
+ createFile(file: IR.ContextFile): GeneratedFile;
7545
7679
  /**
7546
7680
  * Iterates over various input elements as specified by the event types, in
7547
7681
  * a specific order: servers, schemas, parameters, request bodies, then
@@ -7675,7 +7809,7 @@ declare namespace Plugin {
7675
7809
  config: Omit<T['config'], 'output'>;
7676
7810
  };
7677
7811
 
7678
- /** @deprecated - use `definePluginConfig()` instead */
7812
+ /** @deprecated use `definePluginConfig()` instead */
7679
7813
  export type DefineConfig<
7680
7814
  Config extends BaseConfig,
7681
7815
  ResolvedConfig extends BaseConfig = Config,
@@ -7735,7 +7869,7 @@ type DefinePlugin<
7735
7869
  Types: Plugin.Types<Config, ResolvedConfig, Api>;
7736
7870
  };
7737
7871
 
7738
- type Config$k = Plugin.Name<'@hey-api/client-fetch'> &
7872
+ type UserConfig$k = Plugin.Name<'@hey-api/client-fetch'> &
7739
7873
  Client.Config & {
7740
7874
  /**
7741
7875
  * Throw an error instead of returning it in the response?
@@ -7745,9 +7879,9 @@ type Config$k = Plugin.Name<'@hey-api/client-fetch'> &
7745
7879
  throwOnError?: boolean;
7746
7880
  };
7747
7881
 
7748
- type HeyApiClientFetchPlugin = DefinePlugin<Config$k>;
7882
+ type HeyApiClientFetchPlugin = DefinePlugin<UserConfig$k>;
7749
7883
 
7750
- type Config$j = Plugin.Name<'@hey-api/client-next'> &
7884
+ type UserConfig$j = Plugin.Name<'@hey-api/client-next'> &
7751
7885
  Client.Config & {
7752
7886
  /**
7753
7887
  * Throw an error instead of returning it in the response?
@@ -7757,11 +7891,11 @@ type Config$j = Plugin.Name<'@hey-api/client-next'> &
7757
7891
  throwOnError?: boolean;
7758
7892
  };
7759
7893
 
7760
- type HeyApiClientNextPlugin = DefinePlugin<Config$j>;
7894
+ type HeyApiClientNextPlugin = DefinePlugin<UserConfig$j>;
7761
7895
 
7762
- type Config$i = Plugin.Name<'@hey-api/client-nuxt'> & Client.Config;
7896
+ type UserConfig$i = Plugin.Name<'@hey-api/client-nuxt'> & Client.Config;
7763
7897
 
7764
- type HeyApiClientNuxtPlugin = DefinePlugin<Config$i>;
7898
+ type HeyApiClientNuxtPlugin = DefinePlugin<UserConfig$i>;
7765
7899
 
7766
7900
  type PluginHandler =
7767
7901
  | HeyApiClientAxiosPlugin['Handler']
@@ -7833,7 +7967,7 @@ declare namespace Client {
7833
7967
  };
7834
7968
  }
7835
7969
 
7836
- type Config$h = Plugin.Name<'@hey-api/client-axios'> &
7970
+ type UserConfig$h = Plugin.Name<'@hey-api/client-axios'> &
7837
7971
  Client.Config & {
7838
7972
  /**
7839
7973
  * Throw an error instead of returning it in the response?
@@ -7843,32 +7977,34 @@ type Config$h = Plugin.Name<'@hey-api/client-axios'> &
7843
7977
  throwOnError?: boolean;
7844
7978
  };
7845
7979
 
7846
- type HeyApiClientAxiosPlugin = DefinePlugin<Config$h>;
7980
+ type HeyApiClientAxiosPlugin = DefinePlugin<UserConfig$h>;
7847
7981
 
7848
- type Config$g = Plugin.Name<'legacy/angular'> &
7982
+ type UserConfig$g = Plugin.Name<'legacy/angular'> &
7849
7983
  Pick<Client.Config, 'output'>;
7850
7984
 
7851
- type HeyApiClientLegacyAngularPlugin = DefinePlugin<Config$g>;
7985
+ type HeyApiClientLegacyAngularPlugin = DefinePlugin<UserConfig$g>;
7852
7986
 
7853
- type Config$f = Plugin.Name<'legacy/axios'> &
7987
+ type UserConfig$f = Plugin.Name<'legacy/axios'> &
7854
7988
  Pick<Client.Config, 'output'>;
7855
7989
 
7856
- type HeyApiClientLegacyAxiosPlugin = DefinePlugin<Config$f>;
7990
+ type HeyApiClientLegacyAxiosPlugin = DefinePlugin<UserConfig$f>;
7857
7991
 
7858
- type Config$e = Plugin.Name<'legacy/fetch'> &
7992
+ type UserConfig$e = Plugin.Name<'legacy/fetch'> &
7859
7993
  Pick<Client.Config, 'output'>;
7860
7994
 
7861
- type HeyApiClientLegacyFetchPlugin = DefinePlugin<Config$e>;
7995
+ type HeyApiClientLegacyFetchPlugin = DefinePlugin<UserConfig$e>;
7862
7996
 
7863
- type Config$d = Plugin.Name<'legacy/node'> & Pick<Client.Config, 'output'>;
7997
+ type UserConfig$d = Plugin.Name<'legacy/node'> &
7998
+ Pick<Client.Config, 'output'>;
7864
7999
 
7865
- type HeyApiClientLegacyNodePlugin = DefinePlugin<Config$d>;
8000
+ type HeyApiClientLegacyNodePlugin = DefinePlugin<UserConfig$d>;
7866
8001
 
7867
- type Config$c = Plugin.Name<'legacy/xhr'> & Pick<Client.Config, 'output'>;
8002
+ type UserConfig$c = Plugin.Name<'legacy/xhr'> &
8003
+ Pick<Client.Config, 'output'>;
7868
8004
 
7869
- type HeyApiClientLegacyXhrPlugin = DefinePlugin<Config$c>;
8005
+ type HeyApiClientLegacyXhrPlugin = DefinePlugin<UserConfig$c>;
7870
8006
 
7871
- type Config$b = Plugin.Name<'@hey-api/schemas'> & {
8007
+ type UserConfig$b = Plugin.Name<'@hey-api/schemas'> & {
7872
8008
  /**
7873
8009
  * Should the exports from the generated files be re-exported in the index
7874
8010
  * barrel file?
@@ -7911,9 +8047,9 @@ type Config$b = Plugin.Name<'@hey-api/schemas'> & {
7911
8047
  type?: 'form' | 'json';
7912
8048
  };
7913
8049
 
7914
- type HeyApiSchemasPlugin = DefinePlugin<Config$b>;
8050
+ type HeyApiSchemasPlugin = DefinePlugin<UserConfig$b>;
7915
8051
 
7916
- type Config$a = Plugin.Name<'@hey-api/sdk'> & {
8052
+ type UserConfig$a = Plugin.Name<'@hey-api/sdk'> & {
7917
8053
  /**
7918
8054
  * Group operation methods into classes? When enabled, you can select which
7919
8055
  * classes to export with `sdk.include` and/or transform their names with
@@ -7940,7 +8076,7 @@ type Config$a = Plugin.Name<'@hey-api/sdk'> & {
7940
8076
  *
7941
8077
  * This option has no effect if `sdk.asClass` is `false`.
7942
8078
  */
7943
- classNameBuilder?: string | ((name: string) => string);
8079
+ classNameBuilder?: StringName;
7944
8080
  /**
7945
8081
  * How should we structure your SDK? By default, we try to infer the ideal
7946
8082
  * structure using `operationId` keywords. If you prefer a flatter structure,
@@ -8000,6 +8136,8 @@ type Config$a = Plugin.Name<'@hey-api/sdk'> & {
8000
8136
  * @default 'sdk'
8001
8137
  */
8002
8138
  output?: string;
8139
+ /** @deprecated - this is an experimental feature, do not use */
8140
+ params_EXPERIMENTAL?: 'default' | 'experiment';
8003
8141
  /**
8004
8142
  * **This feature works only with the Fetch client**
8005
8143
  *
@@ -8086,7 +8224,7 @@ type Config$a = Plugin.Name<'@hey-api/sdk'> & {
8086
8224
  response?: 'body' | 'response';
8087
8225
  };
8088
8226
 
8089
- type ResolvedConfig$8 = Plugin.Name<'@hey-api/sdk'> & {
8227
+ type Config$8 = Plugin.Name<'@hey-api/sdk'> & {
8090
8228
  /**
8091
8229
  * Group operation methods into classes? When enabled, you can select which
8092
8230
  * classes to export with `sdk.include` and/or transform their names with
@@ -8113,7 +8251,7 @@ type ResolvedConfig$8 = Plugin.Name<'@hey-api/sdk'> & {
8113
8251
  *
8114
8252
  * This option has no effect if `sdk.asClass` is `false`.
8115
8253
  */
8116
- classNameBuilder: string | ((name: string) => string);
8254
+ classNameBuilder: StringName;
8117
8255
  /**
8118
8256
  * How should we structure your SDK? By default, we try to infer the ideal
8119
8257
  * structure using `operationId` keywords. If you prefer a flatter structure,
@@ -8173,6 +8311,8 @@ type ResolvedConfig$8 = Plugin.Name<'@hey-api/sdk'> & {
8173
8311
  * @default 'sdk'
8174
8312
  */
8175
8313
  output: string;
8314
+ /** @deprecated - this is an experimental feature, do not use */
8315
+ params_EXPERIMENTAL: 'default' | 'experiment';
8176
8316
  /**
8177
8317
  * **This feature works only with the Fetch client**
8178
8318
  *
@@ -8238,16 +8378,16 @@ type ResolvedConfig$8 = Plugin.Name<'@hey-api/sdk'> & {
8238
8378
  response: 'body' | 'response';
8239
8379
  };
8240
8380
 
8241
- type HeyApiSdkPlugin = DefinePlugin<Config$a, ResolvedConfig$8>;
8381
+ type HeyApiSdkPlugin = DefinePlugin<UserConfig$a, Config$8>;
8242
8382
 
8243
8383
  type ExpressionTransformer = ({ config, dataExpression, file, schema, }: {
8244
- config: Omit<Config$9, 'name'>;
8384
+ config: Omit<UserConfig$9, 'name'>;
8245
8385
  dataExpression?: ts__default.Expression | string;
8246
- file: TypeScriptFile;
8386
+ file: GeneratedFile;
8247
8387
  schema: IR.SchemaObject;
8248
8388
  }) => Array<ts__default.Expression> | undefined;
8249
8389
 
8250
- type Config$9 = Plugin.Name<'@hey-api/transformers'> & {
8390
+ type UserConfig$9 = Plugin.Name<'@hey-api/transformers'> & {
8251
8391
  /**
8252
8392
  * Convert long integers into BigInt values?
8253
8393
  *
@@ -8279,17 +8419,46 @@ type Config$9 = Plugin.Name<'@hey-api/transformers'> & {
8279
8419
  transformers?: ReadonlyArray<ExpressionTransformer>;
8280
8420
  };
8281
8421
 
8282
- type HeyApiTransformersPlugin = DefinePlugin<Config$9>;
8422
+ type HeyApiTransformersPlugin = DefinePlugin<UserConfig$9>;
8283
8423
 
8284
- type EnumsType = 'javascript' | 'typescript' | 'typescript+namespace';
8424
+ type EnumsType = 'javascript' | 'typescript';
8285
8425
 
8286
- type Config$8 = Plugin.Name<'@hey-api/typescript'> & {
8426
+ type UserConfig$8 = Plugin.Name<'@hey-api/typescript'> & {
8287
8427
  /**
8288
8428
  * The casing convention to use for generated names.
8289
8429
  *
8290
8430
  * @default 'PascalCase'
8291
8431
  */
8292
8432
  case?: Exclude<StringCase, 'SCREAMING_SNAKE_CASE'>;
8433
+ /**
8434
+ * Configuration for reusable schema definitions.
8435
+ *
8436
+ * Controls generation of shared types that can be referenced across
8437
+ * requests and responses.
8438
+ *
8439
+ * Can be:
8440
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8441
+ * - `object`: Full configuration object
8442
+ *
8443
+ * @default '{{name}}'
8444
+ */
8445
+ definitions?:
8446
+ | StringName
8447
+ | {
8448
+ /**
8449
+ * The casing convention to use for generated definition names.
8450
+ *
8451
+ * @default 'PascalCase'
8452
+ */
8453
+ case?: StringCase;
8454
+ /**
8455
+ * Custom naming pattern for generated definition names. The name variable
8456
+ * is obtained from the schema name.
8457
+ *
8458
+ * @default '{{name}}'
8459
+ */
8460
+ name?: StringName;
8461
+ };
8293
8462
  /**
8294
8463
  * By default, enums are emitted as types to preserve runtime-free output.
8295
8464
  *
@@ -8331,12 +8500,46 @@ type Config$8 = Plugin.Name<'@hey-api/typescript'> & {
8331
8500
  * Can be:
8332
8501
  * - `javascript`: Generates JavaScript objects
8333
8502
  * - `typescript`: Generates TypeScript enums
8334
- * - `typescript+namespace`: Generates TypeScript enums within a namespace
8335
8503
  *
8336
8504
  * @default 'javascript'
8337
8505
  */
8338
8506
  mode?: EnumsType;
8339
8507
  };
8508
+ /**
8509
+ * Configuration for error-specific types.
8510
+ *
8511
+ * Controls generation of types for error response bodies and status codes.
8512
+ *
8513
+ * Can be:
8514
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8515
+ * - `object`: Full configuration object
8516
+ *
8517
+ * @default '{{name}}Errors'
8518
+ */
8519
+ errors?:
8520
+ | StringName
8521
+ | {
8522
+ /**
8523
+ * The casing convention to use for generated error type names.
8524
+ *
8525
+ * @default 'PascalCase'
8526
+ */
8527
+ case?: StringCase;
8528
+ /**
8529
+ * Custom naming pattern for generated error type names. The name
8530
+ * variable is obtained from the operation name.
8531
+ *
8532
+ * @default '{{name}}Error'
8533
+ */
8534
+ error?: StringName;
8535
+ /**
8536
+ * Custom naming pattern for generated error type names. The name
8537
+ * variable is obtained from the operation name.
8538
+ *
8539
+ * @default '{{name}}Errors'
8540
+ */
8541
+ name?: StringName;
8542
+ };
8340
8543
  /**
8341
8544
  * Should the exports from the generated files be re-exported in the index
8342
8545
  * barrel file?
@@ -8350,6 +8553,70 @@ type Config$8 = Plugin.Name<'@hey-api/typescript'> & {
8350
8553
  * @default 'types'
8351
8554
  */
8352
8555
  output?: string;
8556
+ /**
8557
+ * Configuration for request-specific types.
8558
+ *
8559
+ * Controls generation of types for request bodies, query parameters, path
8560
+ * parameters, and headers.
8561
+ *
8562
+ * Can be:
8563
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8564
+ * - `object`: Full configuration object
8565
+ *
8566
+ * @default '{{name}}Data'
8567
+ */
8568
+ requests?:
8569
+ | StringName
8570
+ | {
8571
+ /**
8572
+ * The casing convention to use for generated request type names.
8573
+ *
8574
+ * @default 'PascalCase'
8575
+ */
8576
+ case?: StringCase;
8577
+ /**
8578
+ * Custom naming pattern for generated request type names. The name
8579
+ * variable is obtained from the operation name.
8580
+ *
8581
+ * @default '{{name}}Data'
8582
+ */
8583
+ name?: StringName;
8584
+ };
8585
+ /**
8586
+ * Configuration for response-specific types.
8587
+ *
8588
+ * Controls generation of types for response bodies and status codes.
8589
+ *
8590
+ * Can be:
8591
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8592
+ * - `object`: Full configuration object
8593
+ *
8594
+ * @default '{{name}}Responses'
8595
+ */
8596
+ responses?:
8597
+ | StringName
8598
+ | {
8599
+ /**
8600
+ * The casing convention to use for generated response type names.
8601
+ *
8602
+ * @default 'PascalCase'
8603
+ */
8604
+ case?: StringCase;
8605
+ /**
8606
+ * Custom naming pattern for generated response type names. The name
8607
+ * variable is obtained from the operation name.
8608
+ *
8609
+ * @default '{{name}}Responses'
8610
+ */
8611
+ name?: StringName;
8612
+ /**
8613
+ * Custom naming pattern for generated response type names. The name
8614
+ * variable is obtained from the operation name.
8615
+ *
8616
+ * @default '{{name}}Response'
8617
+ */
8618
+ response?: StringName;
8619
+ };
8353
8620
 
8354
8621
  // DEPRECATED OPTIONS BELOW
8355
8622
 
@@ -8383,13 +8650,34 @@ type Config$8 = Plugin.Name<'@hey-api/typescript'> & {
8383
8650
  tree?: boolean;
8384
8651
  };
8385
8652
 
8386
- type ResolvedConfig$7 = Plugin.Name<'@hey-api/typescript'> & {
8653
+ type Config$7 = Plugin.Name<'@hey-api/typescript'> & {
8387
8654
  /**
8388
8655
  * The casing convention to use for generated names.
8389
8656
  *
8390
8657
  * @default 'PascalCase'
8391
8658
  */
8392
8659
  case: Exclude<StringCase, 'SCREAMING_SNAKE_CASE'>;
8660
+ /**
8661
+ * Configuration for reusable schema definitions.
8662
+ *
8663
+ * Controls generation of shared types that can be referenced across
8664
+ * requests and responses.
8665
+ */
8666
+ definitions: {
8667
+ /**
8668
+ * The casing convention to use for generated definition names.
8669
+ *
8670
+ * @default 'PascalCase'
8671
+ */
8672
+ case: StringCase;
8673
+ /**
8674
+ * Custom naming pattern for generated definition names. The name variable
8675
+ * is obtained from the schema name.
8676
+ *
8677
+ * @default '{{name}}'
8678
+ */
8679
+ name: StringName;
8680
+ };
8393
8681
  /**
8394
8682
  * By default, enums are emitted as types to preserve runtime-free output.
8395
8683
  *
@@ -8426,12 +8714,42 @@ type ResolvedConfig$7 = Plugin.Name<'@hey-api/typescript'> & {
8426
8714
  * Can be:
8427
8715
  * - `javascript`: Generates JavaScript objects
8428
8716
  * - `typescript`: Generates TypeScript enums
8429
- * - `typescript+namespace`: Generates TypeScript enums within a namespace
8430
8717
  *
8431
8718
  * @default 'javascript'
8432
8719
  */
8433
8720
  mode: EnumsType;
8434
8721
  };
8722
+ /**
8723
+ * Configuration for error-specific types.
8724
+ *
8725
+ * Controls generation of types for error response bodies and status codes.
8726
+ *
8727
+ * Can be:
8728
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8729
+ * - `object`: Full configuration object
8730
+ */
8731
+ errors: {
8732
+ /**
8733
+ * The casing convention to use for generated error type names.
8734
+ *
8735
+ * @default 'PascalCase'
8736
+ */
8737
+ case: StringCase;
8738
+ /**
8739
+ * Custom naming pattern for generated error type names. The name
8740
+ * variable is obtained from the operation name.
8741
+ *
8742
+ * @default '{{name}}Error'
8743
+ */
8744
+ error: StringName;
8745
+ /**
8746
+ * Custom naming pattern for generated error type names. The name
8747
+ * variable is obtained from the operation name.
8748
+ *
8749
+ * @default '{{name}}Errors'
8750
+ */
8751
+ name: StringName;
8752
+ };
8435
8753
  /**
8436
8754
  * Should the exports from the generated files be re-exported in the index
8437
8755
  * barrel file?
@@ -8445,6 +8763,54 @@ type ResolvedConfig$7 = Plugin.Name<'@hey-api/typescript'> & {
8445
8763
  * @default 'types'
8446
8764
  */
8447
8765
  output: string;
8766
+ /**
8767
+ * Configuration for request-specific types.
8768
+ *
8769
+ * Controls generation of types for request bodies, query parameters, path
8770
+ * parameters, and headers.
8771
+ */
8772
+ requests: {
8773
+ /**
8774
+ * The casing convention to use for generated request type names.
8775
+ *
8776
+ * @default 'PascalCase'
8777
+ */
8778
+ case: StringCase;
8779
+ /**
8780
+ * Custom naming pattern for generated request type names. The name
8781
+ * variable is obtained from the operation name.
8782
+ *
8783
+ * @default '{{name}}Data'
8784
+ */
8785
+ name: StringName;
8786
+ };
8787
+ /**
8788
+ * Configuration for response-specific types.
8789
+ *
8790
+ * Controls generation of types for response bodies and status codes.
8791
+ */
8792
+ responses: {
8793
+ /**
8794
+ * The casing convention to use for generated response type names.
8795
+ *
8796
+ * @default 'PascalCase'
8797
+ */
8798
+ case: StringCase;
8799
+ /**
8800
+ * Custom naming pattern for generated response type names. The name
8801
+ * variable is obtained from the operation name.
8802
+ *
8803
+ * @default '{{name}}Responses'
8804
+ */
8805
+ name: StringName;
8806
+ /**
8807
+ * Custom naming pattern for generated response type names. The name
8808
+ * variable is obtained from the operation name.
8809
+ *
8810
+ * @default '{{name}}Response'
8811
+ */
8812
+ response: StringName;
8813
+ };
8448
8814
 
8449
8815
  // DEPRECATED OPTIONS BELOW
8450
8816
 
@@ -8478,9 +8844,34 @@ type ResolvedConfig$7 = Plugin.Name<'@hey-api/typescript'> & {
8478
8844
  tree: boolean;
8479
8845
  };
8480
8846
 
8481
- type HeyApiTypeScriptPlugin = DefinePlugin<Config$8, ResolvedConfig$7>;
8847
+ type HeyApiTypeScriptPlugin = DefinePlugin<UserConfig$8, Config$7, Api$2>;
8482
8848
 
8483
- type Config$7 = Plugin.Name<'@tanstack/angular-query-experimental'> & {
8849
+ type OnRef = (id: string) => void;
8850
+ declare const schemaToType: ({ onRef, plugin, schema, }: {
8851
+ /**
8852
+ * Callback that can be used to perform side-effects when we encounter a
8853
+ * reference. For example, we might want to import the referenced type.
8854
+ */
8855
+ onRef: OnRef | undefined;
8856
+ plugin: HeyApiTypeScriptPlugin["Instance"];
8857
+ schema: IR.SchemaObject;
8858
+ }) => ts__default.TypeNode;
8859
+
8860
+ type GetIdArgs$1 = {
8861
+ type: 'ClientOptions';
8862
+ } | {
8863
+ operation: IR.OperationObject;
8864
+ type: 'data' | 'error' | 'errors' | 'response' | 'responses';
8865
+ } | {
8866
+ type: 'ref';
8867
+ value: string;
8868
+ };
8869
+ type Api$2 = {
8870
+ getId: (args: GetIdArgs$1) => string;
8871
+ schemaToType: (args: Omit<Parameters<typeof schemaToType>[0], 'onRef'> & Pick<Partial<Parameters<typeof schemaToType>[0]>, 'onRef'>) => ts__default.TypeNode;
8872
+ };
8873
+
8874
+ type UserConfig$7 = Plugin.Name<'@tanstack/angular-query-experimental'> & {
8484
8875
  /**
8485
8876
  * The casing convention to use for generated names.
8486
8877
  *
@@ -8503,40 +8894,112 @@ type Config$7 = Plugin.Name<'@tanstack/angular-query-experimental'> & {
8503
8894
  * Configuration for generated infinite query key helpers.
8504
8895
  *
8505
8896
  * See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions}
8897
+ *
8898
+ * Can be:
8899
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
8900
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8901
+ * - `object`: Full configuration object
8902
+ *
8903
+ * @default true
8506
8904
  */
8507
8905
  infiniteQueryKeys?:
8508
8906
  | boolean
8509
- | string
8907
+ | StringName
8510
8908
  | {
8909
+ /**
8910
+ * The casing convention to use for generated names.
8911
+ *
8912
+ * @default 'camelCase'
8913
+ */
8511
8914
  case?: StringCase;
8915
+ /**
8916
+ * Whether to generate infinite query key helpers.
8917
+ *
8918
+ * @default true
8919
+ */
8512
8920
  enabled?: boolean;
8513
- name?: string | ((name: string) => string);
8921
+ /**
8922
+ * Custom naming pattern for generated infinite query key names. The name variable is
8923
+ * obtained from the SDK function name.
8924
+ *
8925
+ * @default '{{name}}InfiniteQueryKey'
8926
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions
8927
+ */
8928
+ name?: StringName;
8514
8929
  };
8515
8930
  /**
8516
8931
  * Configuration for generated infinite query options helpers.
8517
8932
  *
8518
8933
  * See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions}
8934
+ *
8935
+ * Can be:
8936
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
8937
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8938
+ * - `object`: Full configuration object
8939
+ *
8940
+ * @default true
8519
8941
  */
8520
8942
  infiniteQueryOptions?:
8521
8943
  | boolean
8522
- | string
8944
+ | StringName
8523
8945
  | {
8524
- case?: StringCase;
8525
- enabled?: boolean;
8526
- name?: string | ((name: string) => string);
8527
- };
8528
- /**
8946
+ /**
8947
+ * The casing convention to use for generated names.
8948
+ *
8949
+ * @default 'camelCase'
8950
+ */
8951
+ case?: StringCase;
8952
+ /**
8953
+ * Whether to generate infinite query options helpers.
8954
+ *
8955
+ * @default true
8956
+ */
8957
+ enabled?: boolean;
8958
+ /**
8959
+ * Custom naming pattern for generated infinite query options names. The name variable is
8960
+ * obtained from the SDK function name.
8961
+ *
8962
+ * @default '{{name}}InfiniteOptions'
8963
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions
8964
+ */
8965
+ name?: StringName;
8966
+ };
8967
+ /**
8529
8968
  * Configuration for generated mutation options helpers.
8530
8969
  *
8531
8970
  * See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/useMutation}
8971
+ *
8972
+ * Can be:
8973
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
8974
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8975
+ * - `object`: Full configuration object
8976
+ *
8977
+ * @default true
8532
8978
  */
8533
8979
  mutationOptions?:
8534
8980
  | boolean
8535
- | string
8981
+ | StringName
8536
8982
  | {
8983
+ /**
8984
+ * The casing convention to use for generated names.
8985
+ *
8986
+ * @default 'camelCase'
8987
+ */
8537
8988
  case?: StringCase;
8989
+ /**
8990
+ * Whether to generate mutation options helpers.
8991
+ *
8992
+ * @default true
8993
+ */
8538
8994
  enabled?: boolean;
8539
- name?: string | ((name: string) => string);
8995
+ /**
8996
+ * Custom naming pattern for generated mutation options names. The name variable is
8997
+ * obtained from the SDK function name.
8998
+ *
8999
+ * @default '{{name}}Mutation'
9000
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/useMutation
9001
+ */
9002
+ name?: StringName;
8540
9003
  };
8541
9004
  /**
8542
9005
  * Name of the generated file.
@@ -8548,32 +9011,103 @@ type Config$7 = Plugin.Name<'@tanstack/angular-query-experimental'> & {
8548
9011
  * Configuration for generated query keys.
8549
9012
  *
8550
9013
  * See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/queryKey}
9014
+ *
9015
+ * Can be:
9016
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9017
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9018
+ * - `object`: Full configuration object
9019
+ *
9020
+ * @default true
8551
9021
  */
8552
9022
  queryKeys?:
8553
9023
  | boolean
8554
- | string
9024
+ | StringName
8555
9025
  | {
9026
+ /**
9027
+ * The casing convention to use for generated names.
9028
+ *
9029
+ * @default 'camelCase'
9030
+ */
8556
9031
  case?: StringCase;
9032
+ /**
9033
+ * Whether to generate query keys.
9034
+ *
9035
+ * @default true
9036
+ */
8557
9037
  enabled?: boolean;
8558
- name?: string | ((name: string) => string);
9038
+ /**
9039
+ * Custom naming pattern for generated query key names. The name variable is
9040
+ * obtained from the SDK function name.
9041
+ *
9042
+ * @default '{{name}}QueryKey'
9043
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/queryKey
9044
+ */
9045
+ name?: StringName;
8559
9046
  };
8560
9047
  /**
8561
9048
  * Configuration for generated query options helpers.
8562
9049
  *
8563
9050
  * See {@link https://tanstack.com/query/v5/docs/framework/angular/reference/queryOptions}
9051
+ *
9052
+ * Can be:
9053
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9054
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9055
+ * - `object`: Full configuration object
9056
+ *
9057
+ * @default true
8564
9058
  */
8565
9059
  queryOptions?:
8566
9060
  | boolean
8567
- | string
9061
+ | StringName
8568
9062
  | {
9063
+ /**
9064
+ * The casing convention to use for generated names.
9065
+ *
9066
+ * @default 'camelCase'
9067
+ */
8569
9068
  case?: StringCase;
9069
+ /**
9070
+ * Whether to generate query options helpers.
9071
+ *
9072
+ * @default true
9073
+ */
8570
9074
  enabled?: boolean;
8571
- name?: string | ((name: string) => string);
9075
+ /**
9076
+ * Custom naming pattern for generated query options names. The name variable is
9077
+ * obtained from the SDK function name.
9078
+ *
9079
+ * @default '{{name}}Options'
9080
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/queryOptions
9081
+ */
9082
+ name?: StringName;
8572
9083
  };
8573
9084
  };
8574
9085
 
8575
- type ResolvedConfig$6 =
8576
- Plugin.Name<'@tanstack/angular-query-experimental'> & {
9086
+ type Config$6 = Plugin.Name<'@tanstack/angular-query-experimental'> & {
9087
+ /**
9088
+ * The casing convention to use for generated names.
9089
+ *
9090
+ * @default 'camelCase'
9091
+ */
9092
+ case: StringCase;
9093
+ /**
9094
+ * Add comments from SDK functions to the generated TanStack Query code?
9095
+ *
9096
+ * @default true
9097
+ */
9098
+ comments: boolean;
9099
+ /**
9100
+ * Should the exports from the generated files be re-exported in the index barrel file?
9101
+ *
9102
+ * @default false
9103
+ */
9104
+ exportFromIndex: boolean;
9105
+ /**
9106
+ * Resolved configuration for generated infinite query key helpers.
9107
+ *
9108
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions
9109
+ */
9110
+ infiniteQueryKeys: {
8577
9111
  /**
8578
9112
  * The casing convention to use for generated names.
8579
9113
  *
@@ -8581,78 +9115,139 @@ type ResolvedConfig$6 =
8581
9115
  */
8582
9116
  case: StringCase;
8583
9117
  /**
8584
- * Add comments from SDK functions to the generated TanStack Query code?
9118
+ * Whether to generate infinite query key helpers.
8585
9119
  *
8586
9120
  * @default true
8587
9121
  */
8588
- comments: boolean;
9122
+ enabled: boolean;
8589
9123
  /**
8590
- * Should the exports from the generated files be re-exported in the index barrel file?
9124
+ * Custom naming pattern for generated infinite query key names. The name variable is
9125
+ * obtained from the SDK function name.
8591
9126
  *
8592
- * @default false
9127
+ * @default '{{name}}InfiniteQueryKey'
9128
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions
8593
9129
  */
8594
- exportFromIndex: boolean;
9130
+ name: StringName;
9131
+ };
9132
+ /**
9133
+ * Resolved configuration for generated infinite query options helpers.
9134
+ *
9135
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions
9136
+ */
9137
+ infiniteQueryOptions: {
8595
9138
  /**
8596
- * Resolved configuration for generated infinite query key helpers.
9139
+ * The casing convention to use for generated names.
8597
9140
  *
8598
- * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions
9141
+ * @default 'camelCase'
8599
9142
  */
8600
- infiniteQueryKeys: {
8601
- case: StringCase;
8602
- enabled: boolean;
8603
- name: string | ((name: string) => string);
8604
- };
9143
+ case: StringCase;
9144
+ /**
9145
+ * Whether to generate infinite query options helpers.
9146
+ *
9147
+ * @default true
9148
+ */
9149
+ enabled: boolean;
8605
9150
  /**
8606
- * Resolved configuration for generated infinite query options helpers.
9151
+ * Custom naming pattern for generated infinite query options names. The name variable is
9152
+ * obtained from the SDK function name.
8607
9153
  *
9154
+ * @default '{{name}}InfiniteOptions'
8608
9155
  * @see https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions
8609
9156
  */
8610
- infiniteQueryOptions: {
8611
- case: StringCase;
8612
- enabled: boolean;
8613
- name: string | ((name: string) => string);
8614
- };
9157
+ name: StringName;
9158
+ };
9159
+ /**
9160
+ * Resolved configuration for generated mutation options helpers.
9161
+ *
9162
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/useMutation
9163
+ */
9164
+ mutationOptions: {
9165
+ /**
9166
+ * The casing convention to use for generated names.
9167
+ *
9168
+ * @default 'camelCase'
9169
+ */
9170
+ case: StringCase;
8615
9171
  /**
8616
- * Resolved configuration for generated mutation options helpers.
9172
+ * Whether to generate mutation options helpers.
9173
+ *
9174
+ * @default true
9175
+ */
9176
+ enabled: boolean;
9177
+ /**
9178
+ * Custom naming pattern for generated mutation options names. The name variable is
9179
+ * obtained from the SDK function name.
8617
9180
  *
9181
+ * @default '{{name}}Mutation'
8618
9182
  * @see https://tanstack.com/query/v5/docs/framework/angular/reference/useMutation
8619
9183
  */
8620
- mutationOptions: {
8621
- case: StringCase;
8622
- enabled: boolean;
8623
- name: string | ((name: string) => string);
8624
- };
9184
+ name: StringName;
9185
+ };
9186
+ /**
9187
+ * Name of the generated file.
9188
+ *
9189
+ * @default '@tanstack/angular-query-experimental'
9190
+ */
9191
+ output: string;
9192
+ /**
9193
+ * Resolved configuration for generated query keys.
9194
+ *
9195
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/queryKey
9196
+ */
9197
+ queryKeys: {
8625
9198
  /**
8626
- * Name of the generated file.
9199
+ * The casing convention to use for generated names.
8627
9200
  *
8628
- * @default '@tanstack/angular-query-experimental'
9201
+ * @default 'camelCase'
9202
+ */
9203
+ case: StringCase;
9204
+ /**
9205
+ * Whether to generate query keys.
9206
+ *
9207
+ * @default true
8629
9208
  */
8630
- output: string;
9209
+ enabled: boolean;
8631
9210
  /**
8632
- * Resolved configuration for generated query keys.
9211
+ * Custom naming pattern for generated query key names. The name variable is
9212
+ * obtained from the SDK function name.
8633
9213
  *
9214
+ * @default '{{name}}QueryKey'
8634
9215
  * @see https://tanstack.com/query/v5/docs/framework/angular/reference/queryKey
8635
9216
  */
8636
- queryKeys: {
8637
- case: StringCase;
8638
- enabled: boolean;
8639
- name: string | ((name: string) => string);
8640
- };
9217
+ name: StringName;
9218
+ };
9219
+ /**
9220
+ * Resolved configuration for generated query options helpers.
9221
+ *
9222
+ * @see https://tanstack.com/query/v5/docs/framework/angular/reference/queryOptions
9223
+ */
9224
+ queryOptions: {
9225
+ /**
9226
+ * The casing convention to use for generated names.
9227
+ *
9228
+ * @default 'camelCase'
9229
+ */
9230
+ case: StringCase;
8641
9231
  /**
8642
- * Resolved configuration for generated query options helpers.
9232
+ * Whether to generate query options helpers.
9233
+ *
9234
+ * @default true
9235
+ */
9236
+ enabled: boolean;
9237
+ /**
9238
+ * Custom naming pattern for generated query options names. The name variable is
9239
+ * obtained from the SDK function name.
8643
9240
  *
9241
+ * @default '{{name}}Options'
8644
9242
  * @see https://tanstack.com/query/v5/docs/framework/angular/reference/queryOptions
8645
9243
  */
8646
- queryOptions: {
8647
- case: StringCase;
8648
- enabled: boolean;
8649
- name: string | ((name: string) => string);
8650
- };
9244
+ name: StringName;
8651
9245
  };
9246
+ };
8652
9247
 
8653
- type TanStackAngularQueryPlugin = DefinePlugin<Config$7, ResolvedConfig$6>;
9248
+ type TanStackAngularQueryPlugin = DefinePlugin<UserConfig$7, Config$6>;
8654
9249
 
8655
- type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
9250
+ type UserConfig$6 = Plugin.Name<'@tanstack/react-query'> & {
8656
9251
  /**
8657
9252
  * The casing convention to use for generated names.
8658
9253
  *
@@ -8683,12 +9278,14 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8683
9278
  *
8684
9279
  * Can be:
8685
9280
  * - `boolean`: Shorthand for `{ enabled: boolean }`
8686
- * - `string`: Shorthand for `{ enabled: true; name: string }`
9281
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8687
9282
  * - `object`: Full configuration object
9283
+ *
9284
+ * @default true
8688
9285
  */
8689
9286
  infiniteQueryKeys?:
8690
9287
  | boolean
8691
- | string
9288
+ | StringName
8692
9289
  | {
8693
9290
  /**
8694
9291
  * The casing convention to use for generated names.
@@ -8709,7 +9306,7 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8709
9306
  * @default '{{name}}InfiniteQueryKey'
8710
9307
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions
8711
9308
  */
8712
- name?: string | ((name: string) => string);
9309
+ name?: StringName;
8713
9310
  };
8714
9311
  /**
8715
9312
  * Configuration for generated infinite query options helpers.
@@ -8718,12 +9315,14 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8718
9315
  *
8719
9316
  * Can be:
8720
9317
  * - `boolean`: Shorthand for `{ enabled: boolean }`
8721
- * - `string`: Shorthand for `{ enabled: true; name: string }`
9318
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8722
9319
  * - `object`: Full configuration object
9320
+ *
9321
+ * @default true
8723
9322
  */
8724
9323
  infiniteQueryOptions?:
8725
9324
  | boolean
8726
- | string
9325
+ | StringName
8727
9326
  | {
8728
9327
  /**
8729
9328
  * The casing convention to use for generated names.
@@ -8744,7 +9343,7 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8744
9343
  * @default '{{name}}InfiniteOptions'
8745
9344
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions
8746
9345
  */
8747
- name?: string | ((name: string) => string);
9346
+ name?: StringName;
8748
9347
  };
8749
9348
  /**
8750
9349
  * Configuration for generated mutation options helpers.
@@ -8753,12 +9352,14 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8753
9352
  *
8754
9353
  * Can be:
8755
9354
  * - `boolean`: Shorthand for `{ enabled: boolean }`
8756
- * - `string`: Shorthand for `{ enabled: true; name: string }`
9355
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8757
9356
  * - `object`: Full configuration object
9357
+ *
9358
+ * @default true
8758
9359
  */
8759
9360
  mutationOptions?:
8760
9361
  | boolean
8761
- | string
9362
+ | StringName
8762
9363
  | {
8763
9364
  /**
8764
9365
  * The casing convention to use for generated names.
@@ -8779,7 +9380,7 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8779
9380
  * @default '{{name}}Mutation'
8780
9381
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/useMutation
8781
9382
  */
8782
- name?: string | ((name: string) => string);
9383
+ name?: StringName;
8783
9384
  };
8784
9385
  /**
8785
9386
  * Name of the generated file.
@@ -8794,12 +9395,14 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8794
9395
  *
8795
9396
  * Can be:
8796
9397
  * - `boolean`: Shorthand for `{ enabled: boolean }`
8797
- * - `string`: Shorthand for `{ enabled: true; name: string }`
9398
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8798
9399
  * - `object`: Full configuration object
9400
+ *
9401
+ * @default true
8799
9402
  */
8800
9403
  queryKeys?:
8801
9404
  | boolean
8802
- | string
9405
+ | StringName
8803
9406
  | {
8804
9407
  /**
8805
9408
  * The casing convention to use for generated names.
@@ -8820,7 +9423,7 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8820
9423
  * @default '{{name}}QueryKey'
8821
9424
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/queryKey
8822
9425
  */
8823
- name?: string | ((name: string) => string);
9426
+ name?: StringName;
8824
9427
  };
8825
9428
  /**
8826
9429
  * Configuration for generated query options helpers.
@@ -8829,12 +9432,14 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8829
9432
  *
8830
9433
  * Can be:
8831
9434
  * - `boolean`: Shorthand for `{ enabled: boolean }`
8832
- * - `string`: Shorthand for `{ enabled: true; name: string }`
9435
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
8833
9436
  * - `object`: Full configuration object
9437
+ *
9438
+ * @default true
8834
9439
  */
8835
9440
  queryOptions?:
8836
9441
  | boolean
8837
- | string
9442
+ | StringName
8838
9443
  | {
8839
9444
  /**
8840
9445
  * The casing convention to use for generated names.
@@ -8855,11 +9460,11 @@ type Config$6 = Plugin.Name<'@tanstack/react-query'> & {
8855
9460
  * @default '{{name}}Options'
8856
9461
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions
8857
9462
  */
8858
- name?: string | ((name: string) => string);
9463
+ name?: StringName;
8859
9464
  };
8860
9465
  };
8861
9466
 
8862
- type ResolvedConfig$5 = Plugin.Name<'@tanstack/react-query'> & {
9467
+ type Config$5 = Plugin.Name<'@tanstack/react-query'> & {
8863
9468
  /**
8864
9469
  * The casing convention to use for generated names.
8865
9470
  *
@@ -8902,7 +9507,7 @@ type ResolvedConfig$5 = Plugin.Name<'@tanstack/react-query'> & {
8902
9507
  * @default '{{name}}InfiniteQueryKey'
8903
9508
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions
8904
9509
  */
8905
- name: string | ((name: string) => string);
9510
+ name: StringName;
8906
9511
  };
8907
9512
  /**
8908
9513
  * Resolved configuration for generated infinite query options helpers.
@@ -8928,7 +9533,7 @@ type ResolvedConfig$5 = Plugin.Name<'@tanstack/react-query'> & {
8928
9533
  * @default '{{name}}InfiniteOptions'
8929
9534
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions
8930
9535
  */
8931
- name: string | ((name: string) => string);
9536
+ name: StringName;
8932
9537
  };
8933
9538
  /**
8934
9539
  * Resolved configuration for generated mutation options helpers.
@@ -8954,7 +9559,7 @@ type ResolvedConfig$5 = Plugin.Name<'@tanstack/react-query'> & {
8954
9559
  * @default '{{name}}Mutation'
8955
9560
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/useMutation
8956
9561
  */
8957
- name: string | ((name: string) => string);
9562
+ name: StringName;
8958
9563
  };
8959
9564
  /**
8960
9565
  * Name of the generated file.
@@ -8986,7 +9591,7 @@ type ResolvedConfig$5 = Plugin.Name<'@tanstack/react-query'> & {
8986
9591
  * @default '{{name}}QueryKey'
8987
9592
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/queryKey
8988
9593
  */
8989
- name: string | ((name: string) => string);
9594
+ name: StringName;
8990
9595
  };
8991
9596
  /**
8992
9597
  * Resolved configuration for generated query options helpers.
@@ -9012,13 +9617,13 @@ type ResolvedConfig$5 = Plugin.Name<'@tanstack/react-query'> & {
9012
9617
  * @default '{{name}}Options'
9013
9618
  * @see https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions
9014
9619
  */
9015
- name: string | ((name: string) => string);
9620
+ name: StringName;
9016
9621
  };
9017
9622
  };
9018
9623
 
9019
- type TanStackReactQueryPlugin = DefinePlugin<Config$6, ResolvedConfig$5>;
9624
+ type TanStackReactQueryPlugin = DefinePlugin<UserConfig$6, Config$5>;
9020
9625
 
9021
- type Config$5 = Plugin.Name<'@tanstack/solid-query'> & {
9626
+ type UserConfig$5 = Plugin.Name<'@tanstack/solid-query'> & {
9022
9627
  /**
9023
9628
  * The casing convention to use for generated names.
9024
9629
  *
@@ -9041,40 +9646,112 @@ type Config$5 = Plugin.Name<'@tanstack/solid-query'> & {
9041
9646
  * Configuration for generated infinite query key helpers.
9042
9647
  *
9043
9648
  * See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery}
9649
+ *
9650
+ * Can be:
9651
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9652
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9653
+ * - `object`: Full configuration object
9654
+ *
9655
+ * @default true
9044
9656
  */
9045
9657
  infiniteQueryKeys?:
9046
9658
  | boolean
9047
- | string
9659
+ | StringName
9048
9660
  | {
9661
+ /**
9662
+ * The casing convention to use for generated names.
9663
+ *
9664
+ * @default 'camelCase'
9665
+ */
9049
9666
  case?: StringCase;
9667
+ /**
9668
+ * Whether to generate infinite query key helpers.
9669
+ *
9670
+ * @default true
9671
+ */
9050
9672
  enabled?: boolean;
9051
- name?: string | ((name: string) => string);
9673
+ /**
9674
+ * Custom naming pattern for generated infinite query key names. The name variable is
9675
+ * obtained from the SDK function name.
9676
+ *
9677
+ * @default '{{name}}InfiniteQueryKey'
9678
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery
9679
+ */
9680
+ name?: StringName;
9052
9681
  };
9053
9682
  /**
9054
9683
  * Configuration for generated infinite query options helpers.
9055
9684
  *
9056
9685
  * See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery}
9686
+ *
9687
+ * Can be:
9688
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9689
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9690
+ * - `object`: Full configuration object
9691
+ *
9692
+ * @default true
9057
9693
  */
9058
9694
  infiniteQueryOptions?:
9059
9695
  | boolean
9060
- | string
9696
+ | StringName
9061
9697
  | {
9698
+ /**
9699
+ * The casing convention to use for generated names.
9700
+ *
9701
+ * @default 'camelCase'
9702
+ */
9062
9703
  case?: StringCase;
9704
+ /**
9705
+ * Whether to generate infinite query options helpers.
9706
+ *
9707
+ * @default true
9708
+ */
9063
9709
  enabled?: boolean;
9064
- name?: string | ((name: string) => string);
9710
+ /**
9711
+ * Custom naming pattern for generated infinite query options names. The name variable is
9712
+ * obtained from the SDK function name.
9713
+ *
9714
+ * @default '{{name}}InfiniteOptions'
9715
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery
9716
+ */
9717
+ name?: StringName;
9065
9718
  };
9066
9719
  /**
9067
9720
  * Configuration for generated mutation options helpers.
9068
9721
  *
9069
9722
  * See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation}
9723
+ *
9724
+ * Can be:
9725
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9726
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9727
+ * - `object`: Full configuration object
9728
+ *
9729
+ * @default true
9070
9730
  */
9071
9731
  mutationOptions?:
9072
9732
  | boolean
9073
- | string
9733
+ | StringName
9074
9734
  | {
9735
+ /**
9736
+ * The casing convention to use for generated names.
9737
+ *
9738
+ * @default 'camelCase'
9739
+ */
9075
9740
  case?: StringCase;
9741
+ /**
9742
+ * Whether to generate mutation options helpers.
9743
+ *
9744
+ * @default true
9745
+ */
9076
9746
  enabled?: boolean;
9077
- name?: string | ((name: string) => string);
9747
+ /**
9748
+ * Custom naming pattern for generated mutation options names. The name variable is
9749
+ * obtained from the SDK function name.
9750
+ *
9751
+ * @default '{{name}}Mutation'
9752
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation
9753
+ */
9754
+ name?: StringName;
9078
9755
  };
9079
9756
  /**
9080
9757
  * Name of the generated file.
@@ -9086,31 +9763,79 @@ type Config$5 = Plugin.Name<'@tanstack/solid-query'> & {
9086
9763
  * Configuration for generated query keys.
9087
9764
  *
9088
9765
  * See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/queryKey}
9766
+ *
9767
+ * Can be:
9768
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9769
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9770
+ * - `object`: Full configuration object
9771
+ *
9772
+ * @default true
9089
9773
  */
9090
9774
  queryKeys?:
9091
9775
  | boolean
9092
- | string
9776
+ | StringName
9093
9777
  | {
9778
+ /**
9779
+ * The casing convention to use for generated names.
9780
+ *
9781
+ * @default 'camelCase'
9782
+ */
9094
9783
  case?: StringCase;
9784
+ /**
9785
+ * Whether to generate query keys.
9786
+ *
9787
+ * @default true
9788
+ */
9095
9789
  enabled?: boolean;
9096
- name?: string | ((name: string) => string);
9790
+ /**
9791
+ * Custom naming pattern for generated query key names. The name variable is
9792
+ * obtained from the SDK function name.
9793
+ *
9794
+ * @default '{{name}}QueryKey'
9795
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/queryKey
9796
+ */
9797
+ name?: StringName;
9097
9798
  };
9098
9799
  /**
9099
9800
  * Configuration for generated query options helpers.
9100
9801
  *
9101
9802
  * See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createQuery}
9803
+ *
9804
+ * Can be:
9805
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9806
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9807
+ * - `object`: Full configuration object
9808
+ *
9809
+ * @default true
9102
9810
  */
9103
9811
  queryOptions?:
9104
9812
  | boolean
9105
- | string
9813
+ | StringName
9106
9814
  | {
9815
+ /**
9816
+ * The casing convention to use for generated names.
9817
+ *
9818
+ * @default 'camelCase'
9819
+ */
9107
9820
  case?: StringCase;
9821
+ /**
9822
+ * Whether to generate query options helpers.
9823
+ *
9824
+ * @default true
9825
+ */
9108
9826
  enabled?: boolean;
9109
- name?: string | ((name: string) => string);
9827
+ /**
9828
+ * Custom naming pattern for generated query options names. The name variable is
9829
+ * obtained from the SDK function name.
9830
+ *
9831
+ * @default '{{name}}Options'
9832
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createQuery
9833
+ */
9834
+ name?: StringName;
9110
9835
  };
9111
9836
  };
9112
9837
 
9113
- type ResolvedConfig$4 = Plugin.Name<'@tanstack/solid-query'> & {
9838
+ type Config$4 = Plugin.Name<'@tanstack/solid-query'> & {
9114
9839
  /**
9115
9840
  * The casing convention to use for generated names.
9116
9841
  *
@@ -9135,9 +9860,26 @@ type ResolvedConfig$4 = Plugin.Name<'@tanstack/solid-query'> & {
9135
9860
  * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery
9136
9861
  */
9137
9862
  infiniteQueryKeys: {
9863
+ /**
9864
+ * The casing convention to use for generated names.
9865
+ *
9866
+ * @default 'camelCase'
9867
+ */
9138
9868
  case: StringCase;
9869
+ /**
9870
+ * Whether to generate infinite query key helpers.
9871
+ *
9872
+ * @default true
9873
+ */
9139
9874
  enabled: boolean;
9140
- name: string | ((name: string) => string);
9875
+ /**
9876
+ * Custom naming pattern for generated infinite query key names. The name variable is
9877
+ * obtained from the SDK function name.
9878
+ *
9879
+ * @default '{{name}}InfiniteQueryKey'
9880
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery
9881
+ */
9882
+ name: StringName;
9141
9883
  };
9142
9884
  /**
9143
9885
  * Resolved configuration for generated infinite query options helpers.
@@ -9145,9 +9887,26 @@ type ResolvedConfig$4 = Plugin.Name<'@tanstack/solid-query'> & {
9145
9887
  * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery
9146
9888
  */
9147
9889
  infiniteQueryOptions: {
9890
+ /**
9891
+ * The casing convention to use for generated names.
9892
+ *
9893
+ * @default 'camelCase'
9894
+ */
9148
9895
  case: StringCase;
9896
+ /**
9897
+ * Whether to generate infinite query options helpers.
9898
+ *
9899
+ * @default true
9900
+ */
9149
9901
  enabled: boolean;
9150
- name: string | ((name: string) => string);
9902
+ /**
9903
+ * Custom naming pattern for generated infinite query options names. The name variable is
9904
+ * obtained from the SDK function name.
9905
+ *
9906
+ * @default '{{name}}InfiniteOptions'
9907
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createInfiniteQuery
9908
+ */
9909
+ name: StringName;
9151
9910
  };
9152
9911
  /**
9153
9912
  * Resolved configuration for generated mutation options helpers.
@@ -9155,9 +9914,26 @@ type ResolvedConfig$4 = Plugin.Name<'@tanstack/solid-query'> & {
9155
9914
  * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation
9156
9915
  */
9157
9916
  mutationOptions: {
9917
+ /**
9918
+ * The casing convention to use for generated names.
9919
+ *
9920
+ * @default 'camelCase'
9921
+ */
9158
9922
  case: StringCase;
9923
+ /**
9924
+ * Whether to generate mutation options helpers.
9925
+ *
9926
+ * @default true
9927
+ */
9159
9928
  enabled: boolean;
9160
- name: string | ((name: string) => string);
9929
+ /**
9930
+ * Custom naming pattern for generated mutation options names. The name variable is
9931
+ * obtained from the SDK function name.
9932
+ *
9933
+ * @default '{{name}}Mutation'
9934
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation
9935
+ */
9936
+ name: StringName;
9161
9937
  };
9162
9938
  /**
9163
9939
  * Name of the generated file.
@@ -9171,9 +9947,26 @@ type ResolvedConfig$4 = Plugin.Name<'@tanstack/solid-query'> & {
9171
9947
  * @see https://tanstack.com/query/v5/docs/framework/solid/reference/queryKey
9172
9948
  */
9173
9949
  queryKeys: {
9950
+ /**
9951
+ * The casing convention to use for generated names.
9952
+ *
9953
+ * @default 'camelCase'
9954
+ */
9174
9955
  case: StringCase;
9956
+ /**
9957
+ * Whether to generate query keys.
9958
+ *
9959
+ * @default true
9960
+ */
9175
9961
  enabled: boolean;
9176
- name: string | ((name: string) => string);
9962
+ /**
9963
+ * Custom naming pattern for generated query key names. The name variable is
9964
+ * obtained from the SDK function name.
9965
+ *
9966
+ * @default '{{name}}QueryKey'
9967
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/queryKey
9968
+ */
9969
+ name: StringName;
9177
9970
  };
9178
9971
  /**
9179
9972
  * Resolved configuration for generated query options helpers.
@@ -9181,15 +9974,32 @@ type ResolvedConfig$4 = Plugin.Name<'@tanstack/solid-query'> & {
9181
9974
  * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createQuery
9182
9975
  */
9183
9976
  queryOptions: {
9977
+ /**
9978
+ * The casing convention to use for generated names.
9979
+ *
9980
+ * @default 'camelCase'
9981
+ */
9184
9982
  case: StringCase;
9983
+ /**
9984
+ * Whether to generate query options helpers.
9985
+ *
9986
+ * @default true
9987
+ */
9185
9988
  enabled: boolean;
9186
- name: string | ((name: string) => string);
9989
+ /**
9990
+ * Custom naming pattern for generated query options names. The name variable is
9991
+ * obtained from the SDK function name.
9992
+ *
9993
+ * @default '{{name}}Options'
9994
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createQuery
9995
+ */
9996
+ name: StringName;
9187
9997
  };
9188
9998
  };
9189
9999
 
9190
- type TanStackSolidQueryPlugin = DefinePlugin<Config$5, ResolvedConfig$4>;
10000
+ type TanStackSolidQueryPlugin = DefinePlugin<UserConfig$5, Config$4>;
9191
10001
 
9192
- type Config$4 = Plugin.Name<'@tanstack/svelte-query'> & {
10002
+ type UserConfig$4 = Plugin.Name<'@tanstack/svelte-query'> & {
9193
10003
  /**
9194
10004
  * The casing convention to use for generated names.
9195
10005
  *
@@ -9212,40 +10022,112 @@ type Config$4 = Plugin.Name<'@tanstack/svelte-query'> & {
9212
10022
  * Configuration for generated infinite query key helpers.
9213
10023
  *
9214
10024
  * See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery}
10025
+ *
10026
+ * Can be:
10027
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10028
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10029
+ * - `object`: Full configuration object
10030
+ *
10031
+ * @default true
9215
10032
  */
9216
10033
  infiniteQueryKeys?:
9217
10034
  | boolean
9218
- | string
10035
+ | StringName
9219
10036
  | {
10037
+ /**
10038
+ * The casing convention to use for generated names.
10039
+ *
10040
+ * @default 'camelCase'
10041
+ */
9220
10042
  case?: StringCase;
10043
+ /**
10044
+ * Whether to generate infinite query key helpers.
10045
+ *
10046
+ * @default true
10047
+ */
9221
10048
  enabled?: boolean;
9222
- name?: string | ((name: string) => string);
10049
+ /**
10050
+ * Custom naming pattern for generated infinite query key names. The name variable is
10051
+ * obtained from the SDK function name.
10052
+ *
10053
+ * @default '{{name}}InfiniteQueryKey'
10054
+ * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery
10055
+ */
10056
+ name?: StringName;
9223
10057
  };
9224
10058
  /**
9225
10059
  * Configuration for generated infinite query options helpers.
9226
10060
  *
9227
10061
  * See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery}
10062
+ *
10063
+ * Can be:
10064
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10065
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10066
+ * - `object`: Full configuration object
10067
+ *
10068
+ * @default true
9228
10069
  */
9229
10070
  infiniteQueryOptions?:
9230
10071
  | boolean
9231
- | string
10072
+ | StringName
9232
10073
  | {
10074
+ /**
10075
+ * The casing convention to use for generated names.
10076
+ *
10077
+ * @default 'camelCase'
10078
+ */
9233
10079
  case?: StringCase;
10080
+ /**
10081
+ * Whether to generate infinite query options helpers.
10082
+ *
10083
+ * @default true
10084
+ */
9234
10085
  enabled?: boolean;
9235
- name?: string | ((name: string) => string);
10086
+ /**
10087
+ * Custom naming pattern for generated infinite query options names. The name variable is
10088
+ * obtained from the SDK function name.
10089
+ *
10090
+ * @default '{{name}}InfiniteOptions'
10091
+ * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery
10092
+ */
10093
+ name?: StringName;
9236
10094
  };
9237
10095
  /**
9238
10096
  * Configuration for generated mutation options helpers.
9239
10097
  *
9240
- * See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/createMutation}
10098
+ * See {@link https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation}
10099
+ *
10100
+ * Can be:
10101
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10102
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10103
+ * - `object`: Full configuration object
10104
+ *
10105
+ * @default true
9241
10106
  */
9242
10107
  mutationOptions?:
9243
10108
  | boolean
9244
- | string
10109
+ | StringName
9245
10110
  | {
10111
+ /**
10112
+ * The casing convention to use for generated names.
10113
+ *
10114
+ * @default 'camelCase'
10115
+ */
9246
10116
  case?: StringCase;
10117
+ /**
10118
+ * Whether to generate mutation options helpers.
10119
+ *
10120
+ * @default true
10121
+ */
9247
10122
  enabled?: boolean;
9248
- name?: string | ((name: string) => string);
10123
+ /**
10124
+ * Custom naming pattern for generated mutation options names. The name variable is
10125
+ * obtained from the SDK function name.
10126
+ *
10127
+ * @default '{{name}}Mutation'
10128
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation
10129
+ */
10130
+ name?: StringName;
9249
10131
  };
9250
10132
  /**
9251
10133
  * Name of the generated file.
@@ -9257,31 +10139,79 @@ type Config$4 = Plugin.Name<'@tanstack/svelte-query'> & {
9257
10139
  * Configuration for generated query keys.
9258
10140
  *
9259
10141
  * See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/queryKey}
10142
+ *
10143
+ * Can be:
10144
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10145
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10146
+ * - `object`: Full configuration object
10147
+ *
10148
+ * @default true
9260
10149
  */
9261
10150
  queryKeys?:
9262
10151
  | boolean
9263
- | string
10152
+ | StringName
9264
10153
  | {
10154
+ /**
10155
+ * The casing convention to use for generated names.
10156
+ *
10157
+ * @default 'camelCase'
10158
+ */
9265
10159
  case?: StringCase;
10160
+ /**
10161
+ * Whether to generate query keys.
10162
+ *
10163
+ * @default true
10164
+ */
9266
10165
  enabled?: boolean;
9267
- name?: string | ((name: string) => string);
10166
+ /**
10167
+ * Custom naming pattern for generated query key names. The name variable is
10168
+ * obtained from the SDK function name.
10169
+ *
10170
+ * @default '{{name}}QueryKey'
10171
+ * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/queryKey
10172
+ */
10173
+ name?: StringName;
9268
10174
  };
9269
10175
  /**
9270
10176
  * Configuration for generated query options helpers.
9271
10177
  *
9272
10178
  * See {@link https://tanstack.com/query/v5/docs/framework/svelte/reference/createQuery}
10179
+ *
10180
+ * Can be:
10181
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10182
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10183
+ * - `object`: Full configuration object
10184
+ *
10185
+ * @default true
9273
10186
  */
9274
10187
  queryOptions?:
9275
10188
  | boolean
9276
- | string
10189
+ | StringName
9277
10190
  | {
10191
+ /**
10192
+ * The casing convention to use for generated names.
10193
+ *
10194
+ * @default 'camelCase'
10195
+ */
9278
10196
  case?: StringCase;
10197
+ /**
10198
+ * Whether to generate query options helpers.
10199
+ *
10200
+ * @default true
10201
+ */
9279
10202
  enabled?: boolean;
9280
- name?: string | ((name: string) => string);
10203
+ /**
10204
+ * Custom naming pattern for generated query options names. The name variable is
10205
+ * obtained from the SDK function name.
10206
+ *
10207
+ * @default '{{name}}Options'
10208
+ * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createQuery
10209
+ */
10210
+ name?: StringName;
9281
10211
  };
9282
10212
  };
9283
10213
 
9284
- type ResolvedConfig$3 = Plugin.Name<'@tanstack/svelte-query'> & {
10214
+ type Config$3 = Plugin.Name<'@tanstack/svelte-query'> & {
9285
10215
  /**
9286
10216
  * The casing convention to use for generated names.
9287
10217
  *
@@ -9306,9 +10236,26 @@ type ResolvedConfig$3 = Plugin.Name<'@tanstack/svelte-query'> & {
9306
10236
  * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery
9307
10237
  */
9308
10238
  infiniteQueryKeys: {
10239
+ /**
10240
+ * The casing convention to use for generated names.
10241
+ *
10242
+ * @default 'camelCase'
10243
+ */
9309
10244
  case: StringCase;
10245
+ /**
10246
+ * Whether to generate infinite query key helpers.
10247
+ *
10248
+ * @default true
10249
+ */
9310
10250
  enabled: boolean;
9311
- name: string | ((name: string) => string);
10251
+ /**
10252
+ * Custom naming pattern for generated infinite query key names. The name variable is
10253
+ * obtained from the SDK function name.
10254
+ *
10255
+ * @default '{{name}}InfiniteQueryKey'
10256
+ * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery
10257
+ */
10258
+ name: StringName;
9312
10259
  };
9313
10260
  /**
9314
10261
  * Resolved configuration for generated infinite query options helpers.
@@ -9316,9 +10263,26 @@ type ResolvedConfig$3 = Plugin.Name<'@tanstack/svelte-query'> & {
9316
10263
  * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery
9317
10264
  */
9318
10265
  infiniteQueryOptions: {
10266
+ /**
10267
+ * The casing convention to use for generated names.
10268
+ *
10269
+ * @default 'camelCase'
10270
+ */
9319
10271
  case: StringCase;
10272
+ /**
10273
+ * Whether to generate infinite query options helpers.
10274
+ *
10275
+ * @default true
10276
+ */
9320
10277
  enabled: boolean;
9321
- name: string | ((name: string) => string);
10278
+ /**
10279
+ * Custom naming pattern for generated infinite query options names. The name variable is
10280
+ * obtained from the SDK function name.
10281
+ *
10282
+ * @default '{{name}}InfiniteOptions'
10283
+ * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createInfiniteQuery
10284
+ */
10285
+ name: StringName;
9322
10286
  };
9323
10287
  /**
9324
10288
  * Resolved configuration for generated mutation options helpers.
@@ -9326,9 +10290,26 @@ type ResolvedConfig$3 = Plugin.Name<'@tanstack/svelte-query'> & {
9326
10290
  * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createMutation
9327
10291
  */
9328
10292
  mutationOptions: {
10293
+ /**
10294
+ * The casing convention to use for generated names.
10295
+ *
10296
+ * @default 'camelCase'
10297
+ */
9329
10298
  case: StringCase;
10299
+ /**
10300
+ * Whether to generate mutation options helpers.
10301
+ *
10302
+ * @default true
10303
+ */
9330
10304
  enabled: boolean;
9331
- name: string | ((name: string) => string);
10305
+ /**
10306
+ * Custom naming pattern for generated mutation options names. The name variable is
10307
+ * obtained from the SDK function name.
10308
+ *
10309
+ * @default '{{name}}Mutation'
10310
+ * @see https://tanstack.com/query/v5/docs/framework/solid/reference/createMutation
10311
+ */
10312
+ name: StringName;
9332
10313
  };
9333
10314
  /**
9334
10315
  * Name of the generated file.
@@ -9342,9 +10323,26 @@ type ResolvedConfig$3 = Plugin.Name<'@tanstack/svelte-query'> & {
9342
10323
  * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/queryKey
9343
10324
  */
9344
10325
  queryKeys: {
10326
+ /**
10327
+ * The casing convention to use for generated names.
10328
+ *
10329
+ * @default 'camelCase'
10330
+ */
9345
10331
  case: StringCase;
10332
+ /**
10333
+ * Whether to generate query keys.
10334
+ *
10335
+ * @default true
10336
+ */
9346
10337
  enabled: boolean;
9347
- name: string | ((name: string) => string);
10338
+ /**
10339
+ * Custom naming pattern for generated query key names. The name variable is
10340
+ * obtained from the SDK function name.
10341
+ *
10342
+ * @default '{{name}}QueryKey'
10343
+ * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/queryKey
10344
+ */
10345
+ name: StringName;
9348
10346
  };
9349
10347
  /**
9350
10348
  * Resolved configuration for generated query options helpers.
@@ -9352,15 +10350,32 @@ type ResolvedConfig$3 = Plugin.Name<'@tanstack/svelte-query'> & {
9352
10350
  * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createQuery
9353
10351
  */
9354
10352
  queryOptions: {
10353
+ /**
10354
+ * The casing convention to use for generated names.
10355
+ *
10356
+ * @default 'camelCase'
10357
+ */
9355
10358
  case: StringCase;
10359
+ /**
10360
+ * Whether to generate query options helpers.
10361
+ *
10362
+ * @default true
10363
+ */
9356
10364
  enabled: boolean;
9357
- name: string | ((name: string) => string);
10365
+ /**
10366
+ * Custom naming pattern for generated query options names. The name variable is
10367
+ * obtained from the SDK function name.
10368
+ *
10369
+ * @default '{{name}}Options'
10370
+ * @see https://tanstack.com/query/v5/docs/framework/svelte/reference/createQuery
10371
+ */
10372
+ name: StringName;
9358
10373
  };
9359
10374
  };
9360
10375
 
9361
- type TanStackSvelteQueryPlugin = DefinePlugin<Config$4, ResolvedConfig$3>;
10376
+ type TanStackSvelteQueryPlugin = DefinePlugin<UserConfig$4, Config$3>;
9362
10377
 
9363
- type Config$3 = Plugin.Name<'@tanstack/vue-query'> & {
10378
+ type UserConfig$3 = Plugin.Name<'@tanstack/vue-query'> & {
9364
10379
  /**
9365
10380
  * The casing convention to use for generated names.
9366
10381
  *
@@ -9383,40 +10398,112 @@ type Config$3 = Plugin.Name<'@tanstack/vue-query'> & {
9383
10398
  * Configuration for generated infinite query key helpers.
9384
10399
  *
9385
10400
  * See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions}
10401
+ *
10402
+ * Can be:
10403
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10404
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10405
+ * - `object`: Full configuration object
10406
+ *
10407
+ * @default true
9386
10408
  */
9387
10409
  infiniteQueryKeys?:
9388
10410
  | boolean
9389
- | string
10411
+ | StringName
9390
10412
  | {
10413
+ /**
10414
+ * The casing convention to use for generated names.
10415
+ *
10416
+ * @default 'camelCase'
10417
+ */
9391
10418
  case?: StringCase;
10419
+ /**
10420
+ * Whether to generate infinite query key helpers.
10421
+ *
10422
+ * @default true
10423
+ */
9392
10424
  enabled?: boolean;
9393
- name?: string | ((name: string) => string);
10425
+ /**
10426
+ * Custom naming pattern for generated infinite query key names. The name variable is
10427
+ * obtained from the SDK function name.
10428
+ *
10429
+ * @default '{{name}}InfiniteQueryKey'
10430
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions
10431
+ */
10432
+ name?: StringName;
9394
10433
  };
9395
10434
  /**
9396
10435
  * Configuration for generated infinite query options helpers.
9397
10436
  *
9398
10437
  * See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions}
10438
+ *
10439
+ * Can be:
10440
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10441
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10442
+ * - `object`: Full configuration object
10443
+ *
10444
+ * @default true
9399
10445
  */
9400
10446
  infiniteQueryOptions?:
9401
10447
  | boolean
9402
- | string
10448
+ | StringName
9403
10449
  | {
10450
+ /**
10451
+ * The casing convention to use for generated names.
10452
+ *
10453
+ * @default 'camelCase'
10454
+ */
9404
10455
  case?: StringCase;
10456
+ /**
10457
+ * Whether to generate infinite query options helpers.
10458
+ *
10459
+ * @default true
10460
+ */
9405
10461
  enabled?: boolean;
9406
- name?: string | ((name: string) => string);
10462
+ /**
10463
+ * Custom naming pattern for generated infinite query options names. The name variable is
10464
+ * obtained from the SDK function name.
10465
+ *
10466
+ * @default '{{name}}InfiniteOptions'
10467
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions
10468
+ */
10469
+ name?: StringName;
9407
10470
  };
9408
10471
  /**
9409
10472
  * Configuration for generated mutation options helpers.
9410
10473
  *
9411
10474
  * See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/useMutation}
10475
+ *
10476
+ * Can be:
10477
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10478
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10479
+ * - `object`: Full configuration object
10480
+ *
10481
+ * @default true
9412
10482
  */
9413
10483
  mutationOptions?:
9414
10484
  | boolean
9415
- | string
10485
+ | StringName
9416
10486
  | {
10487
+ /**
10488
+ * The casing convention to use for generated names.
10489
+ *
10490
+ * @default 'camelCase'
10491
+ */
9417
10492
  case?: StringCase;
10493
+ /**
10494
+ * Whether to generate mutation options helpers.
10495
+ *
10496
+ * @default true
10497
+ */
9418
10498
  enabled?: boolean;
9419
- name?: string | ((name: string) => string);
10499
+ /**
10500
+ * Custom naming pattern for generated mutation options names. The name variable is
10501
+ * obtained from the SDK function name.
10502
+ *
10503
+ * @default '{{name}}Mutation'
10504
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/useMutation
10505
+ */
10506
+ name?: StringName;
9420
10507
  };
9421
10508
  /**
9422
10509
  * Name of the generated file.
@@ -9428,31 +10515,79 @@ type Config$3 = Plugin.Name<'@tanstack/vue-query'> & {
9428
10515
  * Configuration for generated query keys.
9429
10516
  *
9430
10517
  * See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/queryKey}
10518
+ *
10519
+ * Can be:
10520
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10521
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10522
+ * - `object`: Full configuration object
10523
+ *
10524
+ * @default true
9431
10525
  */
9432
10526
  queryKeys?:
9433
10527
  | boolean
9434
- | string
10528
+ | StringName
9435
10529
  | {
10530
+ /**
10531
+ * The casing convention to use for generated names.
10532
+ *
10533
+ * @default 'camelCase'
10534
+ */
9436
10535
  case?: StringCase;
10536
+ /**
10537
+ * Whether to generate query keys.
10538
+ *
10539
+ * @default true
10540
+ */
9437
10541
  enabled?: boolean;
9438
- name?: string | ((name: string) => string);
10542
+ /**
10543
+ * Custom naming pattern for generated query key names. The name variable is
10544
+ * obtained from the SDK function name.
10545
+ *
10546
+ * @default '{{name}}QueryKey'
10547
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/queryKey
10548
+ */
10549
+ name?: StringName;
9439
10550
  };
9440
10551
  /**
9441
10552
  * Configuration for generated query options helpers.
9442
10553
  *
9443
10554
  * See {@link https://tanstack.com/query/v5/docs/framework/vue/reference/queryOptions}
10555
+ *
10556
+ * Can be:
10557
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10558
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10559
+ * - `object`: Full configuration object
10560
+ *
10561
+ * @default true
9444
10562
  */
9445
10563
  queryOptions?:
9446
10564
  | boolean
9447
- | string
10565
+ | StringName
9448
10566
  | {
10567
+ /**
10568
+ * The casing convention to use for generated names.
10569
+ *
10570
+ * @default 'camelCase'
10571
+ */
9449
10572
  case?: StringCase;
10573
+ /**
10574
+ * Whether to generate query options helpers.
10575
+ *
10576
+ * @default true
10577
+ */
9450
10578
  enabled?: boolean;
9451
- name?: string | ((name: string) => string);
10579
+ /**
10580
+ * Custom naming pattern for generated query options names. The name variable is
10581
+ * obtained from the SDK function name.
10582
+ *
10583
+ * @default '{{name}}Options'
10584
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/queryOptions
10585
+ */
10586
+ name?: StringName;
9452
10587
  };
9453
10588
  };
9454
10589
 
9455
- type ResolvedConfig$2 = Plugin.Name<'@tanstack/vue-query'> & {
10590
+ type Config$2 = Plugin.Name<'@tanstack/vue-query'> & {
9456
10591
  /**
9457
10592
  * The casing convention to use for generated names.
9458
10593
  *
@@ -9477,9 +10612,26 @@ type ResolvedConfig$2 = Plugin.Name<'@tanstack/vue-query'> & {
9477
10612
  * @see https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions
9478
10613
  */
9479
10614
  infiniteQueryKeys: {
10615
+ /**
10616
+ * The casing convention to use for generated names.
10617
+ *
10618
+ * @default 'camelCase'
10619
+ */
9480
10620
  case: StringCase;
10621
+ /**
10622
+ * Whether to generate infinite query key helpers.
10623
+ *
10624
+ * @default true
10625
+ */
9481
10626
  enabled: boolean;
9482
- name: string | ((name: string) => string);
10627
+ /**
10628
+ * Custom naming pattern for generated infinite query key names. The name variable is
10629
+ * obtained from the SDK function name.
10630
+ *
10631
+ * @default '{{name}}InfiniteQueryKey'
10632
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions
10633
+ */
10634
+ name: StringName;
9483
10635
  };
9484
10636
  /**
9485
10637
  * Resolved configuration for generated infinite query options helpers.
@@ -9487,9 +10639,26 @@ type ResolvedConfig$2 = Plugin.Name<'@tanstack/vue-query'> & {
9487
10639
  * @see https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions
9488
10640
  */
9489
10641
  infiniteQueryOptions: {
10642
+ /**
10643
+ * The casing convention to use for generated names.
10644
+ *
10645
+ * @default 'camelCase'
10646
+ */
9490
10647
  case: StringCase;
10648
+ /**
10649
+ * Whether to generate infinite query options helpers.
10650
+ *
10651
+ * @default true
10652
+ */
9491
10653
  enabled: boolean;
9492
- name: string | ((name: string) => string);
10654
+ /**
10655
+ * Custom naming pattern for generated infinite query options names. The name variable is
10656
+ * obtained from the SDK function name.
10657
+ *
10658
+ * @default '{{name}}InfiniteOptions'
10659
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions
10660
+ */
10661
+ name: StringName;
9493
10662
  };
9494
10663
  /**
9495
10664
  * Resolved configuration for generated mutation options helpers.
@@ -9497,9 +10666,26 @@ type ResolvedConfig$2 = Plugin.Name<'@tanstack/vue-query'> & {
9497
10666
  * @see https://tanstack.com/query/v5/docs/framework/vue/reference/useMutation
9498
10667
  */
9499
10668
  mutationOptions: {
10669
+ /**
10670
+ * The casing convention to use for generated names.
10671
+ *
10672
+ * @default 'camelCase'
10673
+ */
9500
10674
  case: StringCase;
10675
+ /**
10676
+ * Whether to generate mutation options helpers.
10677
+ *
10678
+ * @default true
10679
+ */
9501
10680
  enabled: boolean;
9502
- name: string | ((name: string) => string);
10681
+ /**
10682
+ * Custom naming pattern for generated mutation options names. The name variable is
10683
+ * obtained from the SDK function name.
10684
+ *
10685
+ * @default '{{name}}Mutation'
10686
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/useMutation
10687
+ */
10688
+ name: StringName;
9503
10689
  };
9504
10690
  /**
9505
10691
  * Name of the generated file.
@@ -9513,9 +10699,26 @@ type ResolvedConfig$2 = Plugin.Name<'@tanstack/vue-query'> & {
9513
10699
  * @see https://tanstack.com/query/v5/docs/framework/vue/reference/queryKey
9514
10700
  */
9515
10701
  queryKeys: {
10702
+ /**
10703
+ * The casing convention to use for generated names.
10704
+ *
10705
+ * @default 'camelCase'
10706
+ */
9516
10707
  case: StringCase;
10708
+ /**
10709
+ * Whether to generate query keys.
10710
+ *
10711
+ * @default true
10712
+ */
9517
10713
  enabled: boolean;
9518
- name: string | ((name: string) => string);
10714
+ /**
10715
+ * Custom naming pattern for generated query key names. The name variable is
10716
+ * obtained from the SDK function name.
10717
+ *
10718
+ * @default '{{name}}QueryKey'
10719
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/queryKey
10720
+ */
10721
+ name: StringName;
9519
10722
  };
9520
10723
  /**
9521
10724
  * Resolved configuration for generated query options helpers.
@@ -9523,15 +10726,32 @@ type ResolvedConfig$2 = Plugin.Name<'@tanstack/vue-query'> & {
9523
10726
  * @see https://tanstack.com/query/v5/docs/framework/vue/reference/queryOptions
9524
10727
  */
9525
10728
  queryOptions: {
10729
+ /**
10730
+ * The casing convention to use for generated names.
10731
+ *
10732
+ * @default 'camelCase'
10733
+ */
9526
10734
  case: StringCase;
10735
+ /**
10736
+ * Whether to generate query options helpers.
10737
+ *
10738
+ * @default true
10739
+ */
9527
10740
  enabled: boolean;
9528
- name: string | ((name: string) => string);
10741
+ /**
10742
+ * Custom naming pattern for generated query options names. The name variable is
10743
+ * obtained from the SDK function name.
10744
+ *
10745
+ * @default '{{name}}Options'
10746
+ * @see https://tanstack.com/query/v5/docs/framework/vue/reference/queryOptions
10747
+ */
10748
+ name: StringName;
9529
10749
  };
9530
10750
  };
9531
10751
 
9532
- type TanStackVueQueryPlugin = DefinePlugin<Config$3, ResolvedConfig$2>;
10752
+ type TanStackVueQueryPlugin = DefinePlugin<UserConfig$3, Config$2>;
9533
10753
 
9534
- type Config$2 = Plugin.Name<'fastify'> & {
10754
+ type UserConfig$2 = Plugin.Name<'fastify'> & {
9535
10755
  /**
9536
10756
  * Should the exports from the generated files be re-exported in the index
9537
10757
  * barrel file?
@@ -9547,9 +10767,9 @@ type Config$2 = Plugin.Name<'fastify'> & {
9547
10767
  output?: string;
9548
10768
  };
9549
10769
 
9550
- type FastifyPlugin = DefinePlugin<Config$2>;
10770
+ type FastifyPlugin = DefinePlugin<UserConfig$2>;
9551
10771
 
9552
- type Config$1 = Plugin.Name<'valibot'> & {
10772
+ type UserConfig$1 = Plugin.Name<'valibot'> & {
9553
10773
  /**
9554
10774
  * The casing convention to use for generated names.
9555
10775
  *
@@ -9570,12 +10790,12 @@ type Config$1 = Plugin.Name<'valibot'> & {
9570
10790
  *
9571
10791
  * Can be:
9572
10792
  * - `boolean`: Shorthand for `{ enabled: boolean }`
9573
- * - `string`: Shorthand for `{ enabled: true; name: string }`
10793
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9574
10794
  * - `object`: Full configuration object
9575
10795
  */
9576
10796
  definitions?:
9577
10797
  | boolean
9578
- | string
10798
+ | StringName
9579
10799
  | {
9580
10800
  /**
9581
10801
  * The casing convention to use for generated names.
@@ -9595,7 +10815,7 @@ type Config$1 = Plugin.Name<'valibot'> & {
9595
10815
  *
9596
10816
  * @default 'v{{name}}'
9597
10817
  */
9598
- name?: string | ((name: string) => string);
10818
+ name?: StringName;
9599
10819
  };
9600
10820
  /**
9601
10821
  * Should the exports from the generated files be re-exported in the index
@@ -9626,12 +10846,12 @@ type Config$1 = Plugin.Name<'valibot'> & {
9626
10846
  *
9627
10847
  * Can be:
9628
10848
  * - `boolean`: Shorthand for `{ enabled: boolean }`
9629
- * - `string`: Shorthand for `{ enabled: true; name: string }`
10849
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9630
10850
  * - `object`: Full configuration object
9631
10851
  */
9632
10852
  requests?:
9633
10853
  | boolean
9634
- | string
10854
+ | StringName
9635
10855
  | {
9636
10856
  /**
9637
10857
  * The casing convention to use for generated names.
@@ -9651,7 +10871,7 @@ type Config$1 = Plugin.Name<'valibot'> & {
9651
10871
  *
9652
10872
  * @default 'v{{name}}Data'
9653
10873
  */
9654
- name?: string | ((name: string) => string);
10874
+ name?: StringName;
9655
10875
  };
9656
10876
  /**
9657
10877
  * Configuration for response-specific Valibot schemas.
@@ -9661,12 +10881,12 @@ type Config$1 = Plugin.Name<'valibot'> & {
9661
10881
  *
9662
10882
  * Can be:
9663
10883
  * - `boolean`: Shorthand for `{ enabled: boolean }`
9664
- * - `string`: Shorthand for `{ enabled: true; name: string }`
10884
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9665
10885
  * - `object`: Full configuration object
9666
10886
  */
9667
10887
  responses?:
9668
10888
  | boolean
9669
- | string
10889
+ | StringName
9670
10890
  | {
9671
10891
  /**
9672
10892
  * The casing convention to use for generated names.
@@ -9686,11 +10906,11 @@ type Config$1 = Plugin.Name<'valibot'> & {
9686
10906
  *
9687
10907
  * @default 'v{{name}}Response'
9688
10908
  */
9689
- name?: string | ((name: string) => string);
10909
+ name?: StringName;
9690
10910
  };
9691
10911
  };
9692
10912
 
9693
- type ResolvedConfig$1 = Plugin.Name<'valibot'> & {
10913
+ type Config$1 = Plugin.Name<'valibot'> & {
9694
10914
  /**
9695
10915
  * The casing convention to use for generated names.
9696
10916
  *
@@ -9728,7 +10948,7 @@ type ResolvedConfig$1 = Plugin.Name<'valibot'> & {
9728
10948
  *
9729
10949
  * @default 'v{{name}}'
9730
10950
  */
9731
- name: string | ((name: string) => string);
10951
+ name: StringName;
9732
10952
  };
9733
10953
  /**
9734
10954
  * Should the exports from the generated files be re-exported in the index
@@ -9776,7 +10996,7 @@ type ResolvedConfig$1 = Plugin.Name<'valibot'> & {
9776
10996
  *
9777
10997
  * @default 'v{{name}}Data'
9778
10998
  */
9779
- name: string | ((name: string) => string);
10999
+ name: StringName;
9780
11000
  };
9781
11001
  /**
9782
11002
  * Configuration for response-specific Valibot schemas.
@@ -9803,26 +11023,26 @@ type ResolvedConfig$1 = Plugin.Name<'valibot'> & {
9803
11023
  *
9804
11024
  * @default 'v{{name}}Response'
9805
11025
  */
9806
- name: string | ((name: string) => string);
11026
+ name: StringName;
9807
11027
  };
9808
11028
  };
9809
11029
 
9810
- type ValibotPlugin = DefinePlugin<Config$1, ResolvedConfig$1, Api$1>;
11030
+ type ValibotPlugin = DefinePlugin<UserConfig$1, Config$1, Api$1>;
9811
11031
 
9812
11032
  type Api$1 = {
9813
11033
  createRequestValidator: (args: {
9814
- file: TypeScriptFile;
11034
+ file: GeneratedFile;
9815
11035
  operation: IR.OperationObject;
9816
11036
  plugin: ValibotPlugin['Instance'];
9817
11037
  }) => ts__default.ArrowFunction | undefined;
9818
11038
  createResponseValidator: (args: {
9819
- file: TypeScriptFile;
11039
+ file: GeneratedFile;
9820
11040
  operation: IR.OperationObject;
9821
11041
  plugin: ValibotPlugin['Instance'];
9822
11042
  }) => ts__default.ArrowFunction | undefined;
9823
11043
  };
9824
11044
 
9825
- type Config = Plugin.Name<'zod'> & {
11045
+ type UserConfig = Plugin.Name<'zod'> & {
9826
11046
  /**
9827
11047
  * The casing convention to use for generated names.
9828
11048
  *
@@ -9860,12 +11080,14 @@ type Config = Plugin.Name<'zod'> & {
9860
11080
  *
9861
11081
  * Can be:
9862
11082
  * - `boolean`: Shorthand for `{ enabled: boolean }`
9863
- * - `string`: Shorthand for `{ enabled: true; name: string }`
11083
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9864
11084
  * - `object`: Full configuration object
11085
+ *
11086
+ * @default true
9865
11087
  */
9866
11088
  definitions?:
9867
11089
  | boolean
9868
- | string
11090
+ | StringName
9869
11091
  | {
9870
11092
  /**
9871
11093
  * The casing convention to use for generated names.
@@ -9880,12 +11102,53 @@ type Config = Plugin.Name<'zod'> & {
9880
11102
  */
9881
11103
  enabled?: boolean;
9882
11104
  /**
9883
- * Custom naming pattern for generated schema names. The name variable is
9884
- * obtained from the schema name.
11105
+ * Custom naming pattern for generated schema names. The name variable
11106
+ * is obtained from the schema name.
9885
11107
  *
9886
11108
  * @default 'z{{name}}'
9887
11109
  */
9888
- name?: string | ((name: string) => string);
11110
+ name?: StringName;
11111
+ /**
11112
+ * Configuration for TypeScript type generation from Zod schemas.
11113
+ *
11114
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11115
+ */
11116
+ types?: {
11117
+ /**
11118
+ * Configuration for `z.infer` types.
11119
+ *
11120
+ * Can be:
11121
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
11122
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
11123
+ * - `object`: Full configuration object
11124
+ *
11125
+ * @default false
11126
+ */
11127
+ infer?:
11128
+ | boolean
11129
+ | StringName
11130
+ | {
11131
+ /**
11132
+ * The casing convention to use for generated type names.
11133
+ *
11134
+ * @default 'PascalCase'
11135
+ */
11136
+ case?: StringCase;
11137
+ /**
11138
+ * Whether to generate TypeScript types from Zod schemas.
11139
+ *
11140
+ * @default true
11141
+ */
11142
+ enabled?: boolean;
11143
+ /**
11144
+ * Custom naming pattern for generated type names. The name variable is
11145
+ * obtained from the Zod schema name.
11146
+ *
11147
+ * @default '{{name}}ZodType'
11148
+ */
11149
+ name?: StringName;
11150
+ };
11151
+ };
9889
11152
  };
9890
11153
  /**
9891
11154
  * Should the exports from the generated files be re-exported in the index
@@ -9916,12 +11179,14 @@ type Config = Plugin.Name<'zod'> & {
9916
11179
  *
9917
11180
  * Can be:
9918
11181
  * - `boolean`: Shorthand for `{ enabled: boolean }`
9919
- * - `string`: Shorthand for `{ enabled: true; name: string }`
11182
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9920
11183
  * - `object`: Full configuration object
11184
+ *
11185
+ * @default true
9921
11186
  */
9922
11187
  requests?:
9923
11188
  | boolean
9924
- | string
11189
+ | StringName
9925
11190
  | {
9926
11191
  /**
9927
11192
  * The casing convention to use for generated names.
@@ -9936,12 +11201,53 @@ type Config = Plugin.Name<'zod'> & {
9936
11201
  */
9937
11202
  enabled?: boolean;
9938
11203
  /**
9939
- * Custom naming pattern for generated schema names. The name variable is
9940
- * obtained from the operation name.
11204
+ * Custom naming pattern for generated schema names. The name variable
11205
+ * is obtained from the operation name.
9941
11206
  *
9942
11207
  * @default 'z{{name}}Data'
9943
11208
  */
9944
- name?: string | ((name: string) => string);
11209
+ name?: StringName;
11210
+ /**
11211
+ * Configuration for TypeScript type generation from Zod schemas.
11212
+ *
11213
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11214
+ */
11215
+ types?: {
11216
+ /**
11217
+ * Configuration for `z.infer` types.
11218
+ *
11219
+ * Can be:
11220
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
11221
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
11222
+ * - `object`: Full configuration object
11223
+ *
11224
+ * @default false
11225
+ */
11226
+ infer?:
11227
+ | boolean
11228
+ | StringName
11229
+ | {
11230
+ /**
11231
+ * The casing convention to use for generated type names.
11232
+ *
11233
+ * @default 'PascalCase'
11234
+ */
11235
+ case?: StringCase;
11236
+ /**
11237
+ * Whether to generate TypeScript types from Zod schemas.
11238
+ *
11239
+ * @default true
11240
+ */
11241
+ enabled?: boolean;
11242
+ /**
11243
+ * Custom naming pattern for generated type names. The name variable is
11244
+ * obtained from the Zod schema name.
11245
+ *
11246
+ * @default '{{name}}DataZodType'
11247
+ */
11248
+ name?: StringName;
11249
+ };
11250
+ };
9945
11251
  };
9946
11252
  /**
9947
11253
  * Configuration for response-specific Zod schemas.
@@ -9951,12 +11257,14 @@ type Config = Plugin.Name<'zod'> & {
9951
11257
  *
9952
11258
  * Can be:
9953
11259
  * - `boolean`: Shorthand for `{ enabled: boolean }`
9954
- * - `string`: Shorthand for `{ enabled: true; name: string }`
11260
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9955
11261
  * - `object`: Full configuration object
11262
+ *
11263
+ * @default true
9956
11264
  */
9957
11265
  responses?:
9958
11266
  | boolean
9959
- | string
11267
+ | StringName
9960
11268
  | {
9961
11269
  /**
9962
11270
  * The casing convention to use for generated names.
@@ -9971,16 +11279,91 @@ type Config = Plugin.Name<'zod'> & {
9971
11279
  */
9972
11280
  enabled?: boolean;
9973
11281
  /**
9974
- * Custom naming pattern for generated schema names. The name variable is
9975
- * obtained from the operation name.
11282
+ * Custom naming pattern for generated schema names. The name variable
11283
+ * is obtained from the operation name.
9976
11284
  *
9977
11285
  * @default 'z{{name}}Response'
9978
11286
  */
9979
- name?: string | ((name: string) => string);
11287
+ name?: StringName;
11288
+ /**
11289
+ * Configuration for TypeScript type generation from Zod schemas.
11290
+ *
11291
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11292
+ */
11293
+ types?: {
11294
+ /**
11295
+ * Configuration for `z.infer` types.
11296
+ *
11297
+ * Can be:
11298
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
11299
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
11300
+ * - `object`: Full configuration object
11301
+ *
11302
+ * @default false
11303
+ */
11304
+ infer?:
11305
+ | boolean
11306
+ | StringName
11307
+ | {
11308
+ /**
11309
+ * The casing convention to use for generated type names.
11310
+ *
11311
+ * @default 'PascalCase'
11312
+ */
11313
+ case?: StringCase;
11314
+ /**
11315
+ * Whether to generate TypeScript types from Zod schemas.
11316
+ *
11317
+ * @default true
11318
+ */
11319
+ enabled?: boolean;
11320
+ /**
11321
+ * Custom naming pattern for generated type names. The name variable is
11322
+ * obtained from the Zod schema name.
11323
+ *
11324
+ * @default '{{name}}ResponseZodType'
11325
+ */
11326
+ name?: StringName;
11327
+ };
11328
+ };
9980
11329
  };
11330
+ /**
11331
+ * Configuration for TypeScript type generation from Zod schemas.
11332
+ *
11333
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11334
+ */
11335
+ types?: {
11336
+ /**
11337
+ * Configuration for `z.infer` types.
11338
+ *
11339
+ * Can be:
11340
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
11341
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
11342
+ * - `object`: Full configuration object
11343
+ *
11344
+ * @default false
11345
+ */
11346
+ infer?:
11347
+ | boolean
11348
+ | StringName
11349
+ | {
11350
+ /**
11351
+ * The casing convention to use for generated type names.
11352
+ *
11353
+ * @default 'PascalCase'
11354
+ */
11355
+ case?: StringCase;
11356
+ /**
11357
+ * Whether to generate TypeScript types from Zod schemas.
11358
+ *
11359
+ * @default true
11360
+ */
11361
+ enabled?: boolean;
11362
+ };
11363
+ };
9981
11364
  };
9982
11365
 
9983
- type ResolvedConfig = Plugin.Name<'zod'> & {
11366
+ type Config = Plugin.Name<'zod'> & {
9984
11367
  /**
9985
11368
  * The casing convention to use for generated names.
9986
11369
  *
@@ -10035,7 +11418,38 @@ type ResolvedConfig = Plugin.Name<'zod'> & {
10035
11418
  *
10036
11419
  * @default 'z{{name}}'
10037
11420
  */
10038
- name: string | ((name: string) => string);
11421
+ name: StringName;
11422
+ /**
11423
+ * Configuration for TypeScript type generation from Zod schemas.
11424
+ *
11425
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11426
+ */
11427
+ types: {
11428
+ /**
11429
+ * Configuration for `z.infer` types.
11430
+ */
11431
+ infer: {
11432
+ /**
11433
+ * The casing convention to use for generated type names.
11434
+ *
11435
+ * @default 'PascalCase'
11436
+ */
11437
+ case: StringCase;
11438
+ /**
11439
+ * Whether to generate TypeScript types from Zod schemas.
11440
+ *
11441
+ * @default true
11442
+ */
11443
+ enabled: boolean;
11444
+ /**
11445
+ * Custom naming pattern for generated type names. The name variable is
11446
+ * obtained from the Zod schema name.
11447
+ *
11448
+ * @default '{{name}}ZodType'
11449
+ */
11450
+ name: StringName;
11451
+ };
11452
+ };
10039
11453
  };
10040
11454
  /**
10041
11455
  * Should the exports from the generated files be re-exported in the index
@@ -10083,7 +11497,38 @@ type ResolvedConfig = Plugin.Name<'zod'> & {
10083
11497
  *
10084
11498
  * @default 'z{{name}}Data'
10085
11499
  */
10086
- name: string | ((name: string) => string);
11500
+ name: StringName;
11501
+ /**
11502
+ * Configuration for TypeScript type generation from Zod schemas.
11503
+ *
11504
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11505
+ */
11506
+ types: {
11507
+ /**
11508
+ * Configuration for `z.infer` types.
11509
+ */
11510
+ infer: {
11511
+ /**
11512
+ * The casing convention to use for generated type names.
11513
+ *
11514
+ * @default 'PascalCase'
11515
+ */
11516
+ case: StringCase;
11517
+ /**
11518
+ * Whether to generate TypeScript types from Zod schemas.
11519
+ *
11520
+ * @default true
11521
+ */
11522
+ enabled: boolean;
11523
+ /**
11524
+ * Custom naming pattern for generated type names. The name variable is
11525
+ * obtained from the Zod schema name.
11526
+ *
11527
+ * @default '{{name}}DataZodType'
11528
+ */
11529
+ name: StringName;
11530
+ };
11531
+ };
10087
11532
  };
10088
11533
  /**
10089
11534
  * Configuration for response-specific Zod schemas.
@@ -10110,23 +11555,86 @@ type ResolvedConfig = Plugin.Name<'zod'> & {
10110
11555
  *
10111
11556
  * @default 'z{{name}}Response'
10112
11557
  */
10113
- name: string | ((name: string) => string);
11558
+ name: StringName;
11559
+ /**
11560
+ * Configuration for TypeScript type generation from Zod schemas.
11561
+ *
11562
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11563
+ */
11564
+ types: {
11565
+ /**
11566
+ * Configuration for `z.infer` types.
11567
+ */
11568
+ infer: {
11569
+ /**
11570
+ * The casing convention to use for generated type names.
11571
+ *
11572
+ * @default 'PascalCase'
11573
+ */
11574
+ case: StringCase;
11575
+ /**
11576
+ * Whether to generate TypeScript types from Zod schemas.
11577
+ *
11578
+ * @default true
11579
+ */
11580
+ enabled: boolean;
11581
+ /**
11582
+ * Custom naming pattern for generated type names. The name variable is
11583
+ * obtained from the Zod schema name.
11584
+ *
11585
+ * @default '{{name}}ResponseZodType'
11586
+ */
11587
+ name: StringName;
11588
+ };
11589
+ };
11590
+ };
11591
+ /**
11592
+ * Configuration for TypeScript type generation from Zod schemas.
11593
+ *
11594
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11595
+ */
11596
+ types: {
11597
+ /**
11598
+ * Configuration for `z.infer` types.
11599
+ */
11600
+ infer: {
11601
+ /**
11602
+ * The casing convention to use for generated type names.
11603
+ *
11604
+ * @default 'PascalCase'
11605
+ */
11606
+ case: StringCase;
11607
+ /**
11608
+ * Whether to generate TypeScript types from Zod schemas.
11609
+ *
11610
+ * @default true
11611
+ */
11612
+ enabled: boolean;
11613
+ };
10114
11614
  };
10115
11615
  };
10116
11616
 
10117
- type ZodPlugin = DefinePlugin<Config, ResolvedConfig, Api>;
11617
+ type ZodPlugin = DefinePlugin<UserConfig, Config, Api>;
10118
11618
 
11619
+ type GetIdArgs = {
11620
+ operation: IR.OperationObject;
11621
+ type: 'data' | 'responses' | 'type-infer-data' | 'type-infer-responses';
11622
+ } | {
11623
+ type: 'ref' | 'type-infer-ref';
11624
+ value: string;
11625
+ };
10119
11626
  type Api = {
10120
11627
  createRequestValidator: (args: {
10121
- file: TypeScriptFile;
11628
+ file: GeneratedFile;
10122
11629
  operation: IR.OperationObject;
10123
11630
  plugin: ZodPlugin['Instance'];
10124
11631
  }) => ts__default.ArrowFunction | undefined;
10125
11632
  createResponseValidator: (args: {
10126
- file: TypeScriptFile;
11633
+ file: GeneratedFile;
10127
11634
  operation: IR.OperationObject;
10128
11635
  plugin: ZodPlugin['Instance'];
10129
11636
  }) => ts__default.ArrowFunction | undefined;
11637
+ getId: (args: GetIdArgs) => string;
10130
11638
  };
10131
11639
 
10132
11640
  interface PluginConfigMap {
@@ -10154,6 +11662,10 @@ interface PluginConfigMap {
10154
11662
  }
10155
11663
 
10156
11664
  interface ContextFile {
11665
+ /**
11666
+ * Define casing for identifiers in this file.
11667
+ */
11668
+ case?: StringCase;
10157
11669
  /**
10158
11670
  * Should the exports from this file be re-exported in the index barrel file?
10159
11671
  */
@@ -10162,10 +11674,6 @@ interface ContextFile {
10162
11674
  * Unique file identifier.
10163
11675
  */
10164
11676
  id: string;
10165
- /**
10166
- * Define casing for identifiers in this file.
10167
- */
10168
- identifierCase?: StringCase;
10169
11677
  /**
10170
11678
  * Relative file path to the output path.
10171
11679
  *
@@ -10179,7 +11687,7 @@ declare class IRContext<Spec extends Record<string, any> = any> {
10179
11687
  * Configuration for parsing and generating the output. This
10180
11688
  * is a mix of user-provided and default values.
10181
11689
  */
10182
- config: Config$l;
11690
+ config: Config$9;
10183
11691
  /**
10184
11692
  * A map of files that will be generated from `spec`.
10185
11693
  */
@@ -10199,14 +11707,14 @@ declare class IRContext<Spec extends Record<string, any> = any> {
10199
11707
  */
10200
11708
  spec: Spec;
10201
11709
  constructor({ config, spec }: {
10202
- config: Config$l;
11710
+ config: Config$9;
10203
11711
  spec: Spec;
10204
11712
  });
10205
11713
  /**
10206
11714
  * Create and return a new TypeScript file. Also set the current file context
10207
11715
  * to the newly created file.
10208
11716
  */
10209
- createFile(file: ContextFile): TypeScriptFile;
11717
+ createFile(file: ContextFile): GeneratedFile;
10210
11718
  /**
10211
11719
  * Returns a resolved and dereferenced schema from `spec`.
10212
11720
  */
@@ -10216,7 +11724,7 @@ declare class IRContext<Spec extends Record<string, any> = any> {
10216
11724
  /**
10217
11725
  * Returns a specific file by ID from `files`.
10218
11726
  */
10219
- file({ id }: Pick<ContextFile, 'id'>): TypeScriptFile | undefined;
11727
+ file({ id }: Pick<ContextFile, 'id'>): GeneratedFile | undefined;
10220
11728
  /**
10221
11729
  * Registers a new plugin to the global context.
10222
11730
  *
@@ -10489,4 +11997,4 @@ interface WatchValues {
10489
11997
  lastValue?: string;
10490
11998
  }
10491
11999
 
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 };
12000
+ 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 };