@@ -25,6 +25,74 @@ export enum BlockDTOEnum {
2525 Kek = " kek" ,
2626}
2727
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+
2896export type SimpleDiscriminator = SimpleObject | ComplexObject;
2997
3098export interface SimpleObject {
@@ -35,12 +103,6 @@ export interface ComplexObject {
35103 objectType : string ;
36104}
37105
38- export type BlockDTOWithEnum = BaseBlockDtoWithEnum &
39- (
40- | BaseBlockDtoWithEnumTypeMapping<BlockDTOEnum.Csv, CsvBlockWithEnumDTO>
41- | BaseBlockDtoWithEnumTypeMapping<BlockDTOEnum.File, FileBlockWithEnumDTO>
42- );
43-
44106export type CsvBlockWithEnumDTO = BaseBlockDtoWithEnum & {
45107 type : BlockDTOEnum .Csv ;
46108 text : string ;
@@ -51,12 +113,6 @@ export type FileBlockWithEnumDTO = BaseBlockDtoWithEnum & {
51113 fileId : string ;
52114} ;
53115
54- export type BlockDTO = BaseBlockDto &
55- (
56- | BaseBlockDtoTypeMapping<"csv", CsvBlockDTO>
57- | BaseBlockDtoTypeMapping<"file", FileBlockDTO>
58- );
59-
60116export type CsvBlockDTO = BaseBlockDto & {
61117 /** @default "csv" */
62118 type : " csv" ;
@@ -69,24 +125,6 @@ export type FileBlockDTO = BaseBlockDto & {
69125 fileId : string ;
70126} ;
71127
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-
90128export type Cat = BasePet & {
91129 name ?: string ;
92130} ;
@@ -99,13 +137,6 @@ export type Lizard = BasePet & {
99137 lovesRocks ?: boolean ;
100138} ;
101139
102- export type PetWithEnum = BasePetWithEnum &
103- (
104- | BasePetWithEnumPetTypeMapping<PetEnum.Dog, DogWithEnum>
105- | BasePetWithEnumPetTypeMapping<PetEnum.Cat, CatWithEnum>
106- | BasePetWithEnumPetTypeMapping<PetEnum.Lizard, LizardWithEnum>
107- );
108-
109140export type CatWithEnum = BasePetWithEnum & {
110141 name ?: string ;
111142} ;
@@ -118,37 +149,6 @@ export type LizardWithEnum = BasePetWithEnum & {
118149 lovesRocks ?: boolean ;
119150} ;
120151
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-
152152/** Proposal to change firewall rules for deployment. */
153153export interface VariantFirewall {
154154 /** asdasdasdasdasdsad added to deployment. If not set, no rules are added. */
@@ -196,21 +196,18 @@ export interface VariantRollback {
196196/** asdasdasdasdasdn */
197197export type VariantUndo = object;
198198
199- interface BaseBlockDtoWithEnum {
200- title : string ;
201- type : BlockDTOEnum ;
202- }
199+ type BaseInvalidDiscriminatorPropertyName = object;
203200
204- type BaseBlockDtoWithEnumTypeMapping <Key, Type> = {
205- type : Key ;
201+ type BaseInvalidDiscriminatorPropertyNameTypeMapping <Key, Type> = {
202+ " @ type" : Key ;
206203} & Type;
207204
208- interface BaseBlockDto {
209- title : string ;
205+ interface BasePetWithEnum {
206+ pet_type : PetEnum ;
210207}
211208
212- type BaseBlockDtoTypeMapping <Key, Type> = {
213- type : Key ;
209+ type BasePetWithEnumPetTypeMapping <Key, Type> = {
210+ pet_type : Key ;
214211} & Type;
215212
216213interface BasePet {
@@ -221,18 +218,21 @@ type BasePetPetTypeMapping<Key, Type> = {
221218 pet_type : Key ;
222219} & Type;
223220
224- interface BasePetWithEnum {
225- pet_type : PetEnum ;
221+ interface BaseBlockDto {
222+ title : string ;
226223}
227224
228- type BasePetWithEnumPetTypeMapping <Key, Type> = {
229- pet_type : Key ;
225+ type BaseBlockDtoTypeMapping <Key, Type> = {
226+ type : Key ;
230227} & Type;
231228
232- type BaseInvalidDiscriminatorPropertyName = object;
229+ interface BaseBlockDtoWithEnum {
230+ title : string ;
231+ type : BlockDTOEnum ;
232+ }
233233
234- type BaseInvalidDiscriminatorPropertyNameTypeMapping <Key, Type> = {
235- " @ type" : Key ;
234+ type BaseBlockDtoWithEnumTypeMapping <Key, Type> = {
235+ type : Key ;
236236} & Type;
237237"
238238` ;
0 commit comments