@kubb/plugin-ts 3.2.0 → 3.3.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 (73) hide show
  1. package/dist/{chunk-KFZ72XC5.cjs → chunk-2M6PDW4T.cjs} +19 -15
  2. package/dist/chunk-2M6PDW4T.cjs.map +1 -0
  3. package/dist/{chunk-OJLL42LQ.js → chunk-65CJCKDZ.js} +44 -40
  4. package/dist/chunk-65CJCKDZ.js.map +1 -0
  5. package/dist/{chunk-UE4AMVPZ.cjs → chunk-WETJULJE.cjs} +42 -39
  6. package/dist/chunk-WETJULJE.cjs.map +1 -0
  7. package/dist/{chunk-S2CJKQ76.js → chunk-Z7RYCWNL.js} +11 -7
  8. package/dist/chunk-Z7RYCWNL.js.map +1 -0
  9. package/dist/components.cjs +3 -3
  10. package/dist/components.d.cts +3 -2
  11. package/dist/components.d.ts +3 -2
  12. package/dist/components.js +1 -1
  13. package/dist/generators.cjs +4 -4
  14. package/dist/generators.d.cts +1 -1
  15. package/dist/generators.d.ts +1 -1
  16. package/dist/generators.js +2 -2
  17. package/dist/index.cjs +4 -4
  18. package/dist/index.d.cts +1 -1
  19. package/dist/index.d.ts +1 -1
  20. package/dist/index.js +2 -2
  21. package/dist/{types-Dy6NIaQp.d.cts → types-9taMMp9y.d.cts} +6 -0
  22. package/dist/{types-Dy6NIaQp.d.ts → types-9taMMp9y.d.ts} +6 -0
  23. package/package.json +9 -9
  24. package/src/components/Type.tsx +45 -39
  25. package/src/generators/__snapshots__/bodyUploadFileApiAssetsPost.ts +5 -5
  26. package/src/generators/__snapshots__/catTypeAsConst.ts +10 -10
  27. package/src/generators/__snapshots__/createPet.ts +27 -28
  28. package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown.ts +27 -28
  29. package/src/generators/__snapshots__/deletePet.ts +5 -6
  30. package/src/generators/__snapshots__/dogTypeAsConst.ts +10 -10
  31. package/src/generators/__snapshots__/enumAllOf.ts +7 -7
  32. package/src/generators/__snapshots__/enumArray.ts +12 -16
  33. package/src/generators/__snapshots__/enumInObject.ts +10 -10
  34. package/src/generators/__snapshots__/enumItems.ts +5 -5
  35. package/src/generators/__snapshots__/enumNames.ts +3 -3
  36. package/src/generators/__snapshots__/enumNamesConst.ts +3 -3
  37. package/src/generators/__snapshots__/enumNamesLiteral.ts +2 -2
  38. package/src/generators/__snapshots__/enumNamesPascalConst.ts +5 -5
  39. package/src/generators/__snapshots__/enumNamesType.ts +5 -5
  40. package/src/generators/__snapshots__/enumNullableMember.ts +5 -5
  41. package/src/generators/__snapshots__/enumNullableType.ts +5 -5
  42. package/src/generators/__snapshots__/enumString.ts +7 -7
  43. package/src/generators/__snapshots__/enumVarNamesType.ts +5 -5
  44. package/src/generators/__snapshots__/getPets.ts +19 -20
  45. package/src/generators/__snapshots__/mixedValueTypeConst.ts +6 -6
  46. package/src/generators/__snapshots__/nullConstNull.ts +4 -5
  47. package/src/generators/__snapshots__/numberValueConst.ts +6 -6
  48. package/src/generators/__snapshots__/petMapper.ts +14 -14
  49. package/src/generators/__snapshots__/petQuestionToken.ts +18 -19
  50. package/src/generators/__snapshots__/petQuestionTokenAndUndefined.ts +18 -19
  51. package/src/generators/__snapshots__/petUndefined.ts +18 -19
  52. package/src/generators/__snapshots__/pets.ts +13 -13
  53. package/src/generators/__snapshots__/petsInterface.ts +14 -0
  54. package/src/generators/__snapshots__/petsStoreAdvancedDiscriminator.ts +32 -29
  55. package/src/generators/__snapshots__/petsStoreDiscriminator.ts +10 -10
  56. package/src/generators/__snapshots__/petsStoreRef.ts +1 -1
  57. package/src/generators/__snapshots__/plainDateDate.ts +1 -1
  58. package/src/generators/__snapshots__/plainDateString.ts +1 -1
  59. package/src/generators/__snapshots__/plainEmail.ts +1 -1
  60. package/src/generators/__snapshots__/plainFile.ts +1 -1
  61. package/src/generators/__snapshots__/plainTimeDate.ts +1 -1
  62. package/src/generators/__snapshots__/plainUuid.ts +1 -1
  63. package/src/generators/__snapshots__/readOnly.ts +19 -20
  64. package/src/generators/__snapshots__/showPetById.ts +24 -25
  65. package/src/generators/__snapshots__/stringValueConst.ts +6 -6
  66. package/src/generators/typeGenerator.tsx +4 -2
  67. package/src/parser/index.ts +2 -1
  68. package/src/plugin.ts +2 -0
  69. package/src/types.ts +6 -0
  70. package/dist/chunk-KFZ72XC5.cjs.map +0 -1
  71. package/dist/chunk-OJLL42LQ.js.map +0 -1
  72. package/dist/chunk-S2CJKQ76.js.map +0 -1
  73. package/dist/chunk-UE4AMVPZ.cjs.map +0 -1
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var chunkUE4AMVPZ_cjs = require('./chunk-UE4AMVPZ.cjs');
3
+ var chunkWETJULJE_cjs = require('./chunk-WETJULJE.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "OasType", {
8
8
  enumerable: true,
9
- get: function () { return chunkUE4AMVPZ_cjs.OasType; }
9
+ get: function () { return chunkWETJULJE_cjs.OasType; }
10
10
  });
