@kubb/plugin-client 4.12.9 → 4.12.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { i as OperationSchemas, n as PluginClient, o as Operation } from "./types-Bf2NVPUb.cjs";
1
+ import { i as OperationSchemas, n as PluginClient, o as Operation } from "./types-CxWL8PWf.cjs";
2
2
  import { FunctionParams } from "@kubb/react-fabric";
3
3
  import { KubbNode } from "@kubb/react-fabric/types";
4
4
 
@@ -1,4 +1,4 @@
1
- import { i as OperationSchemas, n as PluginClient, o as Operation } from "./types-pbxfCLrx.js";
1
+ import { i as OperationSchemas, n as PluginClient, o as Operation } from "./types-lBu9kUfj.js";
2
2
  import { FunctionParams } from "@kubb/react-fabric";
3
3
  import { KubbNode } from "@kubb/react-fabric/types";
4
4
 
@@ -1,4 +1,4 @@
1
- import { n as PluginClient, r as ReactGenerator } from "./types-Bf2NVPUb.cjs";
1
+ import { n as PluginClient, r as ReactGenerator } from "./types-CxWL8PWf.cjs";
2
2
 
3
3
  //#region src/generators/classClientGenerator.d.ts
4
4
  declare const classClientGenerator: ReactGenerator<PluginClient>;
@@ -1,4 +1,4 @@
1
- import { n as PluginClient, r as ReactGenerator } from "./types-pbxfCLrx.js";
1
+ import { n as PluginClient, r as ReactGenerator } from "./types-lBu9kUfj.js";
2
2
 
3
3
  //#region src/generators/classClientGenerator.d.ts
4
4
  declare const classClientGenerator: ReactGenerator<PluginClient>;
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as UserPluginWithLifeCycle, n as PluginClient, t as Options } from "./types-Bf2NVPUb.cjs";
1
+ import { a as UserPluginWithLifeCycle, n as PluginClient, t as Options } from "./types-CxWL8PWf.cjs";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginClientName = "plugin-client";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as UserPluginWithLifeCycle, n as PluginClient, t as Options } from "./types-pbxfCLrx.js";
1
+ import { a as UserPluginWithLifeCycle, n as PluginClient, t as Options } from "./types-lBu9kUfj.js";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginClientName = "plugin-client";
@@ -1,47 +1,43 @@
1
- import { Fabric } from "@kubb/react-fabric";
2
- import * as OasTypes from "oas/types";
3
- import { HttpMethods as HttpMethod, OASDocument, SchemaObject, User } from "oas/types";
4
- import { Operation, Operation as Operation$1 } from "oas/operation";
5
- import { OpenAPIV3 } from "openapi-types";
6
1
  import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
7
2
  import BaseOas from "oas";
3
+ import { Operation } from "oas/operation";
4
+ import { DiscriminatorObject, HttpMethods, OASDocument, SchemaObject } from "oas/types";
8
5
  import { KubbFile } from "@kubb/fabric-core/types";
6
+ import { Fabric } from "@kubb/react-fabric";
9
7
  import { KubbNode } from "@kubb/react-fabric/types";
10
8
 
11
9
  //#region ../oas/src/types.d.ts
12
10
  type contentType = 'application/json' | (string & {});
