@kubb/plugin-ts 4.29.1 → 4.31.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.
Files changed (70) hide show
  1. package/dist/components.d.ts +3 -4
  2. package/package.json +9 -8
  3. package/src/generators/__snapshots__/ACHDetailsResponse.ts +0 -19
  4. package/src/generators/__snapshots__/bodyTest.ts +0 -11
  5. package/src/generators/__snapshots__/bodyUploadFileApiAssetsPost.ts +0 -14
  6. package/src/generators/__snapshots__/catDogDiscriminator.ts +0 -18
  7. package/src/generators/__snapshots__/catDogDiscriminatorWithoutMapping.ts +0 -15
  8. package/src/generators/__snapshots__/catTypeAsConst.ts +0 -22
  9. package/src/generators/__snapshots__/createPet.ts +0 -47
  10. package/src/generators/__snapshots__/createPetWithEmptySchemaTypeUnknown.ts +0 -47
  11. package/src/generators/__snapshots__/createPetWithEmptySchemaTypeVoid.ts +0 -47
  12. package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown.ts +0 -47
  13. package/src/generators/__snapshots__/createPetWithUnknownTypeVoid.ts +0 -47
  14. package/src/generators/__snapshots__/deletePet.ts +0 -11
  15. package/src/generators/__snapshots__/discriminatorInheritVehicle.ts +0 -17
  16. package/src/generators/__snapshots__/discriminatorStrictVehicle.ts +0 -11
  17. package/src/generators/__snapshots__/dogTypeAsConst.ts +0 -22
  18. package/src/generators/__snapshots__/enumAllOf.ts +0 -18
  19. package/src/generators/__snapshots__/enumArray.ts +0 -8
  20. package/src/generators/__snapshots__/enumArray20.ts +0 -20
  21. package/src/generators/__snapshots__/enumInObject.ts +0 -18
  22. package/src/generators/__snapshots__/enumItems.ts +0 -13
  23. package/src/generators/__snapshots__/enumNames.ts +0 -11
  24. package/src/generators/__snapshots__/enumNamesCamelCase.ts +0 -11
  25. package/src/generators/__snapshots__/enumNamesConst.ts +0 -11
  26. package/src/generators/__snapshots__/enumNamesInlineLiteral.ts +0 -6
  27. package/src/generators/__snapshots__/enumNamesLiteral.ts +0 -8
  28. package/src/generators/__snapshots__/enumNamesPascalCase.ts +0 -11
  29. package/src/generators/__snapshots__/enumNamesPascalConst.ts +0 -13
  30. package/src/generators/__snapshots__/enumNamesScreamingSnakeCase.ts +0 -11
  31. package/src/generators/__snapshots__/enumNamesSnakeCase.ts +0 -11
  32. package/src/generators/__snapshots__/enumNamesType.ts +0 -13
  33. package/src/generators/__snapshots__/enumNullableMember.ts +0 -13
  34. package/src/generators/__snapshots__/enumNullableType.ts +0 -13
  35. package/src/generators/__snapshots__/enumString.ts +0 -15
  36. package/src/generators/__snapshots__/enumStringScreamingSnakeCase.ts +0 -15
  37. package/src/generators/__snapshots__/enumVarNamesType.ts +0 -13
  38. package/src/generators/__snapshots__/findArtifactsWithMixedQueryParams.ts +0 -49
  39. package/src/generators/__snapshots__/fooBase.ts +0 -16
  40. package/src/generators/__snapshots__/fooNumber.ts +0 -16
  41. package/src/generators/__snapshots__/getPets.ts +0 -30
  42. package/src/generators/__snapshots__/mixedValueTypeConst.ts +0 -14
  43. package/src/generators/__snapshots__/nullConstNull.ts +0 -11
  44. package/src/generators/__snapshots__/nullable.ts +0 -11
  45. package/src/generators/__snapshots__/numberValueConst.ts +0 -14
  46. package/src/generators/__snapshots__/pascalEnum.ts +0 -13
  47. package/src/generators/__snapshots__/paymentAccountDetailsResponse.ts +0 -12
  48. package/src/generators/__snapshots__/performActionTestingWithSnakeCaseParamsAndParamsCasingCamelcase.ts +0 -45
  49. package/src/generators/__snapshots__/petDict.ts +0 -16
  50. package/src/generators/__snapshots__/petIntegerTypeNumber.ts +0 -35
  51. package/src/generators/__snapshots__/petMapper.ts +0 -23
  52. package/src/generators/__snapshots__/petQuestionToken.ts +0 -35
  53. package/src/generators/__snapshots__/petQuestionTokenAndUndefined.ts +0 -37
  54. package/src/generators/__snapshots__/petUndefined.ts +0 -37
  55. package/src/generators/__snapshots__/pets.ts +0 -19
  56. package/src/generators/__snapshots__/petsInterface.ts +0 -19
  57. package/src/generators/__snapshots__/petsStoreAdvancedDiscriminator.ts +0 -33
  58. package/src/generators/__snapshots__/petsStoreDiscriminator.ts +0 -18
  59. package/src/generators/__snapshots__/petsStoreNotifcationDiscriminator.ts +0 -26
  60. package/src/generators/__snapshots__/petsStoreRef.ts +0 -6
  61. package/src/generators/__snapshots__/plainDateDate.ts +0 -9
  62. package/src/generators/__snapshots__/plainDateString.ts +0 -9
  63. package/src/generators/__snapshots__/plainEmail.ts +0 -9
  64. package/src/generators/__snapshots__/plainFile.ts +0 -9
  65. package/src/generators/__snapshots__/plainTimeDate.ts +0 -9
  66. package/src/generators/__snapshots__/plainUuid.ts +0 -9
  67. package/src/generators/__snapshots__/readOnly.ts +0 -25
  68. package/src/generators/__snapshots__/showPetById.ts +0 -36
  69. package/src/generators/__snapshots__/stringValueConst.ts +0 -14
  70. package/src/generators/__snapshots__/systemsWithExplodeForm.ts +0 -24
