@@ -18,6 +18,19 @@ export class Holds extends APIResource {
1818 ) . _thenUnwrap ( ( obj ) => obj . result ) ;
1919 }
2020
21+ /**
22+ * Update the `hold_after` and/or `include_subdomains` values on an existing zone
23+ * hold. The hold is enabled if the `hold_after` date-time value is in the past.
24+ */
25+ update ( params : HoldUpdateParams , options ?: Core . RequestOptions ) : Core . APIPromise < ZoneHold > {
26+ const { zone_id, ...body } = params ;
27+ return (
28+ this . _client . patch ( `/zones/${ zone_id } /hold` , { body, ...options } ) as Core . APIPromise < {
29+ result : ZoneHold ;
30+ } >
31+ ) . _thenUnwrap ( ( obj ) => obj . result ) ;
32+ }
33+
2134 /**
2235 * Stop enforcement of a zone hold on the zone, permanently or temporarily,
2336 * allowing the creation and activation of zones with this zone's hostname.
@@ -32,19 +45,6 @@ export class Holds extends APIResource {
3245 ) . _thenUnwrap ( ( obj ) => obj . result ) ;
3346 }
3447
35- /**
36- * Update the `hold_after` and/or `include_subdomains` values on an existing zone
37- * hold. The hold is enabled if the `hold_after` date-time value is in the past.
38- */
39- edit ( params : HoldEditParams , options ?: Core . RequestOptions ) : Core . APIPromise < ZoneHold > {
40- const { zone_id, ...body } = params ;
41- return (
42- this . _client . patch ( `/zones/${ zone_id } /hold` , { body, ...options } ) as Core . APIPromise < {
43- result : ZoneHold ;
44- } >
45- ) . _thenUnwrap ( ( obj ) => obj . result ) ;
46- }
47-
4848 /**
4949 * Retrieve whether the zone is subject to a zone hold, and metadata about the
5050 * hold.
@@ -80,21 +80,7 @@ export interface HoldCreateParams {
8080 include_subdomains ?: boolean ;
8181}
8282
83- export interface HoldDeleteParams {
84- /**
85- * Path param: Identifier
86- */
87- zone_id : string ;
88-
89- /**
90- * Query param: If `hold_after` is provided, the hold will be temporarily disabled,
91- * then automatically re-enabled by the system at the time specified in this
92- * RFC3339-formatted timestamp. Otherwise, the hold will be disabled indefinitely.
93- */
94- hold_after ?: string ;
95- }
96-
97- export interface HoldEditParams {
83+ export interface HoldUpdateParams {
9884 /**
9985 * Path param: Identifier
10086 */
@@ -118,6 +104,20 @@ export interface HoldEditParams {
118104 include_subdomains ?: boolean ;
119105}
120106
107+ export interface HoldDeleteParams {
108+ /**
109+ * Path param: Identifier
110+ */
111+ zone_id : string ;
112+
113+ /**
114+ * Query param: If `hold_after` is provided, the hold will be temporarily disabled,
115+ * then automatically re-enabled by the system at the time specified in this
116+ * RFC3339-formatted timestamp. Otherwise, the hold will be disabled indefinitely.
117+ */
118+ hold_after ?: string ;
119+ }
120+
121121export interface HoldGetParams {
122122 /**
123123 * Identifier
@@ -129,8 +129,8 @@ export declare namespace Holds {
129129 export {
130130 type ZoneHold as ZoneHold ,
131131 type HoldCreateParams as HoldCreateParams ,
132+ type HoldUpdateParams as HoldUpdateParams ,
132133 type HoldDeleteParams as HoldDeleteParams ,
133- type HoldEditParams as HoldEditParams ,
134134 type HoldGetParams as HoldGetParams ,
135135 } ;
136136}
0 commit comments