@@ -25,6 +25,74 @@ export enum BlockDTOEnum {
25
25
Kek = " kek" ,
26
26
}
27
27
28
+ /** kek pek */
29
+ export type Variant =
30
+ | ({
31
+ type : " update" ;
32
+ } & VariantUpdate)
33
+ | ({
34
+ type : " undo" ;
35
+ } & VariantUndo)
36
+ | ({
37
+ type : " rollback" ;
38
+ } & VariantRollback)
39
+ | ({
40
+ type : " scale" ;
41
+ } & VariantScale)
42
+ | ({
43
+ type : " resources" ;
44
+ } & VariantResources)
45
+ | ({
46
+ type : " firewall" ;
47
+ } & VariantFirewall)
48
+ | ({
49
+ type : " gateway" ;
50
+ } & VariantGateway);
51
+
52
+ export type InvalidDiscriminatorPropertyName =
53
+ BaseInvalidDiscriminatorPropertyName &
54
+ (
55
+ | BaseInvalidDiscriminatorPropertyNameTypeMapping<"num", number>
56
+ | BaseInvalidDiscriminatorPropertyNameTypeMapping<"str", string>
57
+ );
58
+
59
+ export type PetWithEnum = BasePetWithEnum &
60
+ (
61
+ | BasePetWithEnumPetTypeMapping<PetEnum.Dog, DogWithEnum>
62
+ | BasePetWithEnumPetTypeMapping<PetEnum.Cat, CatWithEnum>
63
+ | BasePetWithEnumPetTypeMapping<PetEnum.Lizard, LizardWithEnum>
64
+ );
65
+
66
+ export type PetOnlyDiscriminator =
67
+ | ({
68
+ pet_type : " dog" ;
69
+ } & Dog)
70
+ | ({
71
+ pet_type : " cat" ;
72
+ } & Cat)
73
+ | ({
74
+ pet_type : " lizard" ;
75
+ } & Lizard);
76
+
77
+ export type Pet = BasePet &
78
+ (
79
+ | BasePetPetTypeMapping<"dog", Dog>
80
+ | BasePetPetTypeMapping<"cat", Cat>
81
+ | BasePetPetTypeMapping<"lizard", Lizard>
82
+ );
83
+
84
+ export type BlockDTO = BaseBlockDto &
85
+ (
86
+ | BaseBlockDtoTypeMapping<"csv", CsvBlockDTO>
87
+ | BaseBlockDtoTypeMapping<"file", FileBlockDTO>
88
+ );
89
+
90
+ export type BlockDTOWithEnum = BaseBlockDtoWithEnum &
91
+ (
92
+ | BaseBlockDtoWithEnumTypeMapping<BlockDTOEnum.Csv, CsvBlockWithEnumDTO>
93
+ | BaseBlockDtoWithEnumTypeMapping<BlockDTOEnum.File, FileBlockWithEnumDTO>
94
+ );
95
+
28
96
export type SimpleDiscriminator = SimpleObject | ComplexObject;
29
97
30
98
export interface SimpleObject {
@@ -35,12 +103,6 @@ export interface ComplexObject {
35
103
objectType : string ;
36
104
}
37
105
38
- export type BlockDTOWithEnum = BaseBlockDtoWithEnum &
39
- (
40
- | BaseBlockDtoWithEnumTypeMapping<BlockDTOEnum.Csv, CsvBlockWithEnumDTO>
41
- | BaseBlockDtoWithEnumTypeMapping<BlockDTOEnum.File, FileBlockWithEnumDTO>
42
- );
43
-
44
106
export type CsvBlockWithEnumDTO = BaseBlockDtoWithEnum & {
45
107
type : BlockDTOEnum .Csv ;
46
108
text : string ;
@@ -51,12 +113,6 @@ export type FileBlockWithEnumDTO = BaseBlockDtoWithEnum & {
51
113
fileId : string ;
52
114
} ;
53
115
54
- export type BlockDTO = BaseBlockDto &
55
- (
56
- | BaseBlockDtoTypeMapping<"csv", CsvBlockDTO>
57
- | BaseBlockDtoTypeMapping<"file", FileBlockDTO>
58
- );
59
-
60
116
export type CsvBlockDTO = BaseBlockDto & {
61
117
/** @default "csv" */
62
118
type : " csv" ;
@@ -69,24 +125,6 @@ export type FileBlockDTO = BaseBlockDto & {
69
125
fileId : string ;
70
126
} ;
71
127
72
- export type Pet = BasePet &
73
- (
74
- | BasePetPetTypeMapping<"dog", Dog>
75
- | BasePetPetTypeMapping<"cat", Cat>
76
- | BasePetPetTypeMapping<"lizard", Lizard>
77
- );
78
-
79
- export type PetOnlyDiscriminator =
80
- | ({
81
- pet_type : " dog" ;
82
- } & Dog)
83
- | ({
84
- pet_type : " cat" ;
85
- } & Cat)
86
- | ({
87
- pet_type : " lizard" ;
88
- } & Lizard);
89
-
90
128
export type Cat = BasePet & {
91
129
name ?: string ;
92
130
} ;
@@ -99,13 +137,6 @@ export type Lizard = BasePet & {
99
137
lovesRocks ?: boolean ;
100
138
} ;
101
139
102
- export type PetWithEnum = BasePetWithEnum &
103
- (
104
- | BasePetWithEnumPetTypeMapping<PetEnum.Dog, DogWithEnum>
105
- | BasePetWithEnumPetTypeMapping<PetEnum.Cat, CatWithEnum>
106
- | BasePetWithEnumPetTypeMapping<PetEnum.Lizard, LizardWithEnum>
107
- );
108
-
109
140
export type CatWithEnum = BasePetWithEnum & {
110
141
name ?: string ;
111
142
} ;
@@ -118,37 +149,6 @@ export type LizardWithEnum = BasePetWithEnum & {
118
149
lovesRocks ?: boolean ;
119
150
} ;
120
151
121
- export type InvalidDiscriminatorPropertyName =
122
- BaseInvalidDiscriminatorPropertyName &
123
- (
124
- | BaseInvalidDiscriminatorPropertyNameTypeMapping<"num", number>
125
- | BaseInvalidDiscriminatorPropertyNameTypeMapping<"str", string>
126
- );
127
-
128
- /** kek pek */
129
- export type Variant =
130
- | ({
131
- type : " update" ;
132
- } & VariantUpdate)
133
- | ({
134
- type : " undo" ;
135
- } & VariantUndo)
136
- | ({
137
- type : " rollback" ;
138
- } & VariantRollback)
139
- | ({
140
- type : " scale" ;
141
- } & VariantScale)
142
- | ({
143
- type : " resources" ;
144
- } & VariantResources)
145
- | ({
146
- type : " firewall" ;
147
- } & VariantFirewall)
148
- | ({
149
- type : " gateway" ;
150
- } & VariantGateway);
151
-
152
152
/** Proposal to change firewall rules for deployment. */
153
153
export interface VariantFirewall {
154
154
/** asdasdasdasdasdsad added to deployment. If not set, no rules are added. */
@@ -196,21 +196,18 @@ export interface VariantRollback {
196
196
/** asdasdasdasdasdn */
197
197
export type VariantUndo = object;
198
198
199
- interface BaseBlockDtoWithEnum {
200
- title : string ;
201
- type : BlockDTOEnum ;
202
- }
199
+ type BaseInvalidDiscriminatorPropertyName = object;
203
200
204
- type BaseBlockDtoWithEnumTypeMapping <Key, Type> = {
205
- type : Key ;
201
+ type BaseInvalidDiscriminatorPropertyNameTypeMapping <Key, Type> = {
202
+ " @ type" : Key ;
206
203
} & Type;
207
204
208
- interface BaseBlockDto {
209
- title : string ;
205
+ interface BasePetWithEnum {
206
+ pet_type : PetEnum ;
210
207
}
211
208
212
- type BaseBlockDtoTypeMapping <Key, Type> = {
213
- type : Key ;
209
+ type BasePetWithEnumPetTypeMapping <Key, Type> = {
210
+ pet_type : Key ;
214
211
} & Type;
215
212
216
213
interface BasePet {
@@ -221,18 +218,21 @@ type BasePetPetTypeMapping<Key, Type> = {
221
218
pet_type : Key ;
222
219
} & Type;
223
220
224
- interface BasePetWithEnum {
225
- pet_type : PetEnum ;
221
+ interface BaseBlockDto {
222
+ title : string ;
226
223
}
227
224
228
- type BasePetWithEnumPetTypeMapping <Key, Type> = {
229
- pet_type : Key ;
225
+ type BaseBlockDtoTypeMapping <Key, Type> = {
226
+ type : Key ;
230
227
} & Type;
231
228
232
- type BaseInvalidDiscriminatorPropertyName = object;
229
+ interface BaseBlockDtoWithEnum {
230
+ title : string ;
231
+ type : BlockDTOEnum ;
232
+ }
233
233
234
- type BaseInvalidDiscriminatorPropertyNameTypeMapping <Key, Type> = {
235
- " @ type" : Key ;
234
+ type BaseBlockDtoWithEnumTypeMapping <Key, Type> = {
235
+ type : Key ;
236
236
} & Type;
237
237
"
238
238
` ;
0 commit comments