7
7
/** WithRequired type helpers */
8
8
type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };
9
9
10
- /** OneOf type helpers */
11
- type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
12
- type XOR<T, U> = (T | U) extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
13
- type OneOf<T extends any[]> = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR<A, B>, ...Rest]> : never;
14
-
15
10
export interface paths {
16
11
"/v2/1-clicks": {
17
12
get: external["resources/1-clicks/oneClicks_list.yml"]
@@ -8231,17 +8226,17 @@ export interface external {
8231
8226
"ratelimit-reset": external["shared/headers.yml"]["ratelimit-reset"];
8232
8227
};
8233
8228
content: {
8234
- "application/json": OneOf<[ {
8229
+ "application/json": {
8235
8230
droplet: external["resources/droplets/models/droplet.yml"];
8236
8231
links: {
8237
8232
actions?: external["shared/models/action_link.yml"][];
8238
8233
};
8239
- }, {
8234
+ } | {
8240
8235
droplets: external["resources/droplets/models/droplet.yml"][];
8241
8236
links: {
8242
8237
actions?: external["shared/models/action_link.yml"][];
8243
8238
};
8244
- }]> ;
8239
+ };
8245
8240
};
8246
8241
}
8247
8242
"resources/droplets/responses/droplet_neighbors_ids.yml": {
@@ -9048,13 +9043,13 @@ export interface external {
9048
9043
droplet_id: number;
9049
9044
};
9050
9045
};
9051
- "resources/floating_ips/models/floating_ip_create.yml": OneOf<[ {
9046
+ "resources/floating_ips/models/floating_ip_create.yml": {
9052
9047
/**
9053
9048
* @description The ID of the Droplet that the floating IP will be assigned to.
9054
9049
* @example 2457247
9055
9050
*/
9056
9051
droplet_id: number;
9057
- }, {
9052
+ } | {
9058
9053
/**
9059
9054
* @description The slug identifier for the region the floating IP will be reserved to.
9060
9055
* @example nyc3
@@ -9066,7 +9061,7 @@ export interface external {
9066
9061
* @example 746c6152-2fa2-11ed-92d3-27aaa54e4988
9067
9062
*/
9068
9063
project_id?: string;
9069
- }]>
9064
+ }
9070
9065
"resources/floating_ips/models/floating_ip.yml": {
9071
9066
/**
9072
9067
* Format: ipv4
@@ -11760,15 +11755,15 @@ export interface external {
11760
11755
disable_lets_encrypt_dns_records?: boolean;
11761
11756
firewall?: external["resources/load_balancers/models/lb_firewall.yml"];
11762
11757
}
11763
- "resources/load_balancers/models/load_balancer_create.yml": OneOf<[ WithRequired<{
11758
+ "resources/load_balancers/models/load_balancer_create.yml": ( WithRequired<{
11764
11759
$ref?: external["resources/load_balancers/models/attributes.yml"]["load_balancer_droplet_ids"];
11765
11760
} & {
11766
11761
region?: external["shared/attributes/region_slug.yml"];
11767
- } & external["resources/load_balancers/models/load_balancer_base.yml"], "droplet_ids" | "region">, WithRequired<{
11762
+ } & external["resources/load_balancers/models/load_balancer_base.yml"], "droplet_ids" | "region">) | ( WithRequired<{
11768
11763
$ref?: external["resources/load_balancers/models/attributes.yml"]["load_balancer_droplet_tag"];
11769
11764
} & {
11770
11765
region?: external["shared/attributes/region_slug.yml"];
11771
- } & external["resources/load_balancers/models/load_balancer_base.yml"], "tag" | "region">]>
11766
+ } & external["resources/load_balancers/models/load_balancer_base.yml"], "tag" | "region">)
11772
11767
"resources/load_balancers/models/load_balancer.yml": external["resources/load_balancers/models/load_balancer_base.yml"] & {
11773
11768
region?: external["resources/regions/models/region.yml"];
11774
11769
} & {
@@ -13782,13 +13777,13 @@ export interface external {
13782
13777
droplet_id: number;
13783
13778
};
13784
13779
};
13785
- "resources/reserved_ips/models/reserved_ip_create.yml": OneOf<[ {
13780
+ "resources/reserved_ips/models/reserved_ip_create.yml": {
13786
13781
/**
13787
13782
* @description The ID of the Droplet that the reserved IP will be assigned to.
13788
13783
* @example 2457247
13789
13784
*/
13790
13785
droplet_id: number;
13791
- }, {
13786
+ } | {
13792
13787
/**
13793
13788
* @description The slug identifier for the region the reserved IP will be reserved to.
13794
13789
* @example nyc3
@@ -13800,7 +13795,7 @@ export interface external {
13800
13795
* @example 746c6152-2fa2-11ed-92d3-27aaa54e4988
13801
13796
*/
13802
13797
project_id?: string;
13803
- }]>
13798
+ }
13804
13799
"resources/reserved_ips/models/reserved_ip.yml": {
13805
13800
/**
13806
13801
* Format: ipv4
0 commit comments