11
11
  Object.defineProperty(exports, "Type", {
12
12
  enumerable: true,
13
- get: function () { return chunkUE4AMVPZ_cjs.Type; }
13
+ get: function () { return chunkWETJULJE_cjs.Type; }
14
14
  });
15
15
  //# sourceMappingURL=components.cjs.map
16
16
  //# sourceMappingURL=components.cjs.map
@@ -1,7 +1,7 @@
1
1
  import { OasTypes } from '@kubb/oas';
2
2
  import { ReactNode } from 'react';
3
3
  import { Schema } from '@kubb/plugin-oas';
4
- import { P as PluginTs } from './types-Dy6NIaQp.cjs';
4
+ import { P as PluginTs } from './types-9taMMp9y.cjs';
5
5
  import '@kubb/core';
6
6
  import 'typescript';
7
7
 
@@ -22,9 +22,10 @@ type Props = {
22
22
  optionalType: PluginTs['resolvedOptions']['optionalType'];
23
23
  enumType: PluginTs['resolvedOptions']['enumType'];
24
24
  mapper: PluginTs['resolvedOptions']['mapper'];
25
+ syntaxType: PluginTs['resolvedOptions']['syntaxType'];
25
26
  description?: string;
26
27
  keysToOmit?: string[];
27
28
  };
28
- declare function Type({ name, typedName, tree, keysToOmit, optionalType, enumType, mapper, description }: Props): ReactNode;
29
+ declare function Type({ name, typedName, tree, keysToOmit, optionalType, syntaxType, enumType, mapper, description }: Props): ReactNode;
29
30
 
30
31
  export { OasType, Type };
@@ -1,7 +1,7 @@
1
1
  import { OasTypes } from '@kubb/oas';
2
2
  import { ReactNode } from 'react';
3
3
  import { Schema } from '@kubb/plugin-oas';
4
- import { P as PluginTs } from './types-Dy6NIaQp.js';
4
+ import { P as PluginTs } from './types-9taMMp9y.js';
5
5
  import '@kubb/core';
6
6
  import 'typescript';
7
7
 
@@ -22,9 +22,10 @@ type Props = {
22
22
  optionalType: PluginTs['resolvedOptions']['optionalType'];
23
23
  enumType: PluginTs['resolvedOptions']['enumType'];
24
24
  mapper: PluginTs['resolvedOptions']['mapper'];
25
+ syntaxType: PluginTs['resolvedOptions']['syntaxType'];
25
26
  description?: string;
26
27
  keysToOmit?: string[];
27
28
  };
