@kubb/plugin-client 4.18.5 → 4.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { t as __name } from "./chunk-DlpkT3g-.cjs";
2
- import { i as OperationSchemas, n as PluginClient, o as Operation } from "./types-BvQ8zSDH.cjs";
2
+ import { i as OperationSchemas, n as PluginClient, o as Operation } from "./types-9E2xtAWa.cjs";
3
3
  import { FunctionParams } from "@kubb/react-fabric";
4
4
  import { KubbNode } from "@kubb/react-fabric/types";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { t as __name } from "./chunk-iVr_oF3V.js";
2
- import { i as OperationSchemas, n as PluginClient, o as Operation } from "./types-fnIF5Tde.js";
2
+ import { i as OperationSchemas, n as PluginClient, o as Operation } from "./types-CEoiGmcV.js";
3
3
  import { FunctionParams } from "@kubb/react-fabric";
4
4
  import { KubbNode } from "@kubb/react-fabric/types";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { t as __name } from "./chunk-DlpkT3g-.cjs";
2
- import { n as PluginClient, r as ReactGenerator } from "./types-BvQ8zSDH.cjs";
2
+ import { n as PluginClient, r as ReactGenerator } from "./types-9E2xtAWa.cjs";
3
3
 
4
4
  //#region src/generators/classClientGenerator.d.ts
5
5
  declare const classClientGenerator: ReactGenerator<PluginClient>;
@@ -1,5 +1,5 @@
1
1
  import { t as __name } from "./chunk-iVr_oF3V.js";
2
- import { n as PluginClient, r as ReactGenerator } from "./types-fnIF5Tde.js";
2
+ import { n as PluginClient, r as ReactGenerator } from "./types-CEoiGmcV.js";
3
3
 
4
4
  //#region src/generators/classClientGenerator.d.ts
5
5
  declare const classClientGenerator: ReactGenerator<PluginClient>;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as __name } from "./chunk-DlpkT3g-.cjs";
2
- import { a as UserPluginWithLifeCycle, n as PluginClient, t as Options } from "./types-BvQ8zSDH.cjs";
2
+ import { a as UserPluginWithLifeCycle, n as PluginClient, t as Options } from "./types-9E2xtAWa.cjs";
3
3
 
4
4
  //#region src/plugin.d.ts
5
5
  declare const pluginClientName = "plugin-client";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as __name } from "./chunk-iVr_oF3V.js";
2
- import { a as UserPluginWithLifeCycle, n as PluginClient, t as Options } from "./types-fnIF5Tde.js";
2
+ import { a as UserPluginWithLifeCycle, n as PluginClient, t as Options } from "./types-CEoiGmcV.js";
3
3
 
4
4
  //#region src/plugin.d.ts
5
5
  declare const pluginClientName = "plugin-client";
@@ -19,16 +19,21 @@ type Operation$1 = Operation;
19
19
  type DiscriminatorObject$1 = DiscriminatorObject;
20
20
  //#endregion
21
21
  //#region ../oas/src/Oas.d.ts
