@kubb/plugin-ts 3.6.1 → 3.6.2

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.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _kubb_core from '@kubb/core';
2
- import { O as Options, P as PluginTs } from './types-D1yD2jvM.js';
2
+ import { O as Options, P as PluginTs } from './types-DOx63BPA.js';
3
3
  import '@kubb/oas';
4
4
  import '@kubb/plugin-oas';
5
5
  import 'typescript';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { pluginTs, pluginTsName } from './chunk-AYA2SL3G.js';
2
- import './chunk-2WAGTL4H.js';
1
+ export { pluginTs, pluginTsName } from './chunk-PM4CWXK4.js';
2
+ import './chunk-WBVEQ3D4.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -55,7 +55,7 @@ type Options = {
55
55
  * Which type to use when the Swagger/OpenAPI file is not providing more information.
56
56
  * @default 'any'
57
57
  */
58
- unknownType?: 'any' | 'unknown';
58
+ unknownType?: 'any' | 'unknown' | 'void';
59
59
  /**
60
60
  * Choose what to use as mode for an optional value.
61
61
  * @examples 'questionToken': type?: string
@@ -55,7 +55,7 @@ type Options = {
55
55
  * Which type to use when the Swagger/OpenAPI file is not providing more information.
56
56
  * @default 'any'
57
57
  */
58
- unknownType?: 'any' | 'unknown';
58
+ unknownType?: 'any' | 'unknown' | 'void';
59
59
  /**
60
60
  * Choose what to use as mode for an optional value.
61
61
  * @examples 'questionToken': type?: string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-ts",
3
- "version": "3.6.1",
3
+ "version": "3.6.2",
4
4
  "description": "Generator plugin-ts",
5
5
  "keywords": [
6
6
  "zod",
@@ -58,20 +58,20 @@
58
58
  "!/**/__tests__/**"
59
59
  ],
60
60
  "dependencies": {
61
- "@kubb/core": "3.6.1",
62
- "@kubb/fs": "3.6.1",
63
- "@kubb/oas": "3.6.1",
64
- "@kubb/parser-ts": "3.6.1",
65
- "@kubb/plugin-oas": "3.6.1",
66
- "@kubb/react": "3.6.1"
61
+ "@kubb/core": "3.6.2",
62
+ "@kubb/fs": "3.6.2",
63
+ "@kubb/oas": "3.6.2",
64
+ "@kubb/parser-ts": "3.6.2",
65
+ "@kubb/plugin-oas": "3.6.2",
66
+ "@kubb/react": "3.6.2"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@types/react": "^18.3.18",
70
70
  "react": "^18.3.1",
71
71
  "tsup": "^8.4.0",
72
- "typescript": "^5.7.3",
73
- "@kubb/config-ts": "3.6.1",
74
- "@kubb/config-tsup": "3.6.1"
72
+ "typescript": "^5.8.2",
73
+ "@kubb/config-ts": "3.6.2",
74
+ "@kubb/config-tsup": "3.6.2"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@kubb/react": "^3.0.0"
@@ -8,6 +8,11 @@ export type CreatePets201 = error & {
8
8
  name?: errorCode
9
9
  }
10
10
 
11
+ /**
12
+ * @description Accepted response
13
+ */
14
+ export type CreatePets202 = any
15
+
11
16
  /**
12
17
  * @description unexpected error
13
18
  */
@@ -24,10 +29,10 @@ export type CreatePetsMutationRequest = {
24
29
  tag: string
25
30
  }
26
31
 
27
- export type CreatePetsMutationResponse = createPets201
32
+ export type CreatePetsMutationResponse = createPets201 | createPets202
28
33
 
29
34
  export type createPetsMutation = {
30
- Response: createPets201
35
+ Response: createPets201 | createPets202
31
36
  Request: createPetsMutationRequest
32
37
  Errors: any
33
38
  }
@@ -8,6 +8,11 @@ export type CreatePets201 = error & {
8
8
  name?: errorCode
9
9
  }
10
10
 
11
+ /**
12
+ * @description Accepted response
13
+ */
14
+ export type CreatePets202 = unknown
15
+
11
16
  /**
12
17
  * @description unexpected error
13
18
  */
@@ -24,10 +29,10 @@ export type CreatePetsMutationRequest = {
24
29
  tag: string
25
30
  }
26
31
 
27
- export type CreatePetsMutationResponse = createPets201
32
+ export type CreatePetsMutationResponse = createPets201 | createPets202
28
33
 
29
34
  export type createPetsMutation = {
30
- Response: createPets201
35
+ Response: createPets201 | createPets202
31
36
  Request: createPetsMutationRequest
32
37
  Errors: any
33
38
  }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @description Null response
3
+ */
4
+ export type CreatePets201 = error & {
5
+ /**
6
+ * @type object | undefined
7
+ */
8
+ name?: errorCode
9
+ }
10
+
11
+ /**
12
+ * @description Accepted response
13
+ */
14
+ export type CreatePets202 = void
15
+
16
+ /**
17
+ * @description unexpected error
18
+ */
19
+ export type CreatePetsError = error
20
+
21
+ export type CreatePetsMutationRequest = {
22
+ /**
23
+ * @type string
24
+ */
25
+ name: string
26
+ /**
27
+ * @type string
28
+ */
29
+ tag: string
30
+ }
31
+
32
+ export type CreatePetsMutationResponse = createPets201 | createPets202
33
+
34
+ export type createPetsMutation = {
35
+ Response: createPets201 | createPets202
36
+ Request: createPetsMutationRequest
37
+ Errors: any
38
+ }
package/src/parser.ts CHANGED
@@ -8,6 +8,7 @@ import type ts from 'typescript'
8
8
  export const typeKeywordMapper = {
9
9
  any: () => factory.keywordTypeNodes.any,
10
10
  unknown: () => factory.keywordTypeNodes.unknown,
11
+ void: () => factory.keywordTypeNodes.void,
11
12
  number: () => factory.keywordTypeNodes.number,
12
13
  integer: () => factory.keywordTypeNodes.number,
13
14
  object: (nodes?: ts.TypeElement[]) => {
package/src/types.ts CHANGED
@@ -55,7 +55,7 @@ export type Options = {
55
55
  * Which type to use when the Swagger/OpenAPI file is not providing more information.
56
56
  * @default 'any'
57
57
  */
58
- unknownType?: 'any' | 'unknown'
58
+ unknownType?: 'any' | 'unknown' | 'void'
59
59
  /**
60
60
  * Choose what to use as mode for an optional value.
61
61
  * @examples 'questionToken': type?: string