28
- declare function Type({ name, typedName, tree, keysToOmit, optionalType, enumType, mapper, description }: Props): ReactNode;
29
+ declare function Type({ name, typedName, tree, keysToOmit, optionalType, syntaxType, enumType, mapper, description }: Props): ReactNode;
29
30
 
30
31
  export { OasType, Type };
@@ -1,3 +1,3 @@
1
- export { OasType, Type } from './chunk-OJLL42LQ.js';
1
+ export { OasType, Type } from './chunk-65CJCKDZ.js';
2
2
  //# sourceMappingURL=components.js.map
3
3
  //# sourceMappingURL=components.js.map
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkKFZ72XC5_cjs = require('./chunk-KFZ72XC5.cjs');
4
- require('./chunk-UE4AMVPZ.cjs');
3
+ var chunk2M6PDW4T_cjs = require('./chunk-2M6PDW4T.cjs');
4
+ require('./chunk-WETJULJE.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "oasGenerator", {
9
9
  enumerable: true,
10
- get: function () { return chunkKFZ72XC5_cjs.oasGenerator; }
10
+ get: function () { return chunk2M6PDW4T_cjs.oasGenerator; }
11
11
  });
12
12
  Object.defineProperty(exports, "typeGenerator", {
13
13
  enumerable: true,
14
- get: function () { return chunkKFZ72XC5_cjs.typeGenerator; }
14
+ get: function () { return chunk2M6PDW4T_cjs.typeGenerator; }
15
15
  });
16
16
  //# sourceMappingURL=generators.cjs.map
17
17
  //# sourceMappingURL=generators.cjs.map
@@ -1,5 +1,5 @@
1
1
  import * as _kubb_plugin_oas from '@kubb/plugin-oas';
2
- import { P as PluginTs } from './types-Dy6NIaQp.cjs';
2
+ import { P as PluginTs } from './types-9taMMp9y.cjs';
3
3
  import '@kubb/core';
4
4
  import 'typescript';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as _kubb_plugin_oas from '@kubb/plugin-oas';
2
- import { P as PluginTs } from './types-Dy6NIaQp.js';
2
+ import { P as PluginTs } from './types-9taMMp9y.js';
3
3
  import '@kubb/core';
4
4
  import 'typescript';
5
5
 
@@ -1,4 +1,4 @@
1
- export { oasGenerator, typeGenerator } from './chunk-S2CJKQ76.js';
2
- import './chunk-OJLL42LQ.js';
1
+ export { oasGenerator, typeGenerator } from './chunk-Z7RYCWNL.js';
2
+ import './chunk-65CJCKDZ.js';
3
3
  //# sourceMappingURL=generators.js.map
4
4
  //# sourceMappingURL=generators.js.map
package/dist/index.cjs CHANGED
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkKFZ72XC5_cjs = require('./chunk-KFZ72XC5.cjs');
4
- require('./chunk-UE4AMVPZ.cjs');
3
+ var chunk2M6PDW4T_cjs = require('./chunk-2M6PDW4T.cjs');
4
+ require('./chunk-WETJULJE.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "pluginTs", {
9
9
  enumerable: true,
10
- get: function () { return chunkKFZ72XC5_cjs.pluginTs; }
10
+ get: function () { return chunk2M6PDW4T_cjs.pluginTs; }
11
11
  });
12
12
  Object.defineProperty(exports, "pluginTsName", {
13
13
  enumerable: true,
14
- get: function () { return chunkKFZ72XC5_cjs.pluginTsName; }
14
+ get: function () { return chunk2M6PDW4T_cjs.pluginTsName; }
15
15
  });
16
16
  //# sourceMappingURL=index.cjs.map
17
17
  //# sourceMappingURL=index.cjs.map
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _kubb_core from '@kubb/core';
2
- import { O as Options, P as PluginTs } from './types-Dy6NIaQp.cjs';
2
+ import { O as Options, P as PluginTs } from './types-9taMMp9y.cjs';
3
3
  import '@kubb/plugin-oas';
4
4
  import 'typescript';
5
5
 
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-Dy6NIaQp.js';
2
+ import { O as Options, P as PluginTs } from './types-9taMMp9y.js';
3
3
  import '@kubb/plugin-oas';
