@@ -9,17 +9,14 @@ export class Widgets extends APIResource {
99 /**
1010 * Lists challenge widgets.
1111 */
12- create (
13- params : WidgetCreateParams ,
14- options ?: Core . RequestOptions ,
15- ) : Core . APIPromise < NcChallengesAdminWidgetDetail > {
12+ create ( params : WidgetCreateParams , options ?: Core . RequestOptions ) : Core . APIPromise < ChallengesWidget > {
1613 const { account_id, direction, order, page, per_page, ...body } = params ;
1714 return (
1815 this . _client . post ( `/accounts/${ account_id } /challenges/widgets` , {
1916 query : { direction, order, page, per_page } ,
2017 body,
2118 ...options ,
22- } ) as Core . APIPromise < { result : NcChallengesAdminWidgetDetail } >
19+ } ) as Core . APIPromise < { result : ChallengesWidget } >
2320 ) . _thenUnwrap ( ( obj ) => obj . result ) ;
2421 }
2522
@@ -30,13 +27,13 @@ export class Widgets extends APIResource {
3027 sitekey : string ,
3128 params : WidgetUpdateParams ,
3229 options ?: Core . RequestOptions ,
33- ) : Core . APIPromise < NcChallengesAdminWidgetDetail > {
30+ ) : Core . APIPromise < ChallengesWidget > {
3431 const { account_id, ...body } = params ;
3532 return (
3633 this . _client . put ( `/accounts/${ account_id } /challenges/widgets/${ sitekey } ` , {
3734 body,
3835 ...options ,
39- } ) as Core . APIPromise < { result : NcChallengesAdminWidgetDetail } >
36+ } ) as Core . APIPromise < { result : ChallengesWidget } >
4037 ) . _thenUnwrap ( ( obj ) => obj . result ) ;
4138 }
4239
@@ -46,11 +43,11 @@ export class Widgets extends APIResource {
4643 list (
4744 params : WidgetListParams ,
4845 options ?: Core . RequestOptions ,
49- ) : Core . PagePromise < NcChallengesAdminWidgetListsV4PagePaginationArray , NcChallengesAdminWidgetList > {
46+ ) : Core . PagePromise < ChallengesWidgetListsV4PagePaginationArray , ChallengesWidgetList > {
5047 const { account_id, ...query } = params ;
5148 return this . _client . getAPIList (
5249 `/accounts/${ account_id } /challenges/widgets` ,
53- NcChallengesAdminWidgetListsV4PagePaginationArray ,
50+ ChallengesWidgetListsV4PagePaginationArray ,
5451 { query, ...options } ,
5552 ) ;
5653 }
@@ -62,13 +59,13 @@ export class Widgets extends APIResource {
6259 sitekey : string ,
6360 params : WidgetDeleteParams ,
6461 options ?: Core . RequestOptions ,
65- ) : Core . APIPromise < NcChallengesAdminWidgetDetail > {
62+ ) : Core . APIPromise < ChallengesWidget > {
6663 const { account_id } = params ;
6764 return (
6865 this . _client . delete (
6966 `/accounts/${ account_id } /challenges/widgets/${ sitekey } ` ,
7067 options ,
71- ) as Core . APIPromise < { result : NcChallengesAdminWidgetDetail } >
68+ ) as Core . APIPromise < { result : ChallengesWidget } >
7269 ) . _thenUnwrap ( ( obj ) => obj . result ) ;
7370 }
7471
@@ -79,11 +76,11 @@ export class Widgets extends APIResource {
7976 sitekey : string ,
8077 params : WidgetGetParams ,
8178 options ?: Core . RequestOptions ,
82- ) : Core . APIPromise < NcChallengesAdminWidgetDetail > {
79+ ) : Core . APIPromise < ChallengesWidget > {
8380 const { account_id } = params ;
8481 return (
8582 this . _client . get ( `/accounts/${ account_id } /challenges/widgets/${ sitekey } ` , options ) as Core . APIPromise < {
86- result : NcChallengesAdminWidgetDetail ;
83+ result : ChallengesWidget ;
8784 } >
8885 ) . _thenUnwrap ( ( obj ) => obj . result ) ;
8986 }
@@ -98,23 +95,23 @@ export class Widgets extends APIResource {
9895 sitekey : string ,
9996 params : WidgetRotateSecretParams ,
10097 options ?: Core . RequestOptions ,
101- ) : Core . APIPromise < NcChallengesAdminWidgetDetail > {
98+ ) : Core . APIPromise < ChallengesWidget > {
10299 const { account_id, ...body } = params ;
103100 return (
104101 this . _client . post ( `/accounts/${ account_id } /challenges/widgets/${ sitekey } /rotate_secret` , {
105102 body,
106103 ...options ,
107- } ) as Core . APIPromise < { result : NcChallengesAdminWidgetDetail } >
104+ } ) as Core . APIPromise < { result : ChallengesWidget } >
108105 ) . _thenUnwrap ( ( obj ) => obj . result ) ;
109106 }
110107}
111108
112- export class NcChallengesAdminWidgetListsV4PagePaginationArray extends V4PagePaginationArray < NcChallengesAdminWidgetList > { }
109+ export class ChallengesWidgetListsV4PagePaginationArray extends V4PagePaginationArray < ChallengesWidgetList > { }
113110
114111/**
115112 * A Turnstile widget's detailed configuration
116113 */
117- export interface NcChallengesAdminWidgetDetail {
114+ export interface ChallengesWidget {
118115 /**
119116 * If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive
120117 * challenges in response to malicious bots (ENT only).
@@ -175,7 +172,7 @@ export interface NcChallengesAdminWidgetDetail {
175172/**
176173 * A Turnstile Widgets configuration as it appears in listings
177174 */
178- export interface NcChallengesAdminWidgetList {
175+ export interface ChallengesWidgetList {
179176 /**
180177 * If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive
181178 * challenges in response to malicious bots (ENT only).
@@ -383,9 +380,9 @@ export interface WidgetRotateSecretParams {
383380}
384381
385382export namespace Widgets {
386- export import NcChallengesAdminWidgetDetail = WidgetsAPI . NcChallengesAdminWidgetDetail ;
387- export import NcChallengesAdminWidgetList = WidgetsAPI . NcChallengesAdminWidgetList ;
388- export import NcChallengesAdminWidgetListsV4PagePaginationArray = WidgetsAPI . NcChallengesAdminWidgetListsV4PagePaginationArray ;
383+ export import ChallengesWidget = WidgetsAPI . ChallengesWidget ;
384+ export import ChallengesWidgetList = WidgetsAPI . ChallengesWidgetList ;
385+ export import ChallengesWidgetListsV4PagePaginationArray = WidgetsAPI . ChallengesWidgetListsV4PagePaginationArray ;
389386 export import WidgetCreateParams = WidgetsAPI . WidgetCreateParams ;
390387 export import WidgetUpdateParams = WidgetsAPI . WidgetUpdateParams ;
391388 export import WidgetListParams = WidgetsAPI . WidgetListParams ;
0 commit comments