Skip to content

Commit b31245d

Browse files
SDK regeneration
1 parent ae22120 commit b31245d

541 files changed

Lines changed: 22993 additions & 1933 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

reference.md

Lines changed: 1453 additions & 1433 deletions
Large diffs are not rendered by default.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
5+
import httpx
6+
7+
SDK_DEFAULT_TIMEOUT = 60
8+
9+
try:
10+
import httpx_aiohttp # type: ignore[import-not-found]
11+
except ImportError:
12+
13+
class DefaultAioHttpClient(httpx.AsyncClient): # type: ignore
14+
def __init__(self, **kwargs: typing.Any) -> None:
15+
raise RuntimeError(
16+
"To use the aiohttp client, install the aiohttp extra: pip install auth0-python[aiohttp]"
17+
)
18+
19+
else:
20+
21+
class DefaultAioHttpClient(httpx_aiohttp.HttpxAiohttpClient): # type: ignore
22+
def __init__(self, **kwargs: typing.Any) -> None:
23+
kwargs.setdefault("timeout", SDK_DEFAULT_TIMEOUT)
24+
kwargs.setdefault("follow_redirects", True)
25+
super().__init__(**kwargs)
26+
27+
28+
class DefaultAsyncHttpxClient(httpx.AsyncClient):
29+
def __init__(self, **kwargs: typing.Any) -> None:
30+
kwargs.setdefault("timeout", SDK_DEFAULT_TIMEOUT)
31+
kwargs.setdefault("follow_redirects", True)
32+
super().__init__(**kwargs)

src/auth0/management/actions/executions/raw_client.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
88
from ...core.http_response import AsyncHttpResponse, HttpResponse
99
from ...core.jsonable_encoder import jsonable_encoder
10+
from ...core.parse_error import ParsingError
1011
from ...core.pydantic_utilities import parse_obj_as
1112
from ...core.request_options import RequestOptions
1213
from ...errors.bad_request_error import BadRequestError
@@ -15,6 +16,7 @@
1516
from ...errors.too_many_requests_error import TooManyRequestsError
1617
from ...errors.unauthorized_error import UnauthorizedError
1718
from ...types.get_action_execution_response_content import GetActionExecutionResponseContent
19+
from pydantic import ValidationError
1820

1921