13
- type SchemaObject$1 = OasTypes.SchemaObject & {
11
+ type SchemaObject$1 = SchemaObject & {
14
12
  'x-nullable'?: boolean;
15
13
  $ref?: string;
16
14
  };
15
+ type HttpMethod = HttpMethods;
16
+ type Document = OASDocument;
17
+ type Operation$1 = Operation;
18
+ type DiscriminatorObject$1 = DiscriminatorObject;
17
19
  //#endregion
18
20
  //#region ../oas/src/Oas.d.ts
19
21
  type Options$2 = {
20
22
  contentType?: contentType;
21
23
  discriminator?: 'strict' | 'inherit';
22
24
  };
23
- declare class Oas<const TOAS = unknown> extends BaseOas {
25
+ declare class Oas extends BaseOas {
24
26
  #private;
25
- document: TOAS;
26
- constructor({
27
- oas,
28
- user
29
- }: {
30
- oas: TOAS | OASDocument | string;
31
- user?: User;
32
- });
27
+ document: Document;
28
+ constructor(document: Document);
33
29
  setOptions(options: Options$2): void;
34
30
  get options(): Options$2;
35
- get($ref: string): any;
31
+ get<T = unknown>($ref: string): T | null;
36
32
  getKey($ref: string): string | undefined;
37
33
  set($ref: string, value: unknown): false | undefined;
38
- getDiscriminator(schema: OasTypes.SchemaObject): OpenAPIV3.DiscriminatorObject | undefined;
39
- dereferenceWithRef(schema?: unknown): any;
40
- getResponseSchema(operation: Operation, statusCode: string | number): SchemaObject;
41
- getRequestSchema(operation: Operation): SchemaObject | undefined;
42
- getParametersSchema(operation: Operation, inKey: 'path' | 'query' | 'header'): SchemaObject | null;
34
+ getDiscriminator(schema: SchemaObject$1 | null): DiscriminatorObject$1 | null;
35
+ dereferenceWithRef<T = unknown>(schema?: T): T;
36
+ getResponseSchema(operation: Operation$1, statusCode: string | number): SchemaObject$1;
37
+ getRequestSchema(operation: Operation$1): SchemaObject$1 | undefined;
38
+ getParametersSchema(operation: Operation$1, inKey: 'path' | 'query' | 'header'): SchemaObject$1 | null;
43
39
  valdiate(): Promise<oas_normalize_lib_types0.ValidationResult>;
44
- flattenSchema(schema?: SchemaObject): SchemaObject | undefined;
40
+ flattenSchema(schema: SchemaObject$1 | null): SchemaObject$1 | null;
45
41
  }
46
42
  //#endregion
47
43
  //#region ../core/src/BaseGenerator.d.ts
@@ -851,6 +847,7 @@ type SchemaKeywordMapper = {
851
847
  [x: string]: Schema[];
852
848
  };
853
849
  additionalProperties: Schema[];
850
+ patternProperties?: Record<string, Schema[]>;
854
851
  strict?: boolean;
855
852
  };
856
853
  };
@@ -1094,13 +1091,13 @@ type SchemaGeneratorOptions = {
1094
1091
  * TODO TODO add docs
1095
1092
  * @beta
1096
1093
  */
1097
- schema?: (schemaProps: SchemaProps$1, defaultSchemas: Schema[]) => Schema[] | undefined;
1094
+ schema?: (schemaProps: SchemaProps$1, defaultSchemas: Schema[]) => Array<Schema> | undefined;
1098
1095
  };
1099
1096
  };
1100
1097
  type SchemaProps$1 = {
1101
- schemaObject?: SchemaObject$1;
1102
- name?: string;
1103
- parentName?: string;
1098
+ schema: SchemaObject$1 | null;
1099
+ name: string | null;
1100
+ parentName: string | null;
1104
1101
  };