4
4
  import 'typescript';
5
5
 
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { pluginTs, pluginTsName } from './chunk-S2CJKQ76.js';
2
- import './chunk-OJLL42LQ.js';
1
+ export { pluginTs, pluginTsName } from './chunk-Z7RYCWNL.js';
2
+ import './chunk-65CJCKDZ.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -30,6 +30,11 @@ type Options = {
30
30
  * asPascalConst is deprecated
31
31
  */
32
32
  enumType?: 'enum' | 'asConst' | 'asPascalConst' | 'constEnum' | 'literal';
33
+ /**
34
+ * Switch between type or interface for creating TypeScript types
35
+ * @default 'type'
36
+ */
37
+ syntaxType?: 'type' | 'interface';
33
38
  /**
34
39
  * Set a suffix for the generated enums.
35
40
  * @default 'enum'
@@ -90,6 +95,7 @@ type ResolvedOptions = {
90
95
  optionalType: NonNullable<Options['optionalType']>;
91
96
  transformers: NonNullable<Options['transformers']>;
92
97
  oasType: NonNullable<Options['oasType']>;
98
+ syntaxType: NonNullable<Options['syntaxType']>;
93
99
  usedEnumNames: Record<string, number>;
94
100
  mapper: Record<string, any>;
95
101
  };
@@ -30,6 +30,11 @@ type Options = {
30
30
  * asPascalConst is deprecated
31
31
  */
32
32
  enumType?: 'enum' | 'asConst' | 'asPascalConst' | 'constEnum' | 'literal';
