@kubb/plugin-ts 3.0.0-alpha.3 → 3.0.0-alpha.30
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/README.md +13 -4
- package/dist/chunk-3KENUSSE.cjs +333 -0
- package/dist/chunk-3KENUSSE.cjs.map +1 -0
- package/dist/chunk-DHXAYDWQ.js +2521 -0
- package/dist/chunk-DHXAYDWQ.js.map +1 -0
- package/dist/chunk-GH3OAKXH.cjs +2548 -0
- package/dist/chunk-GH3OAKXH.cjs.map +1 -0
- package/dist/chunk-LVVDXT74.js +304 -0
- package/dist/chunk-LVVDXT74.js.map +1 -0
- package/dist/components.cjs +11 -6
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.cts +14 -44
- package/dist/components.d.ts +14 -44
- package/dist/components.js +2 -10
- package/dist/components.js.map +1 -1
- package/dist/generators.cjs +17 -0
- package/dist/generators.cjs.map +1 -0
- package/dist/generators.d.cts +10 -0
- package/dist/generators.d.ts +10 -0
- package/dist/generators.js +4 -0
- package/dist/generators.js.map +1 -0
- package/dist/index.cjs +12 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -122
- package/dist/index.d.ts +4 -122
- package/dist/index.js +3 -8
- package/dist/index.js.map +1 -1
- package/dist/types-BOx2a6KB.d.cts +110 -0
- package/dist/types-BOx2a6KB.d.ts +110 -0
- package/package.json +21 -15
- package/src/components/OasType.tsx +11 -58
- package/src/components/Type.tsx +133 -0
- package/src/components/index.ts +1 -2
- package/src/generators/__snapshots__/bodyUploadFileApiAssetsPost.ts +6 -0
- package/src/generators/__snapshots__/catTypeAsConst.ts +11 -0
- package/src/generators/__snapshots__/createPet.ts +41 -0
- package/src/generators/__snapshots__/createPetWithUnknownTypeUnknown.ts +41 -0
- package/src/generators/__snapshots__/deletePet.ts +5 -0
- package/src/generators/__snapshots__/dogTypeAsConst.ts +11 -0
- package/src/generators/__snapshots__/enumAllOf.ts +10 -0
- package/src/generators/__snapshots__/enumArray.ts +19 -0
- package/src/generators/__snapshots__/enumInObject.ts +13 -0
- package/src/generators/__snapshots__/enumItems.ts +8 -0
- package/src/generators/__snapshots__/enumNames.ts +6 -0
- package/src/generators/__snapshots__/enumNamesConst.ts +6 -0
- package/src/generators/__snapshots__/enumNamesLiteral.ts +3 -0
- package/src/generators/__snapshots__/enumNamesPascalConst.ts +8 -0
- package/src/generators/__snapshots__/enumNamesType.ts +8 -0
- package/src/generators/__snapshots__/enumNullableMember.ts +8 -0
- package/src/generators/__snapshots__/enumNullableType.ts +8 -0
- package/src/generators/__snapshots__/enumString.ts +10 -0
- package/src/generators/__snapshots__/enumVarNamesType.ts +8 -0
- package/src/generators/__snapshots__/getPets.ts +27 -0
- package/src/generators/__snapshots__/mixedValueTypeConst.ts +9 -0
- package/src/generators/__snapshots__/nullConstNull.ts +7 -0
- package/src/generators/__snapshots__/numberValueConst.ts +9 -0
- package/src/generators/__snapshots__/petMapper.ts +15 -0
- package/src/generators/__snapshots__/petQuestionToken.ts +19 -0
- package/src/generators/__snapshots__/petQuestionTokenAndUndefined.ts +19 -0
- package/src/generators/__snapshots__/petUndefined.ts +19 -0
- package/src/generators/__snapshots__/pets.ts +14 -0
- package/src/generators/__snapshots__/petsStoreAdvancedDiscriminator.ts +31 -0
- package/src/generators/__snapshots__/petsStoreDiscriminator.ts +13 -0
- package/src/generators/__snapshots__/petsStoreRef.ts +1 -0
- package/src/generators/__snapshots__/plainDateDate.ts +1 -0
- package/src/generators/__snapshots__/plainDateString.ts +1 -0
- package/src/generators/__snapshots__/plainEmail.ts +1 -0
- package/src/generators/__snapshots__/plainFile.ts +1 -0
- package/src/generators/__snapshots__/plainTimeDate.ts +1 -0
- package/src/generators/__snapshots__/plainUuid.ts +1 -0
- package/src/generators/__snapshots__/readOnly.ts +20 -0
- package/src/generators/__snapshots__/showPetById.ts +32 -0
- package/src/generators/__snapshots__/stringValueConst.ts +9 -0
- package/src/generators/index.ts +2 -0
- package/src/generators/oasGenerator.tsx +29 -0
- package/src/generators/typeGenerator.tsx +200 -0
- package/src/parser/index.ts +13 -3
- package/src/plugin.ts +15 -17
- package/src/types.ts +14 -36
- package/dist/chunk-JF3PKBEA.cjs +0 -608
- package/dist/chunk-JF3PKBEA.cjs.map +0 -1
- package/dist/chunk-PU22CLWV.js +0 -608
- package/dist/chunk-PU22CLWV.js.map +0 -1
- package/dist/oas.cjs +0 -1
- package/dist/oas.cjs.map +0 -1
- package/dist/oas.d.cts +0 -1
- package/dist/oas.d.ts +0 -1
- package/dist/oas.js +0 -1
- package/dist/oas.js.map +0 -1
- package/src/OperationGenerator.tsx +0 -49
- package/src/SchemaGenerator.tsx +0 -31
- package/src/components/OperationSchema.tsx +0 -161
- package/src/components/Schema.tsx +0 -135
- package/src/components/__snapshots__/Schema/pets.ts +0 -23
- package/src/components/__snapshots__/Schema/showPetById.ts +0 -28
- package/src/oas/index.ts +0 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { File } from '@kubb/react'
|
|
2
|
+
|
|
3
|
+
import transformers from '@kubb/core/transformers'
|
|
4
|
+
import { print } from '@kubb/parser-ts'
|
|
5
|
+
import * as factory from '@kubb/parser-ts/factory'
|
|
6
|
+
import { type Schema, SchemaGenerator, schemaKeywords } from '@kubb/plugin-oas'
|
|
7
|
+
import { Fragment, type ReactNode } from 'react'
|
|
8
|
+
import type ts from 'typescript'
|
|
9
|
+
import { parse, typeKeywordMapper } from '../parser/index.ts'
|
|
10
|
+
import type { PluginTs } from '../types.ts'
|
|
11
|
+
|
|
12
|
+
type Props = {
|
|
13
|
+
name: string
|
|
14
|
+
typedName: string
|
|
15
|
+
tree: Array<Schema>
|
|
16
|
+
optionalType: PluginTs['resolvedOptions']['optionalType']
|
|
17
|
+
enumType: PluginTs['resolvedOptions']['enumType']
|
|
18
|
+
mapper: PluginTs['resolvedOptions']['mapper']
|
|
19
|
+
description?: string
|
|
20
|
+
keysToOmit?: string[]
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function Type({ name, typedName, tree, keysToOmit, optionalType, enumType, mapper, description }: Props): ReactNode {
|
|
24
|
+
const typeNodes: ts.Node[] = []
|
|
25
|
+
|
|
26
|
+
if (!tree.length) {
|
|
27
|
+
return ''
|
|
28
|
+
}
|
|
29
|
+
|
|
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)
|
|
33
|
+
|
|
34
|
+
let type =
|
|
35
|
+
(tree
|
|
36
|
+
.map((schema) =>
|
|
37
|
+
parse(undefined, schema, {
|
|
38
|
+
name,
|
|
39
|
+
typeName: typedName,
|
|
40
|
+
description,
|
|
41
|
+
keysToOmit,
|
|
42
|
+
optionalType,
|
|
43
|
+
enumType,
|
|
44
|
+
mapper,
|
|
45
|
+
}),
|
|
46
|
+
)
|
|
47
|
+
.filter(Boolean)
|
|
48
|
+
.at(0) as ts.TypeNode) || typeKeywordMapper.undefined()
|
|
49
|
+
|
|
50
|
+
if (isNullable) {
|
|
51
|
+
type = factory.createUnionDeclaration({
|
|
52
|
+
nodes: [type, factory.keywordTypeNodes.null],
|
|
53
|
+
}) as ts.TypeNode
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (isNullish && ['undefined', 'questionTokenAndUndefined'].includes(optionalType as string)) {
|
|
57
|
+
type = factory.createUnionDeclaration({
|
|
58
|
+
nodes: [type, factory.keywordTypeNodes.undefined],
|
|
59
|
+
}) as ts.TypeNode
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (isOptional && ['undefined', 'questionTokenAndUndefined'].includes(optionalType as string)) {
|
|
63
|
+
type = factory.createUnionDeclaration({
|
|
64
|
+
nodes: [type, factory.keywordTypeNodes.undefined],
|
|
65
|
+
}) as ts.TypeNode
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const node = factory.createTypeAliasDeclaration({
|
|
69
|
+
modifiers: [factory.modifiers.export],
|
|
70
|
+
name,
|
|
71
|
+
type: keysToOmit?.length
|
|
72
|
+
? factory.createOmitDeclaration({
|
|
73
|
+
keys: keysToOmit,
|
|
74
|
+
type,
|
|
75
|
+
nonNullable: true,
|
|
76
|
+
})
|
|
77
|
+
: type,
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
const enumSchemas = SchemaGenerator.deepSearch(tree, schemaKeywords.enum)
|
|
81
|
+
|
|
82
|
+
const enums = [...new Set(enumSchemas)].map((enumSchema) => {
|
|
83
|
+
const name = enumType === 'asPascalConst' ? transformers.pascalCase(enumSchema.args.name) : transformers.camelCase(enumSchema.args.name)
|
|
84
|
+
const typeName = enumSchema.args.typeName
|
|
85
|
+
|
|
86
|
+
const [nameNode, typeNode] = factory.createEnumDeclaration({
|
|
87
|
+
name,
|
|
88
|
+
typeName,
|
|
89
|
+
enums: enumSchema.args.items
|
|
90
|
+
.map((item) => (item.value === undefined ? undefined : [transformers.trimQuotes(item.name?.toString()), item.value]))
|
|
91
|
+
.filter(Boolean) as unknown as [string, string][],
|
|
92
|
+
type: enumType,
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
nameNode,
|
|
97
|
+
typeNode,
|
|
98
|
+
name,
|
|
99
|
+
typeName,
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
typeNodes.push(
|
|
104
|
+
factory.appendJSDocToNode({
|
|
105
|
+
node,
|
|
106
|
+
comments: [description ? `@description ${transformers.jsStringEscape(description)}` : undefined].filter(Boolean),
|
|
107
|
+
}),
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<Fragment>
|
|
112
|
+
{enums.map(({ name, nameNode, typeName, typeNode }, index) => (
|
|
113
|
+
<Fragment key={[name, nameNode].join('-')}>
|
|
114
|
+
{nameNode && (
|
|
115
|
+
<File.Source name={name} isExportable isIndexable>
|
|
116
|
+
{print([nameNode])}
|
|
117
|
+
</File.Source>
|
|
118
|
+
)}
|
|
119
|
+
{
|
|
120
|
+
<File.Source name={typeName} isIndexable isExportable={['enum', 'asConst', 'constEnum', 'literal', undefined].includes(enumType)} isTypeOnly>
|
|
121
|
+
{print([typeNode])}
|
|
122
|
+
</File.Source>
|
|
123
|
+
}
|
|
124
|
+
</Fragment>
|
|
125
|
+
))}
|
|
126
|
+
{enums.every((item) => item.typeName !== name) && (
|
|
127
|
+
<File.Source name={typedName} isTypeOnly isExportable isIndexable>
|
|
128
|
+
{print(typeNodes)}
|
|
129
|
+
</File.Source>
|
|
130
|
+
)}
|
|
131
|
+
</Fragment>
|
|
132
|
+
)
|
|
133
|
+
}
|
package/src/components/index.ts
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @description Null response
|
|
4
|
+
*/
|
|
5
|
+
export type CreatePets201 = (error & {
|
|
6
|
+
/**
|
|
7
|
+
* @type object | undefined
|
|
8
|
+
*/
|
|
9
|
+
name?: errorCode;
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @description unexpected error
|
|
14
|
+
*/
|
|
15
|
+
export type CreatePetsError = error;
|
|
16
|
+
|
|
17
|
+
export type CreatePetsMutationRequest = {
|
|
18
|
+
/**
|
|
19
|
+
* @type string
|
|
20
|
+
*/
|
|
21
|
+
name: string;
|
|
22
|
+
/**
|
|
23
|
+
* @type string
|
|
24
|
+
*/
|
|
25
|
+
tag: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @description Null response
|
|
30
|
+
*/
|
|
31
|
+
export type CreatePetsMutationResponse = (error & {
|
|
32
|
+
/**
|
|
33
|
+
* @type object | undefined
|
|
34
|
+
*/
|
|
35
|
+
name?: errorCode;
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export type createPetsMutation = {
|
|
39
|
+
Response: createPetsMutationResponse;
|
|
40
|
+
Request: createPetsMutationRequest;
|
|
41
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @description Null response
|
|
4
|
+
*/
|
|
5
|
+
export type CreatePets201 = (error & {
|
|
6
|
+
/**
|
|
7
|
+
* @type object | undefined
|
|
8
|
+
*/
|
|
9
|
+
name?: errorCode;
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @description unexpected error
|
|
14
|
+
*/
|
|
15
|
+
export type CreatePetsError = error;
|
|
16
|
+
|
|
17
|
+
export type CreatePetsMutationRequest = {
|
|
18
|
+
/**
|
|
19
|
+
* @type string
|
|
20
|
+
*/
|
|
21
|
+
name: string;
|
|
22
|
+
/**
|
|
23
|
+
* @type string
|
|
24
|
+
*/
|
|
25
|
+
tag: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @description Null response
|
|
30
|
+
*/
|
|
31
|
+
export type CreatePetsMutationResponse = (error & {
|
|
32
|
+
/**
|
|
33
|
+
* @type object | undefined
|
|
34
|
+
*/
|
|
35
|
+
name?: errorCode;
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export type createPetsMutation = {
|
|
39
|
+
Response: createPetsMutationResponse;
|
|
40
|
+
Request: createPetsMutationRequest;
|
|
41
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const enumAllOfReasonEnum2 = {
|
|
2
|
+
"created_at": "created_at",
|
|
3
|
+
"description": "description"
|
|
4
|
+
} as const;
|
|
5
|
+
|
|
6
|
+
export type EnumAllOfReasonEnum2 = (typeof enumAllOfReasonEnum2)[keyof typeof enumAllOfReasonEnum2];
|
|
7
|
+
|
|
8
|
+
export type enumAllOf = {
|
|
9
|
+
reason?: EnumAllOfReasonEnum2;
|
|
10
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const enumArrayIdentifierEnum2 = {
|
|
2
|
+
"NW": "NW",
|
|
3
|
+
"NE": "NE",
|
|
4
|
+
"SW": "SW",
|
|
5
|
+
"SE": "SE"
|
|
6
|
+
} as const;
|
|
7
|
+
|
|
8
|
+
export type EnumArrayIdentifierEnum2 = (typeof enumArrayIdentifierEnum2)[keyof typeof enumArrayIdentifierEnum2];
|
|
9
|
+
|
|
10
|
+
export type enumArray = {
|
|
11
|
+
/**
|
|
12
|
+
* @type array | undefined
|
|
13
|
+
*/
|
|
14
|
+
identifier?: [
|
|
15
|
+
number,
|
|
16
|
+
string,
|
|
17
|
+
EnumArrayIdentifierEnum2
|
|
18
|
+
];
|
|
19
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const enumInObjectReasonEnum2 = {
|
|
2
|
+
"created_at": "created_at",
|
|
3
|
+
"description": "description"
|
|
4
|
+
} as const;
|
|
5
|
+
|
|
6
|
+
export type EnumInObjectReasonEnum2 = (typeof enumInObjectReasonEnum2)[keyof typeof enumInObjectReasonEnum2];
|
|
7
|
+
|
|
8
|
+
export type enumInObject = {
|
|
9
|
+
/**
|
|
10
|
+
* @type string | undefined
|
|
11
|
+
*/
|
|
12
|
+
reason?: EnumInObjectReasonEnum2;
|
|
13
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const enumNullableMemberEnum2 = {
|
|
2
|
+
"first": "first",
|
|
3
|
+
"second": "second"
|
|
4
|
+
} as const;
|
|
5
|
+
|
|
6
|
+
export type EnumNullableMemberEnum2 = (typeof enumNullableMemberEnum2)[keyof typeof enumNullableMemberEnum2];
|
|
7
|
+
|
|
8
|
+
export type enumNullableMember = EnumNullableMemberEnum2 | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const enumNullableTypeEnum2 = {
|
|
2
|
+
"first": "first",
|
|
3
|
+
"second": "second"
|
|
4
|
+
} as const;
|
|
5
|
+
|
|
6
|
+
export type EnumNullableTypeEnum2 = (typeof enumNullableTypeEnum2)[keyof typeof enumNullableTypeEnum2];
|
|
7
|
+
|
|
8
|
+
export type enumNullableType = EnumNullableTypeEnum2 | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const enumStringEnum2 = {
|
|
2
|
+
"created_at": "created_at",
|
|
3
|
+
"description": "description",
|
|
4
|
+
"FILE.UPLOADED": "FILE.UPLOADED",
|
|
5
|
+
"FILE.DOWNLOADED": "FILE.DOWNLOADED"
|
|
6
|
+
} as const;
|
|
7
|
+
|
|
8
|
+
export type EnumStringEnum2 = (typeof enumStringEnum2)[keyof typeof enumStringEnum2];
|
|
9
|
+
|
|
10
|
+
export type enumString = EnumStringEnum2;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type ListPetsQueryParams = {
|
|
2
|
+
/**
|
|
3
|
+
* @description How many items to return at one time (max 100)
|
|
4
|
+
* @type string | undefined
|
|
5
|
+
*/
|
|
6
|
+
limit?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @description A paged array of pets
|
|
11
|
+
*/
|
|
12
|
+
export type ListPets200 = pets;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @description unexpected error
|
|
16
|
+
*/
|
|
17
|
+
export type ListPetsError = error;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description A paged array of pets
|
|
21
|
+
*/
|
|
22
|
+
export type ListPetsQueryResponse = pets;
|
|
23
|
+
|
|
24
|
+
export type listPetsQuery = {
|
|
25
|
+
Response: listPetsQueryResponse;
|
|
26
|
+
QueryParams: listPetsQueryParams;
|
|
27
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @description The value of this keyword MAY be null.\nUse of this keyword is functionally equivalent to an \"enum\" (Section 6.1.2) with a single value.\nAn instance validates successfully against this keyword if its value is equal to the value of the keyword.\n
|
|
4
|
+
*/
|
|
5
|
+
export type nullConst = {
|
|
6
|
+
withoutValue?: null;
|
|
7
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
export type pet = {
|
|
3
|
+
/**
|
|
4
|
+
* @type integer, int64
|
|
5
|
+
*/
|
|
6
|
+
id: number;
|
|
7
|
+
/**
|
|
8
|
+
* @type string
|
|
9
|
+
*/
|
|
10
|
+
name: string;
|
|
11
|
+
/**
|
|
12
|
+
* @type string | undefined
|
|
13
|
+
*/
|
|
14
|
+
tag?: string;
|
|
15
|
+
/**
|
|
16
|
+
* @type object | undefined
|
|
17
|
+
*/
|
|
18
|
+
category?: category;
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
export type pet = {
|
|
3
|
+
/**
|
|
4
|
+
* @type integer, int64
|
|
5
|
+
*/
|
|
6
|
+
id: number;
|
|
7
|
+
/**
|
|
8
|
+
* @type string
|
|
9
|
+
*/
|
|
10
|
+
name: string;
|
|
11
|
+
/**
|
|
12
|
+
* @type string | undefined
|
|
13
|
+
*/
|
|
14
|
+
tag?: string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* @type object | undefined
|
|
17
|
+
*/
|
|
18
|
+
category?: category | undefined;
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
export type pet = {
|
|
3
|
+
/**
|
|
4
|
+
* @type integer, int64
|
|
5
|
+
*/
|
|
6
|
+
id: number;
|
|
7
|
+
/**
|
|
8
|
+
* @type string
|
|
9
|
+
*/
|
|
10
|
+
name: string;
|
|
11
|
+
/**
|
|
12
|
+
* @type string | undefined
|
|
13
|
+
*/
|
|
14
|
+
tag: string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* @type object | undefined
|
|
17
|
+
*/
|
|
18
|
+
category: category | undefined;
|
|
19
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
export const advancedTypeEnum2 = {
|
|
3
|
+
"enum": "enum",
|
|
4
|
+
"range": "range",
|
|
5
|
+
"regex": "regex",
|
|
6
|
+
"slider": "slider"
|
|
7
|
+
} as const;
|
|
8
|
+
|
|
9
|
+
export type AdvancedTypeEnum2 = (typeof advancedTypeEnum2)[keyof typeof advancedTypeEnum2];
|
|
10
|
+
|
|
11
|
+
export type advanced = ((enumerationValueSpecificationDto & {
|
|
12
|
+
/**
|
|
13
|
+
* @type string
|
|
14
|
+
*/
|
|
15
|
+
readonly type: AdvancedTypeEnum2;
|
|
16
|
+
}) | (rangeValueSpecificationDto & {
|
|
17
|
+
/**
|
|
18
|
+
* @type string
|
|
19
|
+
*/
|
|
20
|
+
readonly type: AdvancedTypeEnum2;
|
|
21
|
+
}) | (regexValueSpecificationDto & {
|
|
22
|
+
/**
|
|
23
|
+
* @type string
|
|
24
|
+
*/
|
|
25
|
+
readonly type: AdvancedTypeEnum2;
|
|
26
|
+
}) | (sliderValueSpecificationDto & {
|
|
27
|
+
/**
|
|
28
|
+
* @type string
|
|
29
|
+
*/
|
|
30
|
+
readonly type: AdvancedTypeEnum2;
|
|
31
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type pets = pet[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type plainDate = Date;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type plainDate = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type plainEmail = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type plainFile = Blob;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type plainTime = Date;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type plainUuid = string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
export type demo = {
|
|
3
|
+
/**
|
|
4
|
+
* @type integer | undefined
|
|
5
|
+
*/
|
|
6
|
+
readonly attribute_readonly?: number;
|
|
7
|
+
/**
|
|
8
|
+
* @description not required
|
|
9
|
+
* @type integer | undefined
|
|
10
|
+
*/
|
|
11
|
+
attribute_writeOnly?: number;
|
|
12
|
+
/**
|
|
13
|
+
* @type integer | undefined
|
|
14
|
+
*/
|
|
15
|
+
readonly attribute_with_ref?: attributeReadonly;
|
|
16
|
+
/**
|
|
17
|
+
* @type integer | undefined
|
|
18
|
+
*/
|
|
19
|
+
attribute_with_ref_readonly?: attributeWriteOnly;
|
|
20
|
+
};
|