1105
1102
  declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGeneratorOptions, TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TOptions, Context<TOptions, TPluginOptions>> {
1106
1103
  #private;
@@ -1292,4 +1289,4 @@ type ResolvedOptions = {
1292
1289
  type PluginClient = PluginFactoryOptions<'plugin-client', Options, ResolvedOptions, never, ResolvePathOptions>;
1293
1290
  //#endregion
1294
1291
  export { UserPluginWithLifeCycle as a, OperationSchemas as i, PluginClient as n, Operation$1 as o, ReactGenerator as r, Options as t };
1295
- //# sourceMappingURL=types-pbxfCLrx.d.ts.map
1292
+ //# sourceMappingURL=types-CxWL8PWf.d.cts.map
@@ -1,47 +1,43 @@
1
- import * as OasTypes from "oas/types";
2
- import { HttpMethods as HttpMethod, OASDocument, SchemaObject, User } from "oas/types";
3
- import { Operation, Operation as Operation$1 } from "oas/operation";
4
- import { OpenAPIV3 } from "openapi-types";
1
+ import { Fabric } from "@kubb/react-fabric";
5
2
  import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
6
3
  import BaseOas from "oas";
4
+ import { Operation } from "oas/operation";
5
+ import { DiscriminatorObject, HttpMethods, OASDocument, SchemaObject } from "oas/types";
7
6
  import { KubbFile } from "@kubb/fabric-core/types";
8
- import { Fabric } from "@kubb/react-fabric";
9
7
  import { KubbNode } from "@kubb/react-fabric/types";
10
8
 
11
9
  //#region ../oas/src/types.d.ts
12
10
  type contentType = 'application/json' | (string & {});
13
- type SchemaObject$1 = OasTypes.SchemaObject & {
11
+ type SchemaObject$1 = SchemaObject & {
14
12
  'x-nullable'?: boolean;
15
13
  $ref?: string;
16
14
  };
15
+ type HttpMethod = HttpMethods;
16
+ type Document = OASDocument;
17
+ type Operation$1 = Operation;
18
+ type DiscriminatorObject$1 = DiscriminatorObject;
17
19
  //#endregion
18
20
  //#region ../oas/src/Oas.d.ts
19
21
  type Options$2 = {
20
22
  contentType?: contentType;
21
23
  discriminator?: 'strict' | 'inherit';
22
24
  };
23
- declare class Oas<const TOAS = unknown> extends BaseOas {
25
+ declare class Oas extends BaseOas {
24
26
  #private;
25
- document: TOAS;
26
- constructor({
27
- oas,
28
- user
29
- }: {
30
- oas: TOAS | OASDocument | string;
31
- user?: User;
32
- });
27
+ document: Document;
28
+ constructor(document: Document);
33
29
  setOptions(options: Options$2): void;
34
30
  get options(): Options$2;
35
- get($ref: string): any;
31
+ get<T = unknown>($ref: string): T | null;
36
32
  getKey($ref: string): string | undefined;
37
33
  set($ref: string, value: unknown): false | undefined;
38
- getDiscriminator(schema: OasTypes.SchemaObject): OpenAPIV3.DiscriminatorObject | undefined;
39
- dereferenceWithRef(schema?: unknown): any;
40
- getResponseSchema(operation: Operation, statusCode: string | number): SchemaObject;
41
- getRequestSchema(operation: Operation): SchemaObject | undefined;
42
- getParametersSchema(operation: Operation, inKey: 'path' | 'query' | 'header'): SchemaObject | null;
34
+ getDiscriminator(schema: SchemaObject$1 | null): DiscriminatorObject$1 | null;
35
+ dereferenceWithRef<T = unknown>(schema?: T): T;
36
+ getResponseSchema(operation: Operation$1, statusCode: string | number): SchemaObject$1;
37
+ getRequestSchema(operation: Operation$1): SchemaObject$1 | undefined;
38
+ getParametersSchema(operation: Operation$1, inKey: 'path' | 'query' | 'header'): SchemaObject$1 | null;
43
39
  valdiate(): Promise<oas_normalize_lib_types0.ValidationResult>;
44
- flattenSchema(schema?: SchemaObject): SchemaObject | undefined;
40
+ flattenSchema(schema: SchemaObject$1 | null): SchemaObject$1 | null;
45
41
  }
46
42
  //#endregion
47
43
  //#region ../core/src/BaseGenerator.d.ts
@@ -851,6 +847,7 @@ type SchemaKeywordMapper = {
851
847
  [x: string]: Schema[];
852
848
  };
853
849
  additionalProperties: Schema[];
850
+ patternProperties?: Record<string, Schema[]>;
854
851
  strict?: boolean;
855
852
  };
856
853
  };
@@ -1094,13 +1091,13 @@ type SchemaGeneratorOptions = {
1094
1091
  * TODO TODO add docs
1095
1092
  * @beta
1096
1093
  */
1097
- schema?: (schemaProps: SchemaProps$1, defaultSchemas: Schema[]) => Schema[] | undefined;
1094
+ schema?: (schemaProps: SchemaProps$1, defaultSchemas: Schema[]) => Array<Schema> | undefined;
1098
1095
  };
1099
1096
  };
1100
1097
  type SchemaProps$1 = {
1101
- schemaObject?: SchemaObject$1;
1102
- name?: string;
1103
- parentName?: string;
1098
+ schema: SchemaObject$1 | null;
1099
+ name: string | null;
1100
+ parentName: string | null;
1104
1101
  };
1105
1102
  declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGeneratorOptions, TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TOptions, Context<TOptions, TPluginOptions>> {
1106
1103
  #private;
@@ -1292,4 +1289,4 @@ type ResolvedOptions = {
1292
1289
  type PluginClient = PluginFactoryOptions<'plugin-client', Options, ResolvedOptions, never, ResolvePathOptions>;
1293
1290
  //#endregion
1294
1291
  export { UserPluginWithLifeCycle as a, OperationSchemas as i, PluginClient as n, Operation$1 as o, ReactGenerator as r, Options as t };
1295
- //# sourceMappingURL=types-Bf2NVPUb.d.cts.map
1292
+ //# sourceMappingURL=types-lBu9kUfj.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-client",
3
- "version": "4.12.9",
3
+ "version": "4.12.11",
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,11 +87,11 @@
87
87
  ],
88
88
  "dependencies": {
89
89
  "@kubb/react-fabric": "0.7.4",
90
- "@kubb/core": "4.12.9",
91
- "@kubb/oas": "4.12.9",
92
- "@kubb/plugin-oas": "4.12.9",
93
- "@kubb/plugin-ts": "4.12.9",
94
- "@kubb/plugin-zod": "4.12.9"
90
+ "@kubb/core": "4.12.11",
91
+ "@kubb/oas": "4.12.11",
92
+ "@kubb/plugin-oas": "4.12.11",
93
+ "@kubb/plugin-ts": "4.12.11",
94
+ "@kubb/plugin-zod": "4.12.11"
95
95
  },
96
96
  "devDependencies": {
97
97
  "axios": "^1.13.2"