4
4
*/
5
5
6
6
7
- /** Type helpers */
7
+ /** WithRequired type helpers */
8
+ type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };
9
+
10
+ /** OneOf type helpers */
8
11
type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
9
12
type XOR<T, U> = (T | U) extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
10
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;
@@ -1828,7 +1831,7 @@ export interface external {
1828
1831
*/
1829
1832
databases?: (external["resources/apps/models/app_database_spec.yml"])[];
1830
1833
}
1831
- "resources/apps/models/app_static_site_spec.yml": external["resources/apps/models/app_component_base.yml"] & {
1834
+ "resources/apps/models/app_static_site_spec.yml": WithRequired< external["resources/apps/models/app_component_base.yml"] & {
1832
1835
/**
1833
1836
* @description The name of the index document to use when serving this static site. Default: index.html
1834
1837
* @default index.html
@@ -1854,7 +1857,7 @@ export interface external {
1854
1857
cors?: external["resources/apps/models/apps_cors_policy.yml"];
1855
1858
/** @description A list of HTTP routes that should be routed to this component. */
1856
1859
routes?: (external["resources/apps/models/app_route_spec.yml"])[];
1857
- }
1860
+ }, "name">
1858
1861
"resources/apps/models/app_variable_definition.yml": {
1859
1862
/**
1860
1863
* @description The variable name
@@ -1884,7 +1887,7 @@ export interface external {
1884
1887
*/
1885
1888
value?: string;
1886
1889
}
1887
- "resources/apps/models/app_worker_spec.yml": external["resources/apps/models/app_component_base.yml"] & external["resources/apps/models/app_component_instance_base.yml"]
1890
+ "resources/apps/models/app_worker_spec.yml": WithRequired< external["resources/apps/models/app_component_base.yml"] & external["resources/apps/models/app_component_instance_base.yml"], "name">
1888
1891
"resources/apps/models/app.yml": {
1889
1892
active_deployment?: external["resources/apps/models/apps_deployment.yml"];
1890
1893
/**
@@ -3691,7 +3694,7 @@ export interface external {
3691
3694
* "size": "db-s-2vcpu-4gb"
3692
3695
* }
3693
3696
*/
3694
- "application/json": external["resources/databases/models/database_replica.yml"];
3697
+ "application/json": WithRequired< external["resources/databases/models/database_replica.yml"], "name" | "size"> ;
3695
3698
};
3696
3699
};
3697
3700
responses: {
@@ -7391,7 +7394,7 @@ export interface external {
7391
7394
* ]
7392
7395
* }
7393
7396
*/
7394
- "application/json": external["resources/firewalls/models/firewall.yml"] & (Record<string, never> | Record<string, never>);
7397
+ "application/json": WithRequired< external["resources/firewalls/models/firewall.yml"] & (Record<string, never> | Record<string, never>), "name"> ;
7395
7398
};
7396
7399
};
7397
7400
responses: {
@@ -8117,15 +8120,15 @@ export interface external {
8117
8120
};
8118
8121
}
8119
8122
"resources/images/models/image_action.yml": Record<string, never>
8120
- "resources/images/models/image_new_custom.yml": external["resources/images/models/image_update.yml"] & {
8123
+ "resources/images/models/image_new_custom.yml": WithRequired< external["resources/images/models/image_update.yml"] & {
8121
8124
/**
8122
8125
* @description A URL from which the custom Linux virtual machine image may be retrieved. The image it points to must be in the raw, qcow2, vhdx, vdi, or vmdk format. It may be compressed using gzip or bzip2 and must be smaller than 100 GB after being decompressed.
8123
8126
* @example http://cloud-images.ubuntu.com/minimal/releases/bionic/release/ubuntu-18.04-minimal-cloudimg-amd64.img
8124
8127
*/
8125
8128
url?: string;
8126
8129
region?: external["shared/attributes/region_slug.yml"];
8127
8130
tags?: external["shared/attributes/tags_array.yml"];
8128
- }
8131
+ }, "name" | "url" | "region">
8129
8132
"resources/images/models/image_update.yml": {
8130
8133
name?: external["resources/images/attributes.yml"]["image_name"];
8131
8134
distribution?: external["shared/attributes/distribution.yml"];
@@ -9748,15 +9751,15 @@ export interface external {
9748
9751
*/
9749
9752
disable_lets_encrypt_dns_records?: boolean;
9750
9753
}
9751
- "resources/load_balancers/models/load_balancer_create.yml": OneOf<[{
9754
+ "resources/load_balancers/models/load_balancer_create.yml": OneOf<[WithRequired< {
9752
9755
$ref?: external["resources/load_balancers/models/attributes.yml"]["load_balancer_droplet_ids"];
9753
9756
} & {
9754
9757
region?: external["shared/attributes/region_slug.yml"];
9755
- } & external["resources/load_balancers/models/load_balancer_base.yml"], {
9758
+ } & external["resources/load_balancers/models/load_balancer_base.yml"], "droplet_ids" | "region">, WithRequired< {
9756
9759
$ref?: external["resources/load_balancers/models/attributes.yml"]["load_balancer_droplet_tag"];
9757
9760
} & {
9758
9761
region?: external["shared/attributes/region_slug.yml"];
9759
- } & external["resources/load_balancers/models/load_balancer_base.yml"]]>
9762
+ } & external["resources/load_balancers/models/load_balancer_base.yml"], "tag" | "region"> ]>
9760
9763
"resources/load_balancers/models/load_balancer.yml": external["resources/load_balancers/models/load_balancer_base.yml"] & ({
9761
9764
region?: Record<string, never> & external["resources/regions/models/region.yml"];
9762
9765
}) & {
@@ -10397,7 +10400,7 @@ export interface external {
10397
10400
*/
10398
10401
requestBody: {
10399
10402
content: {
10400
- "application/json": external["resources/projects/models/project.yml"]["project_base"];
10403
+ "application/json": WithRequired< external["resources/projects/models/project.yml"]["project_base"], "name" | "purpose"> ;
10401
10404
};
10402
10405
};
10403
10406
responses: {
@@ -10552,7 +10555,7 @@ export interface external {
10552
10555
*/
10553
10556
requestBody: {
10554
10557
content: {
10555
- "application/json": external["resources/projects/models/project.yml"]["project"];
10558
+ "application/json": WithRequired< external["resources/projects/models/project.yml"]["project"], "name" | "description" | "purpose" | "environment" | "is_default"> ;
10556
10559
};
10557
10560
};
10558
10561
responses: {
@@ -10571,7 +10574,7 @@ export interface external {
10571
10574
*/
10572
10575
requestBody: {
10573
10576
content: {
10574
- "application/json": external["resources/projects/models/project.yml"]["project"];
10577
+ "application/json": WithRequired< external["resources/projects/models/project.yml"]["project"], "name" | "description" | "purpose" | "environment" | "is_default"> ;
10575
10578
};
10576
10579
};
10577
10580
responses: {
@@ -12373,7 +12376,7 @@ export interface external {
12373
12376
*/
12374
12377
requestBody: {
12375
12378
content: {
12376
- "application/json": external["resources/uptime/models/alert.yml"]["alert"];
12379
+ "application/json": WithRequired< external["resources/uptime/models/alert.yml"]["alert"], "name" | "type" | "notifications"> ;
12377
12380
};
12378
12381
};
12379
12382
responses: {
@@ -12393,7 +12396,7 @@ export interface external {
12393
12396
*/
12394
12397
requestBody: {
12395
12398
content: {
12396
- "application/json": external["resources/uptime/models/check.yml"]["check_updatable"];
12399
+ "application/json": WithRequired< external["resources/uptime/models/check.yml"]["check_updatable"], "name" | "method" | "target"> ;
12397
12400
};
12398
12401
};
12399
12402
responses: {
@@ -13175,7 +13178,7 @@ export interface external {
13175
13178
*/
13176
13179
requestBody: {
13177
13180
content: {
13178
- "application/json": external["resources/vpcs/models/vpc.yml"]["vpc_updatable"] & external["resources/vpcs/models/vpc.yml"]["vpc_create"];
13181
+ "application/json": WithRequired< external["resources/vpcs/models/vpc.yml"]["vpc_updatable"] & external["resources/vpcs/models/vpc.yml"]["vpc_create"], "name" | "region"> ;
13179
13182
};
13180
13183
};
13181
13184
responses: {
@@ -13280,7 +13283,7 @@ export interface external {
13280
13283
*/
13281
13284
requestBody: {
13282
13285
content: {
13283
- "application/json": external["resources/vpcs/models/vpc.yml"]["vpc_updatable"] & external["resources/vpcs/models/vpc.yml"]["vpc_default"];
13286
+ "application/json": WithRequired< external["resources/vpcs/models/vpc.yml"]["vpc_updatable"] & external["resources/vpcs/models/vpc.yml"]["vpc_default"], "name"> ;
13284
13287
};
13285
13288
};
13286
13289
responses: {
0 commit comments