@@ -1,7 +1,6 @@
1
- import { t as __name } from "./chunk-DKWOrOAv.js";
2
- import { n as PluginTs } from "./types-D-A6Mfed.js";
3
- import { Schema } from "@kubb/plugin-oas";
1
+ import { n as PluginTs, r as __name } from "./types-BX_NNqoT.js";
4
2
  import { SchemaObject } from "@kubb/oas";
3
+ import { Schema } from "@kubb/plugin-oas";
5
4
  import { FabricReactNode } from "@kubb/react-fabric/types";
6
5
 
7
6
  //#region src/components/Type.d.ts
@@ -35,4 +34,4 @@ declare function Type({
35
34
  }: Props): FabricReactNode;
36
35
  //#endregion
37
36
  export { Type };
38
- //# sourceMappingURL=components.d.ts.map
37
+ //# sourceMappingURL=components.d.ts.map# sourceMappingURL=components.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-ts",
3
- "version": "4.29.1",
3
+ "version": "4.31.0",
4
4
  "description": "TypeScript code generation plugin for Kubb, transforming OpenAPI schemas into TypeScript interfaces, types, and utility functions.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -56,7 +56,8 @@
56
56
  "src",
57
57
  "dist",
58
58
  "!/**/**.test.**",
59
- "!/**/__tests__/**"
59
+ "!/**/__tests__/**",
60
+ "!/**/__snapshots__/**"
60
61
  ],
61
62
  "size-limit": [
62
63
  {
@@ -66,16 +67,16 @@
66
67
  }
67
68
  ],
68
69
  "dependencies": {
69
- "@kubb/fabric-core": "0.13.1",
70
- "@kubb/react-fabric": "0.13.1",
70
+ "@kubb/fabric-core": "0.13.2",
71
+ "@kubb/react-fabric": "0.13.2",
71
72
  "remeda": "^2.33.6",
72
73
  "typescript": "5.9.3",
73
- "@kubb/core": "4.29.1",
74
- "@kubb/oas": "4.29.1",
75
- "@kubb/plugin-oas": "4.29.1"
74
+ "@kubb/core": "4.31.0",
75
+ "@kubb/oas": "4.31.0",
76
+ "@kubb/plugin-oas": "4.31.0"
76
77
  },
