@@ -14,11 +14,11 @@ export class Lists extends APIResource {
14
14
/**
15
15
* Creates a new list of the specified type.
16
16
*/
17
- create ( params : ListCreateParams , options ?: Core . RequestOptions ) : Core . APIPromise < List | null > {
17
+ create ( params : ListCreateParams , options ?: Core . RequestOptions ) : Core . APIPromise < RuleList | null > {
18
18
const { account_id, ...body } = params ;
19
19
return (
20
20
this . _client . post ( `/accounts/${ account_id } /rules/lists` , { body, ...options } ) as Core . APIPromise < {
21
- result : List | null ;
21
+ result : RuleList | null ;
22
22
} >
23
23
) . _thenUnwrap ( ( obj ) => obj . result ) ;
24
24
}
@@ -30,22 +30,25 @@ export class Lists extends APIResource {
30
30
listId : string ,
31
31
params : ListUpdateParams ,
32
32
options ?: Core . RequestOptions ,
33
- ) : Core . APIPromise < List | null > {
33
+ ) : Core . APIPromise < RuleList | null > {
34
34
const { account_id, ...body } = params ;
35
35
return (
36
36
this . _client . put ( `/accounts/${ account_id } /rules/lists/${ listId } ` , {
37
37
body,
38
38
...options ,
39
- } ) as Core . APIPromise < { result : List | null } >
39
+ } ) as Core . APIPromise < { result : RuleList | null } >
40
40
) . _thenUnwrap ( ( obj ) => obj . result ) ;
41
41
}
42
42
43
43
/**
44
44
* Fetches all lists in the account.
45
45
*/
46
- list ( params : ListListParams , options ?: Core . RequestOptions ) : Core . PagePromise < ListsSinglePage , List > {
46
+ list (
47
+ params : ListListParams ,
48
+ options ?: Core . RequestOptions ,
49
+ ) : Core . PagePromise < RuleListsSinglePage , RuleList > {
47
50
const { account_id } = params ;
48
- return this . _client . getAPIList ( `/accounts/${ account_id } /rules/lists` , ListsSinglePage , options ) ;
51
+ return this . _client . getAPIList ( `/accounts/${ account_id } /rules/lists` , RuleListsSinglePage , options ) ;
49
52
}
50
53
51
54
/**
@@ -68,17 +71,21 @@ export class Lists extends APIResource {
68
71
/**
69
72
* Fetches the details of a list.
70
73
*/
71
- get ( listId : string , params : ListGetParams , options ?: Core . RequestOptions ) : Core . APIPromise < List | null > {
74
+ get (
75
+ listId : string ,
76
+ params : ListGetParams ,
77
+ options ?: Core . RequestOptions ,
78
+ ) : Core . APIPromise < RuleList | null > {
72
79
const { account_id } = params ;
73
80
return (
74
81
this . _client . get ( `/accounts/${ account_id } /rules/lists/${ listId } ` , options ) as Core . APIPromise < {
75
- result : List | null ;
82
+ result : RuleList | null ;
76
83
} >
77
84
) . _thenUnwrap ( ( obj ) => obj . result ) ;
78
85
}
79
86
}
80
87
81
- export class ListsSinglePage extends SinglePage < List > { }
88
+ export class RuleListsSinglePage extends SinglePage < RuleList > { }
82
89
83
90
/**
84
91
* Valid characters for hostnames are ASCII(7) letters from a to z, the digits from
@@ -88,7 +95,26 @@ export interface Hostname {
88
95
url_hostname : string ;
89
96
}
90
97
91
- export interface List {
98
+ /**
99
+ * The definition of the redirect.
100
+ */
101
+ export interface Redirect {
102
+ source_url : string ;
103
+
104
+ target_url : string ;
105
+
106
+ include_subdomains ?: boolean ;
107
+
108
+ preserve_path_suffix ?: boolean ;
109
+
110
+ preserve_query_string ?: boolean ;
111
+
112
+ status_code ?: 301 | 302 | 307 | 308 ;
113
+
114
+ subpath_matching ?: boolean ;
115
+ }
116
+
117
+ export interface RuleList {
92
118
/**
93
119
* The unique ID of the list.
94
120
*/
@@ -131,25 +157,6 @@ export interface List {
131
157
num_referencing_filters ?: number ;
132
158
}
133
159
134
- /**
135
- * The definition of the redirect.
136
- */
137
- export interface Redirect {
138
- source_url : string ;
139
-
140
- target_url : string ;
141
-
142
- include_subdomains ?: boolean ;
143
-
144
- preserve_path_suffix ?: boolean ;
145
-
146
- preserve_query_string ?: boolean ;
147
-
148
- status_code ?: 301 | 302 | 307 | 308 ;
149
-
150
- subpath_matching ?: boolean ;
151
- }
152
-
153
160
export interface ListDeleteResponse {
154
161
/**
155
162
* The unique ID of the item in the List.
@@ -221,10 +228,10 @@ export interface ListGetParams {
221
228
222
229
export namespace Lists {
223
230
export import Hostname = ListsAPI . Hostname ;
224
- export import List = ListsAPI . List ;
225
231
export import Redirect = ListsAPI . Redirect ;
232
+ export import RuleList = ListsAPI . RuleList ;
226
233
export import ListDeleteResponse = ListsAPI . ListDeleteResponse ;
227
- export import ListsSinglePage = ListsAPI . ListsSinglePage ;
234
+ export import RuleListsSinglePage = ListsAPI . RuleListsSinglePage ;
228
235
export import ListCreateParams = ListsAPI . ListCreateParams ;
229
236
export import ListUpdateParams = ListsAPI . ListUpdateParams ;
230
237
export import ListListParams = ListsAPI . ListListParams ;
0 commit comments