22
- type Options$2 = {
22
+ type OasOptions = {
23
23
  contentType?: contentType;
24
24
  discriminator?: 'strict' | 'inherit';
25
+ /**
26
+ * Resolve name collisions when schemas from different components share the same name (case-insensitive).
27
+ * @default false
28
+ */
29
+ collisionDetection?: boolean;
25
30
  };
26
31
  declare class Oas extends BaseOas {
27
32
  #private;
28
33
  document: Document;
29
34
  constructor(document: Document);
30
- setOptions(options: Options$2): void;
31
- get options(): Options$2;
35
+ setOptions(options: OasOptions): void;
36
+ get options(): OasOptions;
32
37
  get<T = unknown>($ref: string): T | null;
33
38
  getKey($ref: string): string | undefined;
34
39
  set($ref: string, value: unknown): false | undefined;
@@ -39,6 +44,18 @@ declare class Oas extends BaseOas {
39
44
  getParametersSchema(operation: Operation$1, inKey: 'path' | 'query' | 'header'): SchemaObject$1 | null;
40
45
  validate(): Promise<oas_normalize_lib_types0.ValidationResult>;
41
46
  flattenSchema(schema: SchemaObject$1 | null): SchemaObject$1 | null;
47
+ /**
48
+ * Get schemas from OpenAPI components (schemas, responses, requestBodies).
49
+ * Returns schemas in dependency order along with name mapping for collision resolution.
50
+ */
51
+ getSchemas(options?: {
52
+ contentType?: contentType;
53
+ includes?: Array<'schemas' | 'responses' | 'requestBodies'>;
54
+ collisionDetection?: boolean;
55
+ }): {
56
+ schemas: Record<string, SchemaObject$1>;
57
+ nameMapping: Map<string, string>;
58
+ };
42
59
  }
43
60
  //#endregion
44
61
  //#region ../core/src/BaseGenerator.d.ts
@@ -1315,4 +1332,4 @@ type ResolvedOptions = {
1315
1332
  type PluginClient = PluginFactoryOptions<'plugin-client', Options, ResolvedOptions, never, ResolvePathOptions>;
1316
1333
  //#endregion
1317
1334
  export { UserPluginWithLifeCycle as a, OperationSchemas as i, PluginClient as n, Operation$1 as o, ReactGenerator as r, Options as t };
1318
- //# sourceMappingURL=types-BvQ8zSDH.d.cts.map
1335
+ //# sourceMappingURL=types-9E2xtAWa.d.cts.map
@@ -19,16 +19,21 @@ type Operation$1 = Operation;
19
19
  type DiscriminatorObject$1 = DiscriminatorObject;
20
20
  //#endregion
21
21
  //#region ../oas/src/Oas.d.ts
22
- type Options$2 = {
22
+ type OasOptions = {
23
23
  contentType?: contentType;
24
24
  discriminator?: 'strict' | 'inherit';
25
+ /**
26
+ * Resolve name collisions when schemas from different components share the same name (case-insensitive).
27
+ * @default false
28
+ */
29
+ collisionDetection?: boolean;
25
30
  };
26
31
  declare class Oas extends BaseOas {
27
32
  #private;
28
33
  document: Document;
29
34
  constructor(document: Document);
30
- setOptions(options: Options$2): void;
31
- get options(): Options$2;
35
+ setOptions(options: OasOptions): void;
36
+ get options(): OasOptions;
32
37
  get<T = unknown>($ref: string): T | null;
33
38
  getKey($ref: string): string | undefined;
34
39
  set($ref: string, value: unknown): false | undefined;
@@ -39,6 +44,18 @@ declare class Oas extends BaseOas {
39
44
  getParametersSchema(operation: Operation$1, inKey: 'path' | 'query' | 'header'): SchemaObject$1 | null;
40
45
  validate(): Promise<oas_normalize_lib_types0.ValidationResult>;
41
46
  flattenSchema(schema: SchemaObject$1 | null): SchemaObject$1 | null;
47
+ /**
48
+ * Get schemas from OpenAPI components (schemas, responses, requestBodies).
49
+ * Returns schemas in dependency order along with name mapping for collision resolution.
50
+ */
51
+ getSchemas(options?: {
52
+ contentType?: contentType;
53
+ includes?: Array<'schemas' | 'responses' | 'requestBodies'>;
54
+ collisionDetection?: boolean;
55
+ }): {
56
+ schemas: Record<string, SchemaObject$1>;
57
+ nameMapping: Map<string, string>;
58
+ };
42
59
  }
43
60
  //#endregion
44
61
  //#region ../core/src/BaseGenerator.d.ts
@@ -1315,4 +1332,4 @@ type ResolvedOptions = {
1315
1332
  type PluginClient = PluginFactoryOptions<'plugin-client', Options, ResolvedOptions, never, ResolvePathOptions>;
1316
1333
  //#endregion
1317
1334
  export { UserPluginWithLifeCycle as a, OperationSchemas as i, PluginClient as n, Operation$1 as o, ReactGenerator as r, Options as t };
1318
- //# sourceMappingURL=types-fnIF5Tde.d.ts.map
1335
+ //# sourceMappingURL=types-CEoiGmcV.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-client",
3
- "version": "4.18.5",
3
+ "version": "4.19.0",
4
4
  "description": "API client generator plugin for Kubb, creating type-safe HTTP clients (Axios, Fetch) from OpenAPI specifications for making API requests.",
5
5
  "keywords": [
6
6
  "api-client",
@@ -87,14 +87,14 @@
87
87
  ],
88
88
  "dependencies": {
89
89
  "@kubb/react-fabric": "0.12.4",
90
- "@kubb/core": "4.18.5",
91
- "@kubb/oas": "4.18.5",
92
- "@kubb/plugin-oas": "4.18.5",
93
- "@kubb/plugin-ts": "4.18.5",
94
- "@kubb/plugin-zod": "4.18.5"
90
+ "@kubb/core": "4.19.0",
91
+ "@kubb/oas": "4.19.0",
92
+ "@kubb/plugin-oas": "4.19.0",
93
+ "@kubb/plugin-ts": "4.19.0",
94
+ "@kubb/plugin-zod": "4.19.0"
95
95
  },
96
96
  "devDependencies": {
97
- "axios": "^1.13.2"
97
+ "axios": "^1.13.3"
98
98
  },
99
99
  "peerDependencies": {
100
100
  "@kubb/react-fabric": "0.12.4",