@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.
- package/dist/{chunk-KFZ72XC5.cjs → chunk-2M6PDW4T.cjs} +19 -15
- package/dist/chunk-2M6PDW4T.cjs.map +1 -0
- package/dist/{chunk-OJLL42LQ.js → chunk-65CJCKDZ.js} +44 -40
- package/dist/chunk-65CJCKDZ.js.map +1 -0
- package/dist/{chunk-UE4AMVPZ.cjs → chunk-WETJULJE.cjs} +42 -39
- package/dist/chunk-WETJULJE.cjs.map +1 -0
- package/dist/{chunk-S2CJKQ76.js → chunk-Z7RYCWNL.js} +11 -7
- package/dist/chunk-Z7RYCWNL.js.map +1 -0
- package/dist/components.cjs +3 -3
- package/dist/components.d.cts +3 -2
- package/dist/components.d.ts +3 -2
- package/dist/components.js +1 -1
- package/dist/generators.cjs +4 -4
- package/dist/generators.d.cts +1 -1
- package/dist/generators.d.ts +1 -1
- package/dist/generators.js +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/{types-Dy6NIaQp.d.cts → types-9taMMp9y.d.cts} +6 -0
- package/dist/{types-Dy6NIaQp.d.ts → types-9taMMp9y.d.ts} +6 -0
- package/package.json +9 -9
- package/src/components/Type.tsx +45 -39
- package/src/generators/__snapshots__/bodyUploadFileApiAssetsPost.ts +5 -5
- package/src/generators/__snapshots__/catTypeAsConst.ts +10 -10
- package/src/generators/__snapshots__/createPet.ts +27 -28
- package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown.ts +27 -28
- package/src/generators/__snapshots__/deletePet.ts +5 -6
- package/src/generators/__snapshots__/dogTypeAsConst.ts +10 -10
- package/src/generators/__snapshots__/enumAllOf.ts +7 -7
- package/src/generators/__snapshots__/enumArray.ts +12 -16
- package/src/generators/__snapshots__/enumInObject.ts +10 -10
- package/src/generators/__snapshots__/enumItems.ts +5 -5
- package/src/generators/__snapshots__/enumNames.ts +3 -3
- package/src/generators/__snapshots__/enumNamesConst.ts +3 -3
- package/src/generators/__snapshots__/enumNamesLiteral.ts +2 -2
- package/src/generators/__snapshots__/enumNamesPascalConst.ts +5 -5
- package/src/generators/__snapshots__/enumNamesType.ts +5 -5
- package/src/generators/__snapshots__/enumNullableMember.ts +5 -5
- package/src/generators/__snapshots__/enumNullableType.ts +5 -5
- package/src/generators/__snapshots__/enumString.ts +7 -7
- package/src/generators/__snapshots__/enumVarNamesType.ts +5 -5
- package/src/generators/__snapshots__/getPets.ts +19 -20
- package/src/generators/__snapshots__/mixedValueTypeConst.ts +6 -6
- package/src/generators/__snapshots__/nullConstNull.ts +4 -5
- package/src/generators/__snapshots__/numberValueConst.ts +6 -6
- package/src/generators/__snapshots__/petMapper.ts +14 -14
- package/src/generators/__snapshots__/petQuestionToken.ts +18 -19
- package/src/generators/__snapshots__/petQuestionTokenAndUndefined.ts +18 -19
- package/src/generators/__snapshots__/petUndefined.ts +18 -19
- package/src/generators/__snapshots__/pets.ts +13 -13
- package/src/generators/__snapshots__/petsInterface.ts +14 -0
- package/src/generators/__snapshots__/petsStoreAdvancedDiscriminator.ts +32 -29
- package/src/generators/__snapshots__/petsStoreDiscriminator.ts +10 -10
- package/src/generators/__snapshots__/petsStoreRef.ts +1 -1
- package/src/generators/__snapshots__/plainDateDate.ts +1 -1
- package/src/generators/__snapshots__/plainDateString.ts +1 -1
- package/src/generators/__snapshots__/plainEmail.ts +1 -1
- package/src/generators/__snapshots__/plainFile.ts +1 -1
- package/src/generators/__snapshots__/plainTimeDate.ts +1 -1
- package/src/generators/__snapshots__/plainUuid.ts +1 -1
- package/src/generators/__snapshots__/readOnly.ts +19 -20
- package/src/generators/__snapshots__/showPetById.ts +24 -25
- package/src/generators/__snapshots__/stringValueConst.ts +6 -6
- package/src/generators/typeGenerator.tsx +4 -2
- package/src/parser/index.ts +2 -1
- package/src/plugin.ts +2 -0
- package/src/types.ts +6 -0
- package/dist/chunk-KFZ72XC5.cjs.map +0 -1
- package/dist/chunk-OJLL42LQ.js.map +0 -1
- package/dist/chunk-S2CJKQ76.js.map +0 -1
- package/dist/chunk-UE4AMVPZ.cjs.map +0 -1
package/dist/components.cjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
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
|
|
9
|
+
get: function () { return chunkWETJULJE_cjs.OasType; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "Type", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkWETJULJE_cjs.Type; }
|
|
14
14
|
});
|
|
15
15
|
//# sourceMappingURL=components.cjs.map
|
|
16
16
|
//# sourceMappingURL=components.cjs.map
|
package/dist/components.d.cts
CHANGED
|
@@ -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-
|
|
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 };
|
package/dist/components.d.ts
CHANGED
|
@@ -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-
|
|
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 };
|
package/dist/components.js
CHANGED
package/dist/generators.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
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
|
|
10
|
+
get: function () { return chunk2M6PDW4T_cjs.oasGenerator; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "typeGenerator", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk2M6PDW4T_cjs.typeGenerator; }
|
|
15
15
|
});
|
|
16
16
|
//# sourceMappingURL=generators.cjs.map
|
|
17
17
|
//# sourceMappingURL=generators.cjs.map
|
package/dist/generators.d.cts
CHANGED
package/dist/generators.d.ts
CHANGED
package/dist/generators.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { oasGenerator, typeGenerator } from './chunk-
|
|
2
|
-
import './chunk-
|
|
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
|
|
4
|
-
require('./chunk-
|
|
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
|
|
10
|
+
get: function () { return chunk2M6PDW4T_cjs.pluginTs; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "pluginTsName", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
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
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -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.
|
|
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.
|
|
62
|
-
"@kubb/fs": "3.
|
|
63
|
-
"@kubb/oas": "3.
|
|
64
|
-
"@kubb/
|
|
65
|
-
"@kubb/
|
|
66
|
-
"@kubb/
|
|
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.
|
|
74
|
-
"@kubb/config-tsup": "3.
|
|
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"
|
package/src/components/Type.tsx
CHANGED
|
@@ -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 {
|
|
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
|
|
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
|
-
|
|
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 (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
2
|
+
/**
|
|
3
|
+
* @type string, binary
|
|
4
|
+
*/
|
|
5
|
+
file: Blob
|
|
6
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export type cat = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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 =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
27
|
+
export type CreatePetsMutationResponse = createPets201
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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 =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
27
|
+
export type CreatePetsMutationResponse = createPets201
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
} as const
|
|
2
|
+
created_at: 'created_at',
|
|
3
|
+
description: 'description',
|
|
4
|
+
} as const
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
export type EnumAllOfReasonEnum2 = (typeof enumAllOfReasonEnum2)[keyof typeof enumAllOfReasonEnum2]
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
8
|
+
export type enumAllOf = {
|
|
9
|
+
reason?: EnumAllOfReasonEnum2
|
|
10
|
+
}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
export const enumArrayIdentifierEnum2 = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} as const
|
|
2
|
+
NW: 'NW',
|
|
3
|
+
NE: 'NE',
|
|
4
|
+
SW: 'SW',
|
|
5
|
+
SE: 'SE',
|
|
6
|
+
} as const
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
export type EnumArrayIdentifierEnum2 = (typeof enumArrayIdentifierEnum2)[keyof typeof enumArrayIdentifierEnum2]
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
string,
|
|
17
|
-
EnumArrayIdentifierEnum2
|
|
18
|
-
];
|
|
19
|
-
};
|
|
10
|
+
export type enumArray = {
|
|
11
|
+
/**
|
|
12
|
+
* @type array | undefined
|
|
13
|
+
*/
|
|
14
|
+
identifier?: [number, string, EnumArrayIdentifierEnum2]
|
|
15
|
+
}
|