33
+ /**
34
+ * Switch between type or interface for creating TypeScript types
35
+ * @default 'type'
36
+ */
37
+ syntaxType?: 'type' | 'interface';
33
38
  /**
34
39
  * Set a suffix for the generated enums.
35
40
  * @default 'enum'
@@ -90,6 +95,7 @@ type ResolvedOptions = {
90
95
  optionalType: NonNullable<Options['optionalType']>;
91
96
  transformers: NonNullable<Options['transformers']>;
92
97
  oasType: NonNullable<Options['oasType']>;
98
+ syntaxType: NonNullable<Options['syntaxType']>;
93
99
  usedEnumNames: Record<string, number>;
94
100
  mapper: Record<string, any>;
95
101
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-ts",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
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.2.0",
62
- "@kubb/fs": "3.2.0",
63
- "@kubb/oas": "3.2.0",
64
- "@kubb/parser-ts": "3.2.0",
65
- "@kubb/plugin-oas": "3.2.0",
66
- "@kubb/react": "3.2.0"
61
+ "@kubb/core": "3.3.0",
62
+ "@kubb/fs": "3.3.0",
63
+ "@kubb/oas": "3.3.0",
64
+ "@kubb/plugin-oas": "3.3.0",
65
+ "@kubb/react": "3.3.0",
66
+ "@kubb/parser-ts": "3.3.0"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@types/react": "^18.3.16",
70
70
  "react": "^18.3.1",
71
71
  "tsup": "^8.3.5",
72
72
  "typescript": "^5.7.2",
73
- "@kubb/config-ts": "3.2.0",
74
- "@kubb/config-tsup": "3.2.0"
73
+ "@kubb/config-ts": "3.3.0",
74
+ "@kubb/config-tsup": "3.3.0"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@kubb/react": "^3.0.0"
@@ -3,7 +3,8 @@ import { File } from '@kubb/react'
3
3
  import transformers from '@kubb/core/transformers'
4
4
  import { print } from '@kubb/parser-ts'
5
5
  import * as factory from '@kubb/parser-ts/factory'
6
- import { type Schema, SchemaGenerator, schemaKeywords } from '@kubb/plugin-oas'
6
+ import { createTypeDeclaration } from '@kubb/parser-ts/factory'
7
+ import { type Schema, SchemaGenerator, isKeyword, schemaKeywords } from '@kubb/plugin-oas'
7
8
  import { Fragment, type ReactNode } from 'react'
8
9
  import type ts from 'typescript'
9
10
  import { parse, typeKeywordMapper } from '../parser/index.ts'
@@ -16,20 +17,19 @@ type Props = {
16
17
  optionalType: PluginTs['resolvedOptions']['optionalType']
17
18
  enumType: PluginTs['resolvedOptions']['enumType']
18
19
  mapper: PluginTs['resolvedOptions']['mapper']
20
+ syntaxType: PluginTs['resolvedOptions']['syntaxType']
19
21
  description?: string
20
22
  keysToOmit?: string[]
21
23
  }
22
24
 
23
- export function Type({ name, typedName, tree, keysToOmit, optionalType, enumType, mapper, description }: Props): ReactNode {
25
+ export function Type({ name, typedName, tree, keysToOmit, optionalType, syntaxType, enumType, mapper, description }: Props): ReactNode {
24
26
  const typeNodes: ts.Node[] = []
25
27
 
26
28
  if (!tree.length) {
27
29
  return ''
28
30
  }
29
31
 
30
- const isNullish = tree.some((item) => item.keyword === schemaKeywords.nullish)
31
- const isNullable = tree.some((item) => item.keyword === schemaKeywords.nullable)
32
- const isOptional = tree.some((item) => item.keyword === schemaKeywords.optional)
32
+ const schema = tree.find((item) => item.keyword === schemaKeywords.schema)
33
33
 
34
34
  let type =
35
35
  (tree
@@ -38,47 +38,60 @@ export function Type({ name, typedName, tree, keysToOmit, optionalType, enumType
38
38
  { parent: undefined, current: schema, siblings },
39
39
  {
40
40
  name,
41
- typeName: typedName,
41
+ typedName,
42
42
  description,
43
43
  keysToOmit,
44
44
  optionalType,
45
45
  enumType,
46
46
  mapper,
47
+ syntaxType,
47
48
  },
48
49
  ),
49
50
  )
50
51
  .filter(Boolean)
51
52
  .at(0) as ts.TypeNode) || typeKeywordMapper.undefined()
52
53
 
53
- if (isNullable) {
54
- type = factory.createUnionDeclaration({
55
- nodes: [type, factory.keywordTypeNodes.null],
56
- }) as ts.TypeNode
57
- }
54
+ if (schema && isKeyword(schema, schemaKeywords.schema) && schema.args.type !== 'object') {
55
+ const isNullish = tree.some((item) => item.keyword === schemaKeywords.nullish)
56
+ const isNullable = tree.some((item) => item.keyword === schemaKeywords.nullable)
57
+ const isOptional = tree.some((item) => item.keyword === schemaKeywords.optional)
58
58
 
59
- if (isNullish && ['undefined', 'questionTokenAndUndefined'].includes(optionalType as string)) {
60
- type = factory.createUnionDeclaration({
61
- nodes: [type, factory.keywordTypeNodes.undefined],
62
- }) as ts.TypeNode
63
- }
59
+ if (isNullable) {
60
+ type = factory.createUnionDeclaration({
61
+ nodes: [type, factory.keywordTypeNodes.null],
62
+ }) as ts.TypeNode
63
+ }
64
+
65
+ if (isNullish && ['undefined', 'questionTokenAndUndefined'].includes(optionalType as string)) {
66
+ type = factory.createUnionDeclaration({
67
+ nodes: [type, factory.keywordTypeNodes.undefined],
68
+ }) as ts.TypeNode
69
+ }
64
70
 
65
- if (isOptional && ['undefined', 'questionTokenAndUndefined'].includes(optionalType as string)) {
66
- type = factory.createUnionDeclaration({
67
- nodes: [type, factory.keywordTypeNodes.undefined],
68
- }) as ts.TypeNode
71
+ if (isOptional && ['undefined', 'questionTokenAndUndefined'].includes(optionalType as string)) {
72
+ type = factory.createUnionDeclaration({
73
+ nodes: [type, factory.keywordTypeNodes.undefined],
74
+ }) as ts.TypeNode
75
+ }
69
76
  }
70
77
 
71
- const node = factory.createTypeAliasDeclaration({
72
- modifiers: [factory.modifiers.export],
73
- name,
74
- type: keysToOmit?.length
75
- ? factory.createOmitDeclaration({
76
- keys: keysToOmit,
77
- type,
78
- nonNullable: true,
79
- })
80
- : type,
81
- })
78
+ const useTypeGeneration = syntaxType === 'type' || [factory.syntaxKind.union].includes(type.kind as typeof factory.syntaxKind.union) || !!keysToOmit?.length
79
+
80
+ typeNodes.push(
81
+ createTypeDeclaration({
82
+ name,
83
+ isExportable: true,
84
+ type: keysToOmit?.length
85
+ ? factory.createOmitDeclaration({
86
+ keys: keysToOmit,
87
+ type,
88
+ nonNullable: true,
89
+ })
90
+ : type,
91
+ syntax: useTypeGeneration ? 'type' : 'interface',
92
+ description: description ? transformers.jsStringEscape(description) : undefined,
93
+ }),
94
+ )
82
95
 
83
96
  const enumSchemas = SchemaGenerator.deepSearch(tree, schemaKeywords.enum)
84
97
 
@@ -91,7 +104,7 @@ export function Type({ name, typedName, tree, keysToOmit, optionalType, enumType
91
104
  typeName,
92
105
  enums: enumSchema.args.items
93
106
  .map((item) => (item.value === undefined ? undefined : [transformers.trimQuotes(item.name?.toString()), item.value]))
94
- .filter(Boolean) as unknown as [string, string][],
107
+ .filter(Boolean) as unknown as Array<[string, string]>,
95
108
  type: enumType,
96
109
  })
97
110
 
@@ -103,13 +116,6 @@ export function Type({ name, typedName, tree, keysToOmit, optionalType, enumType
103
116
  }
104
117
  })
105
118
 
106
- typeNodes.push(
107
- factory.appendJSDocToNode({
108
- node,
109
- comments: [description ? `@description ${transformers.jsStringEscape(description)}` : undefined].filter(Boolean),
110
- }),
111
- )
112
-
113
119
  return (
114
120
  <Fragment>
115
121
  {enums.map(({ name, nameNode, typeName, typeNode }, index) => (
@@ -1,6 +1,6 @@
1
1
  export type bodyUploadFileApiAssetsPost = {
2
- /**
3
- * @type string, binary
4
- */
5
- file: Blob;
6
- };
2
+ /**
3
+ * @type string, binary
4
+ */
5
+ file: Blob
6
+ }
@@ -1,11 +1,11 @@
1
1
  export type cat = {
2
- /**
3
- * @type string, uuid
4
- */
5
- id: string;
6
- type: "Cat";
7
- /**
8
- * @type boolean | undefined
9
- */
10
- meow?: boolean;
11
- };
2
+ /**
3
+ * @type string, uuid
4
+ */
5
+ id: string
6
+ type: 'Cat'
7
+ /**
8
+ * @type boolean | undefined
9
+ */
10
+ meow?: boolean
11
+ }
@@ -1,34 +1,33 @@
1
-
2
- /**
1
+ /**
3
2
  * @description Null response
4
- */
5
- export type CreatePets201 = (error & {
6
- /**
7
- * @type object | undefined
8
- */
9
- name?: errorCode;
10
- });
3
+ */
4
+ export type CreatePets201 = error & {
5
+ /**
6
+ * @type object | undefined
7
+ */
8
+ name?: errorCode
9
+ }
11
10
 
