2
2
3
3
from __future__ import annotations
4
4
5
- from typing import List , Type , Optional , cast
5
+ from typing import Type , Optional , cast
6
6
from typing_extensions import Literal
7
7
8
8
import httpx
30
30
)
31
31
from ...._wrappers import ResultWrapper
32
32
from ....pagination import SyncSinglePage , AsyncSinglePage
33
- from ....types .rules import List , ListDeleteResponse , list_create_params , list_delete_params , list_update_params
33
+ from ....types .rules import RuleList , ListDeleteResponse , list_create_params , list_delete_params , list_update_params
34
34
from ...._base_client import (
35
35
AsyncPaginator ,
36
36
make_request_options ,
@@ -77,7 +77,7 @@ def create(
77
77
extra_query : Query | None = None ,
78
78
extra_body : Body | None = None ,
79
79
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
80
- ) -> Optional [List ]:
80
+ ) -> Optional [RuleList ]:
81
81
"""
82
82
Creates a new list of the specified type.
83
83
@@ -118,7 +118,7 @@ def create(
118
118
timeout = timeout ,
119
119
post_parser = ResultWrapper ._unwrapper ,
120
120
),
121
- cast_to = cast (Type [Optional [List ]], ResultWrapper [List ]),
121
+ cast_to = cast (Type [Optional [RuleList ]], ResultWrapper [RuleList ]),
122
122
)
123
123
124
124
def update (
@@ -133,7 +133,7 @@ def update(
133
133
extra_query : Query | None = None ,
134
134
extra_body : Body | None = None ,
135
135
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
136
- ) -> Optional [List ]:
136
+ ) -> Optional [RuleList ]:
137
137
"""
138
138
Updates the description of a list.
139
139
@@ -166,7 +166,7 @@ def update(
166
166
timeout = timeout ,
167
167
post_parser = ResultWrapper ._unwrapper ,
168
168
),
169
- cast_to = cast (Type [Optional [List ]], ResultWrapper [List ]),
169
+ cast_to = cast (Type [Optional [RuleList ]], ResultWrapper [RuleList ]),
170
170
)
171
171
172
172
def list (
@@ -179,7 +179,7 @@ def list(
179
179
extra_query : Query | None = None ,
180
180
extra_body : Body | None = None ,
181
181
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
182
- ) -> SyncSinglePage [List ]:
182
+ ) -> SyncSinglePage [RuleList ]:
183
183
"""
184
184
Fetches all lists in the account.
185
185
@@ -198,11 +198,11 @@ def list(
198
198
raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
199
199
return self ._get_api_list (
200
200
f"/accounts/{ account_id } /rules/lists" ,
201
- page = SyncSinglePage [List ],
201
+ page = SyncSinglePage [RuleList ],
202
202
options = make_request_options (
203
203
extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
204
204
),
205
- model = List ,
205
+ model = RuleList ,
206
206
)
207
207
208
208
def delete (
@@ -262,7 +262,7 @@ def get(
262
262
extra_query : Query | None = None ,
263
263
extra_body : Body | None = None ,
264
264
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
265
- ) -> Optional [List ]:
265
+ ) -> Optional [RuleList ]:
266
266
"""
267
267
Fetches the details of a list.
268
268
@@ -292,7 +292,7 @@ def get(
292
292
timeout = timeout ,
293
293
post_parser = ResultWrapper ._unwrapper ,
294
294
),
295
- cast_to = cast (Type [Optional [List ]], ResultWrapper [List ]),
295
+ cast_to = cast (Type [Optional [RuleList ]], ResultWrapper [RuleList ]),
296
296
)
297
297
298
298
@@ -326,7 +326,7 @@ async def create(
326
326
extra_query : Query | None = None ,
327
327
extra_body : Body | None = None ,
328
328
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
329
- ) -> Optional [List ]:
329
+ ) -> Optional [RuleList ]:
330
330
"""
331
331
Creates a new list of the specified type.
332
332
@@ -367,7 +367,7 @@ async def create(
367
367
timeout = timeout ,
368
368
post_parser = ResultWrapper ._unwrapper ,
369
369
),
370
- cast_to = cast (Type [Optional [List ]], ResultWrapper [List ]),
370
+ cast_to = cast (Type [Optional [RuleList ]], ResultWrapper [RuleList ]),
371
371
)
372
372
373
373
async def update (
@@ -382,7 +382,7 @@ async def update(
382
382
extra_query : Query | None = None ,
383
383
extra_body : Body | None = None ,
384
384
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
385
- ) -> Optional [List ]:
385
+ ) -> Optional [RuleList ]:
386
386
"""
387
387
Updates the description of a list.
388
388
@@ -415,7 +415,7 @@ async def update(
415
415
timeout = timeout ,
416
416
post_parser = ResultWrapper ._unwrapper ,
417
417
),
418
- cast_to = cast (Type [Optional [List ]], ResultWrapper [List ]),
418
+ cast_to = cast (Type [Optional [RuleList ]], ResultWrapper [RuleList ]),
419
419
)
420
420
421
421
def list (
@@ -428,7 +428,7 @@ def list(
428
428
extra_query : Query | None = None ,
429
429
extra_body : Body | None = None ,
430
430
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
431
- ) -> AsyncPaginator [List , AsyncSinglePage [List ]]:
431
+ ) -> AsyncPaginator [RuleList , AsyncSinglePage [RuleList ]]:
432
432
"""
433
433
Fetches all lists in the account.
434
434
@@ -447,11 +447,11 @@ def list(
447
447
raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
448
448
return self ._get_api_list (
449
449
f"/accounts/{ account_id } /rules/lists" ,
450
- page = AsyncSinglePage [List ],
450
+ page = AsyncSinglePage [RuleList ],
451
451
options = make_request_options (
452
452
extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
453
453
),
454
- model = List ,
454
+ model = RuleList ,
455
455
)
456
456
457
457
async def delete (
@@ -511,7 +511,7 @@ async def get(
511
511
extra_query : Query | None = None ,
512
512
extra_body : Body | None = None ,
513
513
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
514
- ) -> Optional [List ]:
514
+ ) -> Optional [RuleList ]:
515
515
"""
516
516
Fetches the details of a list.
517
517
@@ -541,7 +541,7 @@ async def get(
541
541
timeout = timeout ,
542
542
post_parser = ResultWrapper ._unwrapper ,
543
543
),
544
- cast_to = cast (Type [Optional [List ]], ResultWrapper [List ]),
544
+ cast_to = cast (Type [Optional [RuleList ]], ResultWrapper [RuleList ]),
545
545
)
546
546
547
547
0 commit comments