Skip to content

Commit 08d9e9d

Browse files
fern-api[bot]rmad17
authored andcommitted
[fern-generated] Update SDK
Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 5.14.3 Signed-off-by: Sourav Basu <sourav.basu@okta.com>
1 parent 7271f15 commit 08d9e9d

77 files changed

Lines changed: 8428 additions & 109 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: 1326 additions & 72 deletions
Large diffs are not rendered by default.

src/auth0/management/__init__.py

Lines changed: 51 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,14 +2198,19 @@
21982198
ListOrganizationClientGrantsOffsetPaginatedResponseContent,
21992199
ListOrganizationConnectionsOffsetPaginatedResponseContent,
22002200
ListOrganizationDiscoveryDomainsResponseContent,
2201+
ListOrganizationGroupRolesResponseContent,
2202+
ListOrganizationGroupsResponseContent,
22012203
ListOrganizationInvitationsOffsetPaginatedResponseContent,
2204+
ListOrganizationMemberEffectiveRolesResponseContent,
2205+
ListOrganizationMemberRoleSourceGroupsResponseContent,
22022206
ListOrganizationMemberRolesOffsetPaginatedResponseContent,
22032207
ListOrganizationMembersPaginatedResponseContent,
22042208
ListOrganizationsPaginatedResponseContent,
22052209
ListPhoneTemplatesResponseContent,
22062210
ListRateLimitPoliciesPaginatedResponseContent,
22072211
ListRefreshTokensPaginatedResponseContent,
22082212
ListResourceServerOffsetPaginatedResponseContent,
2213+
ListRoleGroupsResponseContent,
22092214
ListRolePermissionsOffsetPaginatedResponseContent,
22102215
ListRoleUsersPaginatedResponseContent,
22112216
ListRolesOffsetPaginatedResponseContent,
@@ -2221,9 +2226,13 @@
22212226
ListUserBlocksByIdentifierResponseContent,
22222227
ListUserBlocksResponseContent,
22232228
ListUserConnectedAccountsResponseContent,
2229+
ListUserEffectivePermissionRoleSourcesResponseContent,
2230+
ListUserEffectivePermissionsResponseContent,
2231+
ListUserEffectiveRolesResponseContent,
22242232
ListUserGrantsOffsetPaginatedResponseContent,
22252233
ListUserOrganizationsOffsetPaginatedResponseContent,
22262234
ListUserPermissionsOffsetPaginatedResponseContent,
2235+
ListUserRoleSourceGroupsResponseContent,
22272236
ListUserRolesOffsetPaginatedResponseContent,
22282237
ListUserSessionsPaginatedResponseContent,
22292238
ListUsersOffsetPaginatedResponseContent,
@@ -2313,6 +2322,8 @@
23132322
OrganizationInvitationInvitee,
23142323
OrganizationInvitationInviter,
23152324
OrganizationMember,
2325+
OrganizationMemberEffectiveRole,
2326+
OrganizationMemberEffectiveRoleSource,
23162327
OrganizationMemberRole,
23172328
OrganizationMetadata,
23182329
OrganizationUsageEnum,
@@ -2674,6 +2685,12 @@
26742685
UserAuthenticationMethodPropertiesEnum,
26752686
UserBlockIdentifier,
26762687
UserDateSchema,
2688+
UserEffectivePermissionResponseContent,
2689+
UserEffectivePermissionRoleSourceEnum,
2690+
UserEffectivePermissionRoleSourceResponseContent,
2691+
UserEffectivePermissionSourceEnum,
2692+
UserEffectiveRole,
2693+
UserEffectiveRoleSource,
26772694
UserEnrollmentAuthMethodEnum,
26782695
UserEnrollmentStatusEnum,
26792696
UserGrant,
@@ -2766,8 +2783,6 @@
27662783
from .environment import Auth0Environment
27672784
from .event_streams import EventStreamsCreateRequest
27682785
from .version import __version__
2769-
from .management_client import AsyncManagementClient, CustomDomainHeader, ManagementClient
2770-
from .token_provider import AsyncTokenProvider, TokenProvider
27712786
_dynamic_imports: typing.Dict[str, str] = {
27722787
"Action": ".types",
27732788
"ActionBase": ".types",
@@ -2828,8 +2843,6 @@
28282843
"AssociateOrganizationClientGrantResponseContent": ".types",
28292844
"AsyncApprovalNotificationsChannelsEnum": ".types",
28302845
"AsyncAuth0": ".client",
2831-
"AsyncManagementClient": ".management_client",
2832-
"AsyncTokenProvider": ".token_provider",
28332846
"AttackProtectionCaptchaArkoseResponseContent": ".types",
28342847
"AttackProtectionCaptchaAuthChallengeRequest": ".types",
28352848
"AttackProtectionCaptchaAuthChallengeResponseContent": ".types",
@@ -3789,7 +3802,6 @@
37893802
"CredentialDeviceTypeEnum": ".types",
37903803
"CredentialId": ".types",
37913804
"CustomDomain": ".types",
3792-
"CustomDomainHeader": ".management_client",
37933805
"CustomDomainCustomClientIpHeader": ".types",
37943806
"CustomDomainCustomClientIpHeaderEnum": ".types",
37953807
"CustomDomainProvisioningTypeEnum": ".types",
@@ -4975,14 +4987,19 @@
49754987
"ListOrganizationClientGrantsOffsetPaginatedResponseContent": ".types",
49764988
"ListOrganizationConnectionsOffsetPaginatedResponseContent": ".types",
49774989
"ListOrganizationDiscoveryDomainsResponseContent": ".types",
4990+
"ListOrganizationGroupRolesResponseContent": ".types",
4991+
"ListOrganizationGroupsResponseContent": ".types",
49784992
"ListOrganizationInvitationsOffsetPaginatedResponseContent": ".types",
4993+
"ListOrganizationMemberEffectiveRolesResponseContent": ".types",
4994+
"ListOrganizationMemberRoleSourceGroupsResponseContent": ".types",
49794995
"ListOrganizationMemberRolesOffsetPaginatedResponseContent": ".types",
49804996
"ListOrganizationMembersPaginatedResponseContent": ".types",
49814997
"ListOrganizationsPaginatedResponseContent": ".types",
49824998
"ListPhoneTemplatesResponseContent": ".types",
49834999
"ListRateLimitPoliciesPaginatedResponseContent": ".types",
49845000
"ListRefreshTokensPaginatedResponseContent": ".types",
49855001
"ListResourceServerOffsetPaginatedResponseContent": ".types",
5002+
"ListRoleGroupsResponseContent": ".types",
49865003
"ListRolePermissionsOffsetPaginatedResponseContent": ".types",
49875004
"ListRoleUsersPaginatedResponseContent": ".types",
49885005
"ListRolesOffsetPaginatedResponseContent": ".types",
@@ -4998,9 +5015,13 @@
49985015
"ListUserBlocksByIdentifierResponseContent": ".types",
49995016
"ListUserBlocksResponseContent": ".types",
50005017
"ListUserConnectedAccountsResponseContent": ".types",
5018+
"ListUserEffectivePermissionRoleSourcesResponseContent": ".types",
5019+
"ListUserEffectivePermissionsResponseContent": ".types",
5020+
"ListUserEffectiveRolesResponseContent": ".types",
50015021
"ListUserGrantsOffsetPaginatedResponseContent": ".types",
50025022
"ListUserOrganizationsOffsetPaginatedResponseContent": ".types",
50035023
"ListUserPermissionsOffsetPaginatedResponseContent": ".types",
5024+
"ListUserRoleSourceGroupsResponseContent": ".types",
50045025
"ListUserRolesOffsetPaginatedResponseContent": ".types",
50055026
"ListUserSessionsPaginatedResponseContent": ".types",
50065027
"ListUsersOffsetPaginatedResponseContent": ".types",
@@ -5052,7 +5073,6 @@
50525073
"LogStreamSumoEnum": ".types",
50535074
"LogStreamSumoResponseSchema": ".types",
50545075
"LogStreamSumoSink": ".types",
5055-
"ManagementClient": ".management_client",
50565076
"MdlPresentationProperties": ".types",
50575077
"MdlPresentationRequest": ".types",
50585078
"MdlPresentationRequestProperties": ".types",
@@ -5092,6 +5112,8 @@
50925112
"OrganizationInvitationInvitee": ".types",
50935113
"OrganizationInvitationInviter": ".types",
50945114
"OrganizationMember": ".types",
5115+
"OrganizationMemberEffectiveRole": ".types",
5116+
"OrganizationMemberEffectiveRoleSource": ".types",
50955117
"OrganizationMemberRole": ".types",
50965118
"OrganizationMetadata": ".types",
50975119
"OrganizationUsageEnum": ".types",
@@ -5296,7 +5318,6 @@
52965318
"TokenQuota": ".types",
52975319
"TokenQuotaClientCredentials": ".types",
52985320
"TokenQuotaConfiguration": ".types",
5299-
"TokenProvider": ".token_provider",
53005321
"TooManyRequestsError": ".errors",
53015322
"TooManyRequestsSchema": ".types",
53025323
"TooManyRequestsSchemaError": ".types",
@@ -5459,6 +5480,12 @@
54595480
"UserAuthenticationMethodPropertiesEnum": ".types",
54605481
"UserBlockIdentifier": ".types",
54615482
"UserDateSchema": ".types",
5483+
"UserEffectivePermissionResponseContent": ".types",
5484+
"UserEffectivePermissionRoleSourceEnum": ".types",
5485+
"UserEffectivePermissionRoleSourceResponseContent": ".types",
5486+
"UserEffectivePermissionSourceEnum": ".types",
5487+
"UserEffectiveRole": ".types",
5488+
"UserEffectiveRoleSource": ".types",
54625489
"UserEnrollmentAuthMethodEnum": ".types",
54635490
"UserEnrollmentStatusEnum": ".types",
54645491
"UserGrant": ".types",
@@ -5614,8 +5641,6 @@ def __dir__():
56145641
"AssociateOrganizationClientGrantResponseContent",
56155642
"AsyncApprovalNotificationsChannelsEnum",
56165643
"AsyncAuth0",
5617-
"AsyncManagementClient",
5618-
"AsyncTokenProvider",
56195644
"AttackProtectionCaptchaArkoseResponseContent",
56205645
"AttackProtectionCaptchaAuthChallengeRequest",
56215646
"AttackProtectionCaptchaAuthChallengeResponseContent",
@@ -7760,14 +7785,19 @@ def __dir__():
77607785
"ListOrganizationClientGrantsOffsetPaginatedResponseContent",
77617786
"ListOrganizationConnectionsOffsetPaginatedResponseContent",
77627787
"ListOrganizationDiscoveryDomainsResponseContent",
7788+
"ListOrganizationGroupRolesResponseContent",
7789+
"ListOrganizationGroupsResponseContent",
77637790
"ListOrganizationInvitationsOffsetPaginatedResponseContent",
7791+
"ListOrganizationMemberEffectiveRolesResponseContent",
7792+
"ListOrganizationMemberRoleSourceGroupsResponseContent",
77647793
"ListOrganizationMemberRolesOffsetPaginatedResponseContent",
77657794
"ListOrganizationMembersPaginatedResponseContent",
77667795
"ListOrganizationsPaginatedResponseContent",
77677796
"ListPhoneTemplatesResponseContent",
77687797
"ListRateLimitPoliciesPaginatedResponseContent",
77697798
"ListRefreshTokensPaginatedResponseContent",
77707799
"ListResourceServerOffsetPaginatedResponseContent",
7800+
"ListRoleGroupsResponseContent",
77717801
"ListRolePermissionsOffsetPaginatedResponseContent",
77727802
"ListRoleUsersPaginatedResponseContent",
77737803
"ListRolesOffsetPaginatedResponseContent",
@@ -7783,9 +7813,13 @@ def __dir__():
77837813
"ListUserBlocksByIdentifierResponseContent",
77847814
"ListUserBlocksResponseContent",
77857815
"ListUserConnectedAccountsResponseContent",
7816+
"ListUserEffectivePermissionRoleSourcesResponseContent",
7817+
"ListUserEffectivePermissionsResponseContent",
7818+
"ListUserEffectiveRolesResponseContent",
77867819
"ListUserGrantsOffsetPaginatedResponseContent",
77877820
"ListUserOrganizationsOffsetPaginatedResponseContent",
77887821
"ListUserPermissionsOffsetPaginatedResponseContent",
7822+
"ListUserRoleSourceGroupsResponseContent",
77897823
"ListUserRolesOffsetPaginatedResponseContent",
77907824
"ListUserSessionsPaginatedResponseContent",
77917825
"ListUsersOffsetPaginatedResponseContent",
@@ -7837,7 +7871,6 @@ def __dir__():
78377871
"LogStreamSumoEnum",
78387872
"LogStreamSumoResponseSchema",
78397873
"LogStreamSumoSink",
7840-
"ManagementClient",
78417874
"MdlPresentationProperties",
78427875
"MdlPresentationRequest",
78437876
"MdlPresentationRequestProperties",
@@ -7877,6 +7910,8 @@ def __dir__():
78777910
"OrganizationInvitationInvitee",
78787911
"OrganizationInvitationInviter",
78797912
"OrganizationMember",
7913+
"OrganizationMemberEffectiveRole",
7914+
"OrganizationMemberEffectiveRoleSource",
78807915
"OrganizationMemberRole",
78817916
"OrganizationMetadata",
78827917
"OrganizationUsageEnum",
@@ -8078,7 +8113,6 @@ def __dir__():
80788113
"TestEventDataContent",
80798114
"TokenExchangeProfileResponseContent",
80808115
"TokenExchangeProfileTypeEnum",
8081-
"TokenProvider",
80828116
"TokenQuota",
80838117
"TokenQuotaClientCredentials",
80848118
"TokenQuotaConfiguration",
@@ -8244,6 +8278,12 @@ def __dir__():
82448278
"UserAuthenticationMethodPropertiesEnum",
82458279
"UserBlockIdentifier",
82468280
"UserDateSchema",
8281+
"UserEffectivePermissionResponseContent",
8282+
"UserEffectivePermissionRoleSourceEnum",
8283+
"UserEffectivePermissionRoleSourceResponseContent",
8284+
"UserEffectivePermissionSourceEnum",
8285+
"UserEffectiveRole",
8286+
"UserEffectiveRoleSource",
82478287
"UserEnrollmentAuthMethodEnum",
82488288
"UserEnrollmentStatusEnum",
82498289
"UserGrant",

src/auth0/management/core/client_wrapper.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# This file was auto-generated by Fern from our API Definition.
2-
# Modified by Auth0 to use Auth0 telemetry format with dynamic versioning
32

4-
import base64
5-
import platform
6-
import sys
73
import typing
8-
from json import dumps
94

105
import httpx
116
from .http_client import AsyncHttpClient, HttpClient
@@ -31,18 +26,15 @@ def __init__(
3126
self._logging = logging
3227

3328
def get_headers(self) -> typing.Dict[str, str]:
34-
py_version = platform.python_version()
35-
version = sys.modules["auth0"].__version__
36-
37-
auth0_client = dumps({
38-
"name": "auth0-python",
39-
"version": version,
40-
"env": {"python": py_version}
41-
}).encode("utf-8")
29+
import platform
4230

4331
headers: typing.Dict[str, str] = {
44-
"User-Agent": f"Python/{py_version}",
45-
"Auth0-Client": base64.b64encode(auth0_client).decode(),
32+
"User-Agent": "auth0-python/5.5.0",
33+
"X-Fern-Language": "Python",
34+
"X-Fern-Runtime": f"python/{platform.python_version()}",
35+
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
36+
"X-Fern-SDK-Name": "auth0-python",
37+
"X-Fern-SDK-Version": "5.5.0",
4638
**(self.get_custom_headers() or {}),
4739
}
4840
headers["Authorization"] = f"Bearer {self._get_token()}"

src/auth0/management/core/pydantic_utilities.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,18 @@ def parse_sse_obj(sse: "ServerSentEvent", type_: Type[T]) -> T:
310310
return parse_obj_as(type_, sse_event)
311311

312312

313+
_type_adapter_cache: Dict[int, Any] = {}
314+
315+
316+
def _get_type_adapter(type_: Type[Any]) -> Any:
317+
key = id(type_)
318+
adapter = _type_adapter_cache.get(key)
319+
if adapter is None:
320+
adapter = pydantic.TypeAdapter(type_) # type: ignore[attr-defined]
321+
_type_adapter_cache[key] = adapter
322+
return adapter
323+
324+
313325
def parse_obj_as(type_: Type[T], object_: Any) -> T:
314326
# convert_and_respect_annotation_metadata is required for TypedDict aliasing.
315327
#
@@ -342,8 +354,8 @@ def parse_obj_as(type_: Type[T], object_: Any) -> T:
342354
else:
343355
dealiased_object = convert_and_respect_annotation_metadata(object_=object_, annotation=type_, direction="read")
344356
if IS_PYDANTIC_V2:
345-
adapter = pydantic.TypeAdapter(type_) # type: ignore[attr-defined]
346-
return adapter.validate_python(dealiased_object)
357+
adapter = _get_type_adapter(type_)
358+
return adapter.validate_python(dealiased_object) # type: ignore[no-any-return]
347359
return pydantic.parse_obj_as(type_, dealiased_object)
348360

349361

src/auth0/management/organizations/__init__.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
from importlib import import_module
77

88
if typing.TYPE_CHECKING:
9-
from . import client_grants, connections, discovery_domains, enabled_connections, invitations, members
9+
from . import client_grants, connections, discovery_domains, enabled_connections, groups, invitations, members
1010
_dynamic_imports: typing.Dict[str, str] = {
1111
"client_grants": ".client_grants",
1212
"connections": ".connections",
1313
"discovery_domains": ".discovery_domains",
1414
"enabled_connections": ".enabled_connections",
15+
"groups": ".groups",
1516
"invitations": ".invitations",
1617
"members": ".members",
1718
}
@@ -38,4 +39,12 @@ def __dir__():
3839
return sorted(lazy_attrs)
3940

4041

41-
__all__ = ["client_grants", "connections", "discovery_domains", "enabled_connections", "invitations", "members"]
42+
__all__ = [
43+
"client_grants",
44+
"connections",
45+
"discovery_domains",
46+
"enabled_connections",
47+
"groups",
48+
"invitations",
49+
"members",
50+
]

src/auth0/management/organizations/client.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from .connections.client import AsyncConnectionsClient, ConnectionsClient
2626
from .discovery_domains.client import AsyncDiscoveryDomainsClient, DiscoveryDomainsClient
2727
from .enabled_connections.client import AsyncEnabledConnectionsClient, EnabledConnectionsClient
28+
from .groups.client import AsyncGroupsClient, GroupsClient
2829
from .invitations.client import AsyncInvitationsClient, InvitationsClient
2930
from .members.client import AsyncMembersClient, MembersClient
3031
# this is used as the default value for optional parameters
@@ -41,6 +42,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper):
4142
self._enabled_connections: typing.Optional[EnabledConnectionsClient] = None
4243
self._invitations: typing.Optional[InvitationsClient] = None
4344
self._members: typing.Optional[MembersClient] = None
45+
self._groups: typing.Optional[GroupsClient] = None
4446

4547
@property
4648
def with_raw_response(self) -> RawOrganizationsClient:
@@ -389,6 +391,14 @@ def members(self):
389391
self._members = MembersClient(client_wrapper=self._client_wrapper)
390392
return self._members
391393

394+
@property
395+
def groups(self):
396+
if self._groups is None:
397+
from .groups.client import GroupsClient # noqa: E402
398+
399+
self._groups = GroupsClient(client_wrapper=self._client_wrapper)
400+
return self._groups
401+
392402

393403
class AsyncOrganizationsClient:
394404
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -400,6 +410,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper):
400410
self._enabled_connections: typing.Optional[AsyncEnabledConnectionsClient] = None
401411
self._invitations: typing.Optional[AsyncInvitationsClient] = None
402412
self._members: typing.Optional[AsyncMembersClient] = None
413+
self._groups: typing.Optional[AsyncGroupsClient] = None
403414

404415
@property
405416
def with_raw_response(self) -> AsyncRawOrganizationsClient:
@@ -796,3 +807,11 @@ def members(self):
796807

797808
self._members = AsyncMembersClient(client_wrapper=self._client_wrapper)
798809
return self._members
810+
811+
@property
812+
def groups(self):
813+
if self._groups is None:
814+
from .groups.client import AsyncGroupsClient # noqa: E402
815+
816+
self._groups = AsyncGroupsClient(client_wrapper=self._client_wrapper)
817+
return self._groups

0 commit comments

Comments
 (0)