12
- /**
11
+ /**
13
12
  * @description unexpected error
14
- */
15
- export type CreatePetsError = error;
13
+ */
14
+ export type CreatePetsError = error
16
15
 
17
- export type CreatePetsMutationRequest = {
18
- /**
19
- * @type string
20
- */
21
- name: string;
22
- /**
23
- * @type string
24
- */
25
- tag: string;
26
- };
16
+ export type CreatePetsMutationRequest = {
17
+ /**
18
+ * @type string
19
+ */
20
+ name: string
21
+ /**
22
+ * @type string
23
+ */
24
+ tag: string
25
+ }
27
26
 
28
- export type CreatePetsMutationResponse = createPets201;
27
+ export type CreatePetsMutationResponse = createPets201
29
28
 
30
- export type createPetsMutation = {
31
- Response: createPets201;
32
- Request: createPetsMutationRequest;
33
- Errors: any;
34
- };
29
+ export type createPetsMutation = {
30
+ Response: createPets201
31
+ Request: createPetsMutationRequest
32
+ Errors: any
33
+ }
@@ -1,34 +1,33 @@
1
-
2
- /**
1
+ /**
3
2
  * @description Null response
4
- */
5
- export type CreatePets201 = (error & {
6
- /**
7
- * @type object | undefined
8
- */
9
- name?: errorCode;
10
- });
3
+ */
4
+ export type CreatePets201 = error & {
5
+ /**
6
+ * @type object | undefined
7
+ */
8
+ name?: errorCode
9
+ }
11
10
 