77
78
  "peerDependencies": {
78
- "@kubb/react-fabric": "0.13.0",
79
+ "@kubb/react-fabric": "0.13.2",
79
80
  "typescript": ">=5.9.0"
80
81
  },
81
82
  "engines": {
@@ -1,19 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export type ACHDetailsResponse = {
7
- /**
8
- * @type string
9
- */
10
- type: paymentDetailsTypeResponse
11
- /**
12
- * @type string
13
- */
14
- routing_number: string
15
- /**
16
- * @type string
17
- */
18
- account_number: string
19
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export type bodyTest = {
7
- /**
8
- * @type string
9
- */
10
- file: Blob
11
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- /**
7
- * Body_upload_file_api_assets_post
8
- */
9
- export type bodyUploadFileApiAssetsPost = {
10
- /**
11
- * @type string, binary
12
- */
13
- file: Blob
14
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- /**
7
- * CatDog
8
- */
9
- export type catDog =
10
- | (cat & {
11
- type: 'Cat'
12
- })
13
- | (dog & {
14
- type: 'Dog'
15
- })
16
- | (dog & {
17
- type: 'Bulldog'
18
- })
@@ -1,15 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- /**
7
- * CatDogWithoutMapping
8
- */
9
- export type catDogWithoutMapping =
10
- | (cat & {
11
- type: 'Cat'
12
- })
13
- | (dog & {
14
- type: 'Dog'
15
- })
@@ -1,22 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- /**
7
- * Cat
8
- */
9
- export type cat = {
10
- /**
11
- * @type string, uuid
12
- */
13
- id: string
14
- /**
15
- * @type string
16
- */
17
- type: 'Cat'
18
- /**
19
- * @type boolean | undefined
20
- */
21
- meow?: boolean
22
- }
@@ -1,47 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- /**
7
- * @description Null response
8
- */
9
- export type CreatePets201 = error & {
10
- /**
11
- * @type object | undefined
12
- */
13
- name?: errorCode
14
- /**
15
- * @type string
16
- */
17
- message: string
18
- }
19
-
20
- /**
21
- * @description Accepted response
22
- */
23
- export type CreatePets202 = unknown
24
-
25
- /**
26
- * @description unexpected error
27
- */
28
- export type CreatePetsError = error
29
-
30
- export type CreatePetsMutationRequest = {
31
- /**
32
- * @type string
33
- */
34
- name: string
35
- /**
36
- * @type string
37
- */
38
- tag: string
39
- }
40
-
41
- export type CreatePetsMutationResponse = createPets201 | createPets202
42
-
43
- export type CreatePetsMutation = {
44
- Response: createPets201 | createPets202
45
- Request: createPetsMutationRequest
46
- Errors: any
47
- }
@@ -1,47 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- /**
7
- * @description Null response
8
- */
9
- export type CreatePets201 = error & {
10
- /**
11
- * @type object | undefined
12
- */
13
- name?: errorCode
14
- /**
15
- * @type string
16
- */
17
- message: string
18
- }
19
-
20
- /**
21
- * @description Accepted response
22
- */
23
- export type CreatePets202 = unknown
24
-
25
- /**
26
- * @description unexpected error
27
- */
28
- export type CreatePetsError = error
29
-
30
- export type CreatePetsMutationRequest = {
31
- /**
32
- * @type string
33
- */
34
- name: string
35
- /**
36
- * @type string
37
- */
38
- tag: string
39
- }
40
-
41
- export type CreatePetsMutationResponse = createPets201 | createPets202
42
-
43
- export type CreatePetsMutation = {
44
- Response: createPets201 | createPets202
45
- Request: createPetsMutationRequest
46
- Errors: any
47
- }
@@ -1,47 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- /**
7
- * @description Null response
8
- */
9
- export type CreatePets201 = error & {
10
- /**
11
- * @type object | undefined
12
- */
13
- name?: errorCode
14
- /**
15
- * @type string
16
- */
17
- message: string
18
- }
19
-
20
- /**
21
- * @description Accepted response
22
- */
23
- export type CreatePets202 = void
24
-
25
- /**
26
- * @description unexpected error
27
- */
28
- export type CreatePetsError = error
29
-
30
- export type CreatePetsMutationRequest = {
31
- /**
32
- * @type string
33
- */
34
- name: string
35
- /**
36
- * @type string
37
- */
38
- tag: string
39
- }
40
-
41
- export type CreatePetsMutationResponse = createPets201 | createPets202
42
-
43
- export type CreatePetsMutation = {
44
- Response: createPets201 | createPets202
45
- Request: createPetsMutationRequest
46
- Errors: any
47
- }
@@ -1,47 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- /**
7
- * @description Null response
8
- */
9
- export type CreatePets201 = error & {
10
- /**
11
- * @type object | undefined
12
- */
13
- name?: errorCode
14
- /**
15
- * @type string
16
- */
17
- message: string
18
- }
19
-
20
- /**
21
- * @description Accepted response
22
- */
23
- export type CreatePets202 = unknown
24
-
25
- /**
26
- * @description unexpected error
27
- */
28
- export type CreatePetsError = error
29
-
30
- export type CreatePetsMutationRequest = {
31
- /**
32
- * @type string
33
- */
34
- name: string
35
- /**
36
- * @type string
37
- */
38
- tag: string
39
- }
40
-
41
- export type CreatePetsMutationResponse = createPets201 | createPets202
42
-
43
- export type CreatePetsMutation = {
44
- Response: createPets201 | createPets202
45
- Request: createPetsMutationRequest
46
- Errors: any
47
- }
@@ -1,47 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- /**
7
- * @description Null response
8
- */
9
- export type CreatePets201 = error & {
10
- /**
11
- * @type object | undefined
12
- */
13
- name?: errorCode
14
- /**
15
- * @type string
16
- */
17
- message: string
18
- }
19
-
20
- /**
21
- * @description Accepted response
22
- */
23
- export type CreatePets202 = unknown
24
-
25
- /**
26
- * @description unexpected error
27
- */
28
- export type CreatePetsError = error
29
-
30
- export type CreatePetsMutationRequest = {
31
- /**
32
- * @type string
33
- */
34
- name: string
35
- /**
36
- * @type string
37
- */
38
- tag: string
39
- }
40
-
41
- export type CreatePetsMutationResponse = createPets201 | createPets202
42
-
43
- export type CreatePetsMutation = {
44
- Response: createPets201 | createPets202
45
- Request: createPetsMutationRequest
46
- Errors: any
47
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export type DeletePetsPetidMutationResponse = any
7
-
8
- export type DeletePetsPetidMutation = {
9
- Response: any
10
- Errors: any
11
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export const vehicleTypeEnum = {
7
- car: 'car',
8
- } as const
9
-
10
- export type VehicleTypeEnumKey = (typeof vehicleTypeEnum)[keyof typeof vehicleTypeEnum]
11
-
12
- export type vehicle = car & {
13
- /**
14
- * @type string
15
- */
16
- type: VehicleTypeEnumKey
17
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export type vehicle = car & {
7
- /**
8
- * @type string
9
- */
10
- type: 'car'
11
- }
@@ -1,22 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- /**
7
- * Dog
8
- */
9
- export type dog = {
10
- /**
11
- * @type string, uuid
12
- */
13
- id: string
14
- /**
15
- * @type string
16
- */
17
- type: 'Dog'
18
- /**
19
- * @type number | undefined
20
- */
21
- bark?: number
22
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export const enumAllOfReasonEnum = {
7
- created_at: 'created_at',
8
- description: 'description',
9
- } as const
10
-
11
- export type EnumAllOfReasonEnumKey = (typeof enumAllOfReasonEnum)[keyof typeof enumAllOfReasonEnum]
12
-
13
- export type enumAllOf = {
14
- /**
15
- * @type string | undefined
16
- */
17
- reason?: EnumAllOfReasonEnumKey
18
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export type EnumArrayEnum = 'NW' | 'NE' | 'SW' | 'SE'
7
-
8
- export type enumArray = EnumArrayEnum[]
@@ -1,20 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export const enumArrayIdentifierEnum = {
7
- NW: 'NW',
8
- NE: 'NE',
9
- SW: 'SW',
10
- SE: 'SE',
11
- } as const
12
-
13
- export type EnumArrayIdentifierEnumKey = (typeof enumArrayIdentifierEnum)[keyof typeof enumArrayIdentifierEnum]
14
-
15
- export type enumArray = {
16
- /**
17
- * @type array | undefined
18
- */
19
- identifier?: [number, string, EnumArrayIdentifierEnumKey, ...unknown[]]
20
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export const enumInObjectReasonEnum = {
7
- created_at: 'created_at',
8
- description: 'description',
9
- } as const
10
-
11
- export type EnumInObjectReasonEnumKey = (typeof enumInObjectReasonEnum)[keyof typeof enumInObjectReasonEnum]
12
-
13
- export type enumInObject = {
14
- /**
15
- * @type string | undefined
16
- */
17
- reason?: EnumInObjectReasonEnumKey
18
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export const enumItemsEnum = {
7
- created_at: 'created_at',
8
- description: 'description',
9
- } as const
10
-
11
- export type EnumItemsEnumKey = (typeof enumItemsEnum)[keyof typeof enumItemsEnum]
12
-
13
- export type enumItems = EnumItemsEnumKey[]
@@ -1,11 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export enum EnumNamesTypeEnum {
7
- Pending = 0,
8
- Received = 1,
9
- }
10
-
11
- export type enumNamesType = EnumNamesTypeEnum
@@ -1,11 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export enum EnumNamesTypeEnum {
7
- pending = 0,
8
- received = 1,
9
- }
10
-
11
- export type enumNamesType = EnumNamesTypeEnum
@@ -1,11 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export const enum EnumNamesTypeEnum {
7
- Pending = 0,
8
- Received = 1,
9
- }
10
-
11
- export type enumNamesType = EnumNamesTypeEnum
@@ -1,6 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export type enumNamesType = 0 | 1
@@ -1,8 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export type EnumNamesTypeEnum = 0 | 1
7
-
8
- export type enumNamesType = EnumNamesTypeEnum
@@ -1,11 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export enum EnumNamesTypeEnum {
7
- Pending = 0,
8
- Received = 1,
9
- }
10
-
11
- export type enumNamesType = EnumNamesTypeEnum
@@ -1,13 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export const EnumNamesType = {
7
- Pending: 0,
8
- Received: 1,
9
- } as const
10
-
11
- export type EnumNamesTypeEnumKey = (typeof EnumNamesType)[keyof typeof EnumNamesType]
12
-
13
- export type enumNamesType = EnumNamesTypeEnumKey
@@ -1,11 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export enum EnumNamesTypeEnum {
7
- PENDING = 0,
8
- RECEIVED = 1,
9
- }
10
-
11
- export type enumNamesType = EnumNamesTypeEnum
@@ -1,11 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export enum EnumNamesTypeEnum {
7
- pending = 0,
8
- received = 1,
9
- }
10
-
11
- export type enumNamesType = EnumNamesTypeEnum
@@ -1,13 +0,0 @@
1
- /**
2
- * Generated by Kubb (https://kubb.dev/).
3
- * Do not edit manually.
4
- */
5
-
6
- export const enumNamesType = {
7
- Pending: 0,
8
- Received: 1,
9
- } as const
10
-
11
- export type EnumNamesTypeEnumKey = (typeof enumNamesType)[keyof typeof enumNamesType]
12
-
13
- export type enumNamesType = EnumNamesTypeEnumKey