44 */
55
66
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 */
811type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
912type XOR<T, U> = (T | U) extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
1013type 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 {
18281831 */
18291832 databases?: (external["resources/apps/models/app_database_spec.yml"])[];
18301833 }
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"] & {
18321835 /**
18331836 * @description The name of the index document to use when serving this static site. Default: index.html
18341837 * @default index.html
@@ -1854,7 +1857,7 @@ export interface external {
18541857 cors?: external["resources/apps/models/apps_cors_policy.yml"];
18551858 /** @description A list of HTTP routes that should be routed to this component. */
18561859 routes?: (external["resources/apps/models/app_route_spec.yml"])[];
1857- }
1860+ }, "name">
18581861 "resources/apps/models/app_variable_definition.yml": {
18591862 /**
18601863 * @description The variable name
@@ -1884,7 +1887,7 @@ export interface external {
18841887 */
18851888 value?: string;
18861889 }
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">
18881891 "resources/apps/models/app.yml": {
18891892 active_deployment?: external["resources/apps/models/apps_deployment.yml"];
18901893 /**
@@ -3691,7 +3694,7 @@ export interface external {
36913694 * "size": "db-s-2vcpu-4gb"
36923695 * }
36933696 */
3694- "application/json": external["resources/databases/models/database_replica.yml"];
3697+ "application/json": WithRequired< external["resources/databases/models/database_replica.yml"], "name" | "size"> ;
36953698 };
36963699 };
36973700 responses: {
@@ -7391,7 +7394,7 @@ export interface external {
73917394 * ]
73927395 * }
73937396 */
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"> ;
73957398 };
73967399 };
73977400 responses: {
@@ -8117,15 +8120,15 @@ export interface external {
81178120 };
81188121 }
81198122 "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"] & {
81218124 /**
81228125 * @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.
81238126 * @example http://cloud-images.ubuntu.com/minimal/releases/bionic/release/ubuntu-18.04-minimal-cloudimg-amd64.img
81248127 */
81258128 url?: string;
81268129 region?: external["shared/attributes/region_slug.yml"];
81278130 tags?: external["shared/attributes/tags_array.yml"];
8128- }
8131+ }, "name" | "url" | "region">
81298132 "resources/images/models/image_update.yml": {
81308133 name?: external["resources/images/attributes.yml"]["image_name"];
81318134 distribution?: external["shared/attributes/distribution.yml"];
@@ -9748,15 +9751,15 @@ export interface external {
97489751 */
97499752 disable_lets_encrypt_dns_records?: boolean;
97509753 }
9751- "resources/load_balancers/models/load_balancer_create.yml": OneOf<[{
9754+ "resources/load_balancers/models/load_balancer_create.yml": OneOf<[WithRequired< {
97529755 $ref?: external["resources/load_balancers/models/attributes.yml"]["load_balancer_droplet_ids"];
97539756 } & {
97549757 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< {
97569759 $ref?: external["resources/load_balancers/models/attributes.yml"]["load_balancer_droplet_tag"];
97579760 } & {
97589761 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"> ]>
97609763 "resources/load_balancers/models/load_balancer.yml": external["resources/load_balancers/models/load_balancer_base.yml"] & ({
97619764 region?: Record<string, never> & external["resources/regions/models/region.yml"];
97629765 }) & {
@@ -10397,7 +10400,7 @@ export interface external {
1039710400 */
1039810401 requestBody: {
1039910402 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"> ;
1040110404 };
1040210405 };
1040310406 responses: {
@@ -10552,7 +10555,7 @@ export interface external {
1055210555 */
1055310556 requestBody: {
1055410557 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"> ;
1055610559 };
1055710560 };
1055810561 responses: {
@@ -10571,7 +10574,7 @@ export interface external {
1057110574 */
1057210575 requestBody: {
1057310576 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"> ;
1057510578 };
1057610579 };
1057710580 responses: {
@@ -12373,7 +12376,7 @@ export interface external {
1237312376 */
1237412377 requestBody: {
1237512378 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"> ;
1237712380 };
1237812381 };
1237912382 responses: {
@@ -12393,7 +12396,7 @@ export interface external {
1239312396 */
1239412397 requestBody: {
1239512398 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"> ;
1239712400 };
1239812401 };
1239912402 responses: {
@@ -13175,7 +13178,7 @@ export interface external {
1317513178 */
1317613179 requestBody: {
1317713180 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"> ;
1317913182 };
1318013183 };
1318113184 responses: {
@@ -13280,7 +13283,7 @@ export interface external {
1328013283 */
1328113284 requestBody: {
1328213285 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"> ;
1328413287 };
1328513288 };
1328613289 responses: {
0 commit comments