12
- /**
11
+ /**
13
12
  * @description unexpected error
14
- */
15
- export type CreatePetsError = error;
13
+ */
14
+ export type CreatePetsError = error
16
15
 
17
- export type CreatePetsMutationRequest = {
18
- /**
19
- * @type string
20
- */
21
- name: string;
22
- /**
23
- * @type string
24
- */
25
- tag: string;
26
- };
16
+ export type CreatePetsMutationRequest = {
17
+ /**
18
+ * @type string
19
+ */
20
+ name: string
21
+ /**
22
+ * @type string
23
+ */
24
+ tag: string
25
+ }
27
26
 
28
- export type CreatePetsMutationResponse = createPets201;
27
+ export type CreatePetsMutationResponse = createPets201
29
28
 
30
- export type createPetsMutation = {
31
- Response: createPets201;
32
- Request: createPetsMutationRequest;
33
- Errors: any;
34
- };
29
+ export type createPetsMutation = {
30
+ Response: createPets201
31
+ Request: createPetsMutationRequest
32
+ Errors: any
33
+ }
@@ -1,7 +1,6 @@
1
+ export type DeletePetsPetidMutationResponse = any
1
2
 
2
- export type DeletePetsPetidMutationResponse = any;
3
-
4
- export type deletePetsPetidMutation = {
5
- Response: any;
6
- Errors: any;
7
- };
3
+ export type deletePetsPetidMutation = {
4
+ Response: any
5
+ Errors: any
6
+ }
@@ -1,11 +1,11 @@
1
1
  export type dog = {
2
- /**
3
- * @type string, uuid
4
- */
5
- id: string;
6
- /**
7
- * @type number | undefined
8
- */
9
- bark?: number;
10
- type: "Dog";
11
- };
2
+ /**
3
+ * @type string, uuid
4
+ */
5
+ id: string
6
+ /**
7
+ * @type number | undefined
8
+ */
9
+ bark?: number
10
+ type: 'Dog'
11
+ }
@@ -1,10 +1,10 @@
1
1
  export const enumAllOfReasonEnum2 = {
2
- "created_at": "created_at",
3
- "description": "description"
4
- } as const;
2
+ created_at: 'created_at',
3
+ description: 'description',
4
+ } as const
5
5
 
6
- export type EnumAllOfReasonEnum2 = (typeof enumAllOfReasonEnum2)[keyof typeof enumAllOfReasonEnum2];
6
+ export type EnumAllOfReasonEnum2 = (typeof enumAllOfReasonEnum2)[keyof typeof enumAllOfReasonEnum2]
7
7
 
8
- export type enumAllOf = {
9
- reason?: EnumAllOfReasonEnum2;
10
- };
8
+ export type enumAllOf = {
9
+ reason?: EnumAllOfReasonEnum2
10
+ }
@@ -1,19 +1,15 @@
1
1
  export const enumArrayIdentifierEnum2 = {
2
- "NW": "NW",
3
- "NE": "NE",
4
- "SW": "SW",
5
- "SE": "SE"
6
- } as const;
2
+ NW: 'NW',
3
+ NE: 'NE',
4
+ SW: 'SW',
5
+ SE: 'SE',
6
+ } as const
7
7
 
8
- export type EnumArrayIdentifierEnum2 = (typeof enumArrayIdentifierEnum2)[keyof typeof enumArrayIdentifierEnum2];
8
+ export type EnumArrayIdentifierEnum2 = (typeof enumArrayIdentifierEnum2)[keyof typeof enumArrayIdentifierEnum2]
9
9
 
10
- export type enumArray = {
11
- /**
12
- * @type array | undefined
13
- */
14
- identifier?: [
15
- number,
16
- string,
17
- EnumArrayIdentifierEnum2
18
- ];
19
- };
10
+ export type enumArray = {
11
+ /**
12
+ * @type array | undefined
13
+ */
14
+ identifier?: [number, string, EnumArrayIdentifierEnum2]
15
+ }