@@ -27,6 +27,24 @@ export class Subdomains extends APIResource {
2727 ) . _thenUnwrap ( ( obj ) => obj . result ) ;
2828 }
2929
30+ /**
31+ * Deletes a Workers subdomain for an account.
32+ *
33+ * @example
34+ * ```ts
35+ * await client.workers.subdomains.delete({
36+ * account_id: '023e105f4ecef8ad9ca31a8372d0c353',
37+ * });
38+ * ```
39+ */
40+ delete ( params : SubdomainDeleteParams , options ?: Core . RequestOptions ) : Core . APIPromise < void > {
41+ const { account_id } = params ;
42+ return this . _client . delete ( `/accounts/${ account_id } /workers/subdomain` , {
43+ ...options ,
44+ headers : { Accept : '*/*' , ...options ?. headers } ,
45+ } ) ;
46+ }
47+
3048 /**
3149 * Returns a Workers subdomain for an account.
3250 *
@@ -67,6 +85,13 @@ export interface SubdomainUpdateParams {
6785 subdomain : string ;
6886}
6987
88+ export interface SubdomainDeleteParams {
89+ /**
90+ * Identifier.
91+ */
92+ account_id : string ;
93+ }
94+
7095export interface SubdomainGetParams {
7196 /**
7297 * Identifier.
@@ -79,6 +104,7 @@ export declare namespace Subdomains {
79104 type SubdomainUpdateResponse as SubdomainUpdateResponse ,
80105 type SubdomainGetResponse as SubdomainGetResponse ,
81106 type SubdomainUpdateParams as SubdomainUpdateParams ,
107+ type SubdomainDeleteParams as SubdomainDeleteParams ,
82108 type SubdomainGetParams as SubdomainGetParams ,
83109 } ;
84110}
0 commit comments