2022
class RawExecutionsClient:
@@ -113,6 +115,10 @@ def get(
113115
_response_json = _response.json()
114116
except JSONDecodeError:
115117
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
118+
except ValidationError as e:
119+
raise ParsingError(
120+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
121+
)
116122
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
117123

118124

@@ -212,4 +218,8 @@ async def get(
212218
_response_json = _response.json()
213219
except JSONDecodeError:
214220
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
221+
except ValidationError as e:
222+
raise ParsingError(
223+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
224+
)
215225
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

src/auth0/management/actions/modules/raw_client.py

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from ...core.http_response import AsyncHttpResponse, HttpResponse
99
from ...core.jsonable_encoder import jsonable_encoder
1010
from ...core.pagination import AsyncPager, SyncPager
11+
from ...core.parse_error import ParsingError
1112
from ...core.pydantic_utilities import parse_obj_as
1213
from ...core.request_options import RequestOptions
1314
from ...core.serialization import convert_and_respect_annotation_metadata
@@ -28,6 +29,7 @@
2829
from ...types.get_action_modules_response_content import GetActionModulesResponseContent
2930
from ...types.rollback_action_module_response_content import RollbackActionModuleResponseContent
3031
from ...types.update_action_module_response_content import UpdateActionModuleResponseContent
32+
from pydantic import ValidationError
3133

3234
# this is used as the default value for optional parameters
3335
OMIT = typing.cast(typing.Any, ...)
@@ -138,6 +140,10 @@ def list(
138140
_response_json = _response.json()
139141
except JSONDecodeError:
140142
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
143+
except ValidationError as e:
144+
raise ParsingError(
145+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
146+
)
141147
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
142148

143149
def create(
@@ -271,6 +277,10 @@ def create(
271277
_response_json = _response.json()
272278
except JSONDecodeError:
273279
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
280+
except ValidationError as e:
281+
raise ParsingError(
282+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
283+
)
274284
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
275285

276286
def get(
@@ -365,6 +375,10 @@ def get(
365375
_response_json = _response.json()
366376
except JSONDecodeError:
367377
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
378+
except ValidationError as e:
379+
raise ParsingError(
380+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
381+
)
368382
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
369383

370384
def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]:
@@ -460,6 +474,10 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] =
460474
_response_json = _response.json()
461475
except JSONDecodeError:
462476
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
477+
except ValidationError as e:
478+
raise ParsingError(
479+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
480+
)
463481
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
464482

465483
def update(
@@ -593,6 +611,10 @@ def update(
593611
_response_json = _response.json()
594612
except JSONDecodeError:
595613
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
614+
except ValidationError as e:
615+
raise ParsingError(
616+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
617+
)
596618
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
597619

598620
def list_actions(
@@ -712,6 +734,10 @@ def list_actions(
712734
_response_json = _response.json()
713735
except JSONDecodeError:
714736
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
737+
except ValidationError as e:
738+
raise ParsingError(
739+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
740+
)
715741
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
716742

717743
def rollback(
@@ -827,6 +853,10 @@ def rollback(
827853
_response_json = _response.json()
828854
except JSONDecodeError:
829855
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
856+
except ValidationError as e:
857+
raise ParsingError(
858+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
859+
)
830860
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
831861

832862

@@ -938,6 +968,10 @@ async def _get_next():
938968
_response_json = _response.json()
939969
except JSONDecodeError:
940970
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
971+
except ValidationError as e:
972+
raise ParsingError(
973+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
974+
)
941975
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
942976

943977
async def create(
@@ -1071,6 +1105,10 @@ async def create(
10711105
_response_json = _response.json()
10721106
except JSONDecodeError:
10731107
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1108+
except ValidationError as e:
1109+
raise ParsingError(
1110+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
1111+
)
10741112
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
10751113

10761114
async def get(
@@ -1165,6 +1203,10 @@ async def get(
11651203
_response_json = _response.json()
11661204
except JSONDecodeError:
11671205
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1206+
except ValidationError as e:
1207+
raise ParsingError(
1208+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
1209+
)
11681210
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
11691211

11701212
async def delete(
@@ -1262,6 +1304,10 @@ async def delete(
12621304
_response_json = _response.json()
12631305
except JSONDecodeError:
12641306
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1307+
except ValidationError as e:
1308+
raise ParsingError(
1309+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
1310+
)
12651311
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
12661312

12671313
async def update(
@@ -1395,6 +1441,10 @@ async def update(
13951441
_response_json = _response.json()
13961442
except JSONDecodeError:
13971443
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1444+
except ValidationError as e:
1445+
raise ParsingError(
1446+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
1447+
)
13981448
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
13991449

14001450
async def list_actions(
@@ -1517,6 +1567,10 @@ async def _get_next():
15171567
_response_json = _response.json()
15181568
except JSONDecodeError:
15191569
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1570+
except ValidationError as e:
1571+
raise ParsingError(
1572+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
1573+
)
15201574
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
15211575

15221576
async def rollback(
@@ -1632,4 +1686,8 @@ async def rollback(
16321686
_response_json = _response.json()
16331687
except JSONDecodeError:
16341688
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
1689+
except ValidationError as e:
1690+
raise ParsingError(
1691+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
1692+
)
16351693
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

src/auth0/management/actions/modules/versions/raw_client.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from ....core.http_response import AsyncHttpResponse, HttpResponse
99
from ....core.jsonable_encoder import jsonable_encoder
1010
from ....core.pagination import AsyncPager, SyncPager
11+
from ....core.parse_error import ParsingError
1112
from ....core.pydantic_utilities import parse_obj_as
1213
from ....core.request_options import RequestOptions
1314
from ....errors.bad_request_error import BadRequestError
@@ -21,6 +22,7 @@
2122
from ....types.create_action_module_version_response_content import CreateActionModuleVersionResponseContent
2223
from ....types.get_action_module_version_response_content import GetActionModuleVersionResponseContent
2324
from ....types.get_action_module_versions_response_content import GetActionModuleVersionsResponseContent
25+
from pydantic import ValidationError
2426

2527

2628
class RawVersionsClient:
@@ -144,6 +146,10 @@ def list(
144146
_response_json = _response.json()
145147
except JSONDecodeError:
146148
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
149+
except ValidationError as e:
150+
raise ParsingError(
151+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
152+
)
147153
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
148154

149155
def create(
@@ -249,6 +255,10 @@ def create(
249255
_response_json = _response.json()
250256
except JSONDecodeError:
251257
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
258+
except ValidationError as e:
259+
raise ParsingError(
260+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
261+
)
252262
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
253263

254264
def get(
@@ -346,6 +356,10 @@ def get(
346356
_response_json = _response.json()
347357
except JSONDecodeError:
348358
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
359+
except ValidationError as e:
360+
raise ParsingError(
361+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
362+
)
349363
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
350364

351365

@@ -473,6 +487,10 @@ async def _get_next():
473487
_response_json = _response.json()
474488
except JSONDecodeError:
475489
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
490+
except ValidationError as e:
491+
raise ParsingError(
492+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
493+
)
476494
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
477495

478496
async def create(
@@ -578,6 +596,10 @@ async def create(
578596
_response_json = _response.json()
579597
except JSONDecodeError:
580598
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
599+
except ValidationError as e:
600+
raise ParsingError(
601+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
602+
)
581603
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
582604

583605
async def get(
@@ -675,4 +697,8 @@ async def get(
675697
_response_json = _response.json()
676698
except JSONDecodeError:
677699
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
700+
except ValidationError as e:
701+
raise ParsingError(
702+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
703+
)
678704
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)

0 commit comments